Skip to content

Commit defb3ae

Browse files
committed
controller: Remove dynamic-routing-arp-prefer-local option.
EVPN-learned MAC bindings are now written to the SB MAC_Binding table and consumed through the normal lflow pipeline at the same priority as dynamic entries. This makes the "dynamic-routing-arp-prefer-local" Logical Switch option obsolete: both the "true" and "false" settings produced identical flow tables since the MAC_Binding SB sync was introduced. Remove the option from: - ovn-controller (evpn_arp priority selection logic) - northd (NB-to-SB external_ids propagation) - NB schema documentation (ovn-nb.xml) - architecture documentation - system tests (deduplicate identical flow checks) The EVPN ARP lookup side table (table 113) now uses NEIGH_OF_DYNAMIC_MAC_BINDING_PRIO (100) unconditionally. The NEIGH_OF_EVPN_MAC_BINDING_LOW_PRIO (20) and NEIGH_OF_EVPN_MAC_BINDING_HIGH_PRIO (200) enum values are removed. Assisted-by: Claude Opus 4.6, OpenCode Acked-by: Dumitru Ceara <dceara@redhat.com> Signed-off-by: Ales Musil <amusil@redhat.com> (cherry picked from commit 32ea673)
1 parent 32bff67 commit defb3ae

9 files changed

Lines changed: 29 additions & 184 deletions

File tree

Documentation/topics/dynamic-routing/architecture.rst

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -630,16 +630,18 @@ Southbound FDB table (populated through normal OVN mechanisms) before
630630
falling back to the locally learned EVPN FDB cache. By default, the
631631
EVPN-learned entries take precedence.
632632

633-
Similarly, the ``dynamic-routing-arp-prefer-local`` option controls the
634-
lookup order for ARP/ND entries: when set to ``true``, the Southbound
635-
``MAC_Binding`` table is checked before the EVPN-learned neighbor cache.
636-
637-
Unlike IP route exchange, dynamically learned EVPN information
638-
(remote VTEPs, FDB entries, and ARP/ND neighbors) is **not** stored
639-
in the OVN Southbound database. Each ``ovn-controller`` instance
640-
processes this information locally, in memory. This design avoids
641-
the overhead of synchronizing high-volume, rapidly changing L2/L3
642-
state through the centralized database.
633+
EVPN-learned ARP/ND entries (Type-2 MAC+IP routes) are written to
634+
the Southbound ``MAC_Binding`` table and consumed at the same priority
635+
as dynamically learned entries through the normal lflow pipeline.
636+
This ensures all chassis see the same MAC bindings without requiring
637+
a separate preference option.
638+
639+
Unlike IP route exchange, dynamically learned EVPN L2 information
640+
(remote VTEPs and FDB entries) is **not** stored in the OVN
641+
Southbound database. Each ``ovn-controller`` instance processes
642+
this information locally, in memory. This design avoids the
643+
overhead of synchronizing high-volume, rapidly changing L2 state
644+
through the centralized database.
643645

644646
Local MAC and IP Advertisement
645647
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ OVN v26.09.0 - xxx xx xxxx
6262
"external_ids:dynamic-routing-port-mapping" for veth-based routing
6363
daemon integrations. This feature is Linux-only and requires
6464
OVS version >= 4.0.
65+
* Remove the "other_config:dynamic-routing-arp-prefer-local"
66+
option from Logical Switches. EVPN-learned MAC bindings are
67+
now written to the SB MAC_Binding table and consumed at the
68+
same priority as dynamic entries, making the preference option
69+
obsolete.
6570
- Added "override-connected" option to Logical Router Static Routes to mark
6671
static routes as higher-priority than connected routes, which in turn led
6772
to changes in administrative distance for specific route types. Please see

controller/evpn-arp.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,6 @@ evpn_arp_run(const struct evpn_arp_ctx_in *arp_ctx_in,
7676
updated = true;
7777
}
7878

79-
enum neigh_of_rule_prio priority =
80-
smap_get_bool(&arp->ldp->datapath->external_ids,
81-
"dynamic-routing-arp-prefer-local",
82-
false)
83-
? NEIGH_OF_EVPN_MAC_BINDING_LOW_PRIO
84-
: NEIGH_OF_EVPN_MAC_BINDING_HIGH_PRIO;
85-
if (arp->priority != priority) {
86-
arp->priority = priority;
87-
updated = true;
88-
}
89-
9079
if (updated) {
9180
hmapx_add(arp_ctx_out->updated_arps, arp);
9281
}

controller/evpn-arp.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ struct evpn_arp {
5353
uint32_t vni;
5454
/* Logical datapath of the switch this was learned on. */
5555
const struct local_datapath *ldp;
56-
/* Priority to use for this ARP entry at OpenFlow level. */
57-
enum neigh_of_rule_prio priority;
5856
};
5957

