From 79dab014df4c9e26f178d176d8ecf87e9a9b42dc Mon Sep 17 00:00:00 2001 From: Longxiang Lyu <35479537+lolyu@users.noreply.github.com> Date: Tue, 3 Oct 2023 00:37:08 +0800 Subject: [PATCH] [muxorch] Reorder the neighbor disable operations (#2917) When mux transits from active to standby, orchagent first disable the neighbor[1], then program the tunnel route[2]. There is a small period of time between [1] and [2] that the ASIC is unable to forward the traffic to the neighbor. So let's reorder those two operations - program the tunnel route first, then disable the neighbor. --- orchagent/muxorch.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/orchagent/muxorch.cpp b/orchagent/muxorch.cpp index 94a2e77b56..f82fa74965 100644 --- a/orchagent/muxorch.cpp +++ b/orchagent/muxorch.cpp @@ -855,13 +855,6 @@ bool MuxNbrHandler::disable(sai_object_id_t tnh) return false; } - neigh = NeighborEntry(it->first, alias_); - if (!gNeighOrch->disableNeighbor(neigh)) - { - SWSS_LOG_INFO("Disabling neigh failed for %s", neigh.ip_address.to_string().c_str()); - return false; - } - updateTunnelRoute(nh_key, true); IpPrefix pfx = it->first.to_string(); @@ -870,6 +863,13 @@ bool MuxNbrHandler::disable(sai_object_id_t tnh) return false; } + neigh = NeighborEntry(it->first, alias_); + if (!gNeighOrch->disableNeighbor(neigh)) + { + SWSS_LOG_INFO("Disabling neigh failed for %s", neigh.ip_address.to_string().c_str()); + return false; + } + it++; }