diff options
author | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2020-09-08 18:23:04 +0200 |
---|---|---|
committer | Anuradha Karuppiah <anuradhak@nvidia.com> | 2021-02-24 17:11:26 +0100 |
commit | fd40906be90e65273df96dca29b9e7134499468a (patch) | |
tree | bea2ce81332195fff9386c2229a6b7425b4f15e2 /zebra/zebra_evpn_mh.c | |
parent | zebra: link local MACs to destination port for efficient lacp-bypass processing (diff) | |
download | frr-fd40906be90e65273df96dca29b9e7134499468a.tar.xz frr-fd40906be90e65273df96dca29b9e7134499468a.zip |
zebra: flush macs linked to the bond when it moves out of bypass
When a ES-bond is in bypass state MACs learnt on it are linked to the
access port instead of the ES. When LACP converges on the bond it moves
out of bypass and the MACs previously learnt on it are flushed to force
a re-learn on new traffic.
Ticket: CM-31326
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r-- | zebra/zebra_evpn_mh.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c index 249a2f0aa..5a28ee10c 100644 --- a/zebra/zebra_evpn_mh.c +++ b/zebra/zebra_evpn_mh.c @@ -2682,6 +2682,7 @@ static void zebra_evpn_es_bypass_update_macs(struct zebra_evpn_es *es, zebra_mac_t *mac; struct listnode *node; struct listnode *nnode; + struct zebra_if *zif; /* Flush all MACs linked to the ES */ for (ALL_LIST_ELEMENTS(es->mac_list, node, nnode, mac)) { @@ -2696,6 +2697,25 @@ static void zebra_evpn_es_bypass_update_macs(struct zebra_evpn_es *es, es->esi_str); zebra_evpn_flush_local_mac(mac, ifp); } + + /* While in bypass-mode locally learnt MACs are linked + * to the access port instead of the ES + */ + zif = ifp->info; + if (!zif->mac_list) + return; + + for (ALL_LIST_ELEMENTS(zif->mac_list, node, nnode, mac)) { + if (!CHECK_FLAG(mac->flags, ZEBRA_MAC_LOCAL)) + continue; + + if (IS_ZEBRA_DEBUG_EVPN_MH_MAC) + zlog_debug("VNI %u mac %pEA %s update ifp %s", + mac->zevpn->vni, + &mac->macaddr, + bypass ? "bypass" : "non-bypass", ifp->name); + zebra_evpn_flush_local_mac(mac, ifp); + } } void zebra_evpn_es_bypass_update(struct zebra_evpn_es *es, |