6058
void evpn_arp_run(const struct evpn_arp_ctx_in *, struct evpn_arp_ctx_out *);

controller/neighbor-of.h

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,21 +21,19 @@
2121
#include "ofctrl.h"
2222

2323
/* Priorities of ovn-controller generated flows for various types of MAC
24-
* Bindings in different situations. Valid preference orders, based on
25-
* the "dynamic-routing-arp-prefer-local" logical switch config and the
26-
* SB.Static_MAC_Binding.override_dynamic_mac value are:
24+
* Bindings. EVPN-learned MAC bindings are written to the SB MAC_Binding
25+
* table and consumed through the normal lflow pipeline at the same
26+
* priority as dynamic entries. The EVPN ARP lookup side table (table 113)
27+
* uses the dynamic priority as well. Valid preference orders based on
28+
* the SB.Static_MAC_Binding.override_dynamic_mac value are:
2729
*
28-
* - EVPN-learned < static-mac-binding < dynamic-mac-binding
29-
* - EVPN-learned < dynamic-mac-binding < static-mac-binding
30-
* - static-mac-binding < dynamic-mac-binding < EVPN-learned
31-
* - dynamic-mac-binding < static-mac-binding < EVPN-learned
30+
* - static-mac-binding < dynamic-mac-binding (+ EVPN)
31+
* - dynamic-mac-binding (+ EVPN) < static-mac-binding
3232
*/
3333
enum neigh_of_rule_prio {
34-
NEIGH_OF_EVPN_MAC_BINDING_LOW_PRIO = 20,
3534
NEIGH_OF_STATIC_MAC_BINDING_LOW_PRIO = 50,
3635
NEIGH_OF_DYNAMIC_MAC_BINDING_PRIO = 100,
3736
NEIGH_OF_STATIC_MAC_BINDING_HIGH_PRIO = 150,
38-
NEIGH_OF_EVPN_MAC_BINDING_HIGH_PRIO = 200,
3937
};
4038

4139
void

controller/physical.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3738,7 +3738,8 @@ physical_consider_evpn_arp(const struct evpn_arp *arp,
37383738
/* Set the EVPN lookup result bit. */
37393739
put_load(1, MFF_LOG_FLAGS, MLF_EVPN_LOOKUP_BIT, 1, ofpacts);
37403740

3741-
ofctrl_add_flow(flow_table, OFTABLE_EVPN_ARP_LOOKUP, arp->priority,
3741+
ofctrl_add_flow(flow_table, OFTABLE_EVPN_ARP_LOOKUP,
3742+
NEIGH_OF_DYNAMIC_MAC_BINDING_PRIO,
37423743
arp->flow_uuid.parts[0], match, ofpacts,
37433744
&arp->flow_uuid);
37443745
}

northd/en-datapath-logical-switch.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,6 @@ gather_external_ids(const struct nbrec_logical_switch *nbs,
173173
smap_add(external_ids, "dynamic-routing-redistribute",
174174
redistribute);
175175
}
176-
177-
const char *prefer_evpn_arp_local =
178-
smap_get(&nbs->other_config, "dynamic-routing-arp-prefer-local");
179-
if (prefer_evpn_arp_local) {
180-
smap_add(external_ids, "dynamic-routing-arp-prefer-local",
181-
prefer_evpn_arp_local);
182-
}
183176
}
184177

185178
/* For backwards-compatibility, also store the NB UUID in

ovn-nb.xml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,24 +1014,6 @@
10141014
</p>
10151015
</column>
10161016

1017-
<column name="other_config" key="dynamic-routing-arp-prefer-local"
1018-
type='{"type": "boolean"}'>
1019-
<p>
1020-
This option defines the preference of ARP/ND lookup. If set to
1021-
true OVN routers connected to EVPN Logical Switches on which remote
1022-
neighbor entries have been learned (Type-2 MAC+IP EVPN routes) will
1023-
give precedence to any ARP/ND entries they might have in the SB
1024-
<code>Mac_Binding</code> table before trying to resolve the MAC
1025-
address via the <code>ovn-controller</code> local EVPN ARP/ND cache.
1026-
The option defaults to false.
1027-
</p>
1028-
1029-
<p>
1030-
Only relevant if <ref column="other_config" key="dynamic-routing-vni"
1031-
table="Logical_switch"/> is set to valid VNI.
1032-
</p>
1033-
</column>
1034-
10351017
<column name="other_config" key="dynamic-routing-redistribute"
10361018
type='{"type": "string"}'>
10371019
<p>

0 commit comments

Comments
 (0)