Skip to content

Commit

Permalink
[muxorch] Reorder the neighbor disable operations (#2917)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
lolyu authored and yxieca committed Oct 17, 2023
1 parent 561cfd9 commit 79dab01
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions orchagent/muxorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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++;
}

Expand Down

0 comments on commit 79dab01

Please sign in to comment.