From 707b76d79555dc2c5e130c6f2dc79827a54c112c Mon Sep 17 00:00:00 2001 From: Chirag Shah Date: Fri, 7 Aug 2020 13:01:58 -0700 Subject: [PATCH] zebra: Revert "zebra: probe local inactive neigh" Reverting probing of neigh entry. There is a timing where probe and remote macip add request comes at the same time resulting in neigh to remain in local state event though it should be remote. In mobility case, the host moves to remote VTEP, first MAC only type-2 route is received which triggers a PROBE of neighs (associated to MAC). PROBE request can go via network port to remote VTEP. PROBE request picks up local neigh with MAC entry's outgoing port is remote VTEP tunnel port. The PROBE reply and MAC-IP (containing IP) almost comes same time at DUT. DUT first processes remote macip and installs neigh as remote. Followed by receives neigh as REACHABLE which marks neigh as LOCAL. FRR does have BPF filter which does not allow its own netlink request to receive. Otherwise frr's request to program neigh as remote can move neigh from local to remote. Though ordering can not be guranteed that REACHABLE (PROBE's repsonse) can come at anytime and move it to LOCAL. This fix would not suffice the needs of converging LOCAL inactive neighs to remove from DB. As mobility draft sugges to PROBE local neigh when MAC moves to remote but it is not working with current framework. Ticket:CM-22864 This reverts commit 44bc8ae5508975f216ad1cbb42884579896e7258 Signed-off-by: Chirag Shah --- zebra/zebra_dplane.c | 19 ------------------- zebra/zebra_dplane.h | 3 --- zebra/zebra_evpn_neigh.c | 31 ------------------------------- 3 files changed, 53 deletions(-) diff --git a/zebra/zebra_dplane.c b/zebra/zebra_dplane.c index d34e1433ce..eaaeaccc25 100644 --- a/zebra/zebra_dplane.c +++ b/zebra/zebra_dplane.c @@ -3138,25 +3138,6 @@ enum zebra_dplane_result dplane_local_neigh_add(const struct interface *ifp, return result; } -/* - * Enqueue evpn neighbor update for the dataplane. - */ -enum zebra_dplane_result dplane_rem_neigh_update(const struct interface *ifp, - const struct ipaddr *ip, - const struct ethaddr *mac) -{ - enum zebra_dplane_result result; - uint32_t update_flags = 0; - - update_flags |= DPLANE_NEIGH_REMOTE; - - result = neigh_update_internal(DPLANE_OP_NEIGH_UPDATE, - ifp, mac, ip, 0, DPLANE_NUD_PROBE, - update_flags); - - return result; -} - /* * Enqueue evpn neighbor delete for the dataplane. */ diff --git a/zebra/zebra_dplane.h b/zebra/zebra_dplane.h index 3b5eda2486..31eb65922e 100644 --- a/zebra/zebra_dplane.h +++ b/zebra/zebra_dplane.h @@ -556,9 +556,6 @@ enum zebra_dplane_result dplane_local_neigh_add(const struct interface *ifp, const struct ethaddr *mac, bool set_router, bool set_static, bool set_inactive); -enum zebra_dplane_result dplane_rem_neigh_update(const struct interface *ifp, - const struct ipaddr *ip, - const struct ethaddr *mac); enum zebra_dplane_result dplane_rem_neigh_delete(const struct interface *ifp, const struct ipaddr *ip); diff --git a/zebra/zebra_evpn_neigh.c b/zebra/zebra_evpn_neigh.c index 12e9831d2d..58430b8ece 100644 --- a/zebra/zebra_evpn_neigh.c +++ b/zebra/zebra_evpn_neigh.c @@ -1067,35 +1067,6 @@ void zebra_evpn_process_neigh_on_remote_mac_del(zebra_evpn_t *zevpn, /* NOTE: Currently a NO-OP. */ } -/* - * Probe neighbor from the kernel. - */ -static int zebra_evpn_neigh_probe(zebra_evpn_t *zevpn, zebra_neigh_t *n) -{ - struct interface *vlan_if; - - vlan_if = zevpn_map_to_svi(zevpn); - if (!vlan_if) - return -1; - - dplane_rem_neigh_update(vlan_if, &n->ip, &n->emac); - - return 0; -} - -static void zebra_evpn_probe_neigh_on_mac_add(zebra_evpn_t *zevpn, - zebra_mac_t *zmac) -{ - zebra_neigh_t *nbr = NULL; - struct listnode *node = NULL; - - for (ALL_LIST_ELEMENTS_RO(zmac->neigh_list, node, nbr)) { - if (CHECK_FLAG(nbr->flags, ZEBRA_NEIGH_LOCAL) - && IS_ZEBRA_NEIGH_INACTIVE(nbr)) - zebra_evpn_neigh_probe(zevpn, nbr); - } -} - static inline void zebra_evpn_local_neigh_update_log( const char *pfx, zebra_neigh_t *n, bool is_router, bool local_inactive, bool old_bgp_ready, bool new_bgp_ready, bool inform_dataplane, @@ -2282,8 +2253,6 @@ void process_neigh_remote_macip_add(zebra_evpn_t *zevpn, struct zebra_vrf *zvrf, zebra_evpn_rem_neigh_install(zevpn, n, old_static); } - zebra_evpn_probe_neigh_on_mac_add(zevpn, mac); - /* Update seq number. */ n->rem_seq = seq; }