Skip to content

Commit

Permalink
[voq/inbandif]Code review comments fix 3
Browse files Browse the repository at this point in the history
Signed-off-by: vedganes <[email protected]>

Changes done to delete kernel neigh when there is failure in adding
kernel neigh for voq system neighbors if kernel entry already exists.
When there is mac change, system neighs are synced with changed mac.
With voq inband port type, static neighbor for this system neighbors
are added in kernel always with single chassis mac address. So to take
care of skpping adding neighbor we delete the kernel neighbor so that
next re-try will program the neighbor and hence the route addition will
proceed.
  • Loading branch information
vedganes committed Mar 31, 2021
1 parent c4d29bd commit 81c478e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cfgmgr/nbrmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ void NbrMgr::doStateSystemNeighTask(Consumer &consumer)
if (!addKernelNeigh(nbr_odev, ip_address, mac_address))
{
SWSS_LOG_ERROR("Neigh entry add on dev %s failed for '%s'", nbr_odev.c_str(), kfvKey(t).c_str());
// Delete neigh to take care of deletion of exiting nbr for mac change. This makes sure that
// re-try will be successful and route addtion (below) will be attempted and be successful
delKernelNeigh(nbr_odev, ip_address);
it++;
continue;
}
Expand Down

0 comments on commit 81c478e

Please sign in to comment.