Skip to content

[crm]: Fix "nexthop group" test failure due to incorrect nexthop#633

Closed
volodymyrsamotiy wants to merge 1 commit intosonic-net:masterfrom
volodymyrsamotiy:master
Closed

[crm]: Fix "nexthop group" test failure due to incorrect nexthop#633
volodymyrsamotiy wants to merge 1 commit intosonic-net:masterfrom
volodymyrsamotiy:master

Conversation

@volodymyrsamotiy
Copy link
Contributor

@volodymyrsamotiy volodymyrsamotiy commented May 25, 2018

Signed-off-by: Volodymyr Samotiy volodymyrs@mellanox.com

Description of PR

Sometimes CRM "nexthop group" test fails due to incorrect nexthop set for the route.

Currently nexthop is retrieved using the command:

ip -4 neigh show dev {{crm_intf}}

Problem is that mentioned command returns all neighbors for the specified interface, including already deleted.
It happens because in Linux neighbor entries are not deleted immediately, they are moved to another state and after that once some timeout exceeded they are deleted.

Before "nexthop group" test there is "ipv4 nexhop" test which adds static neighbor and then deletes it.
According to described above when "nexthop group" test is running that deleted neighbor entry could still be present but with the state "incomplete/failed".
As a result "ip neigh show" returns both valid and invalid (deleted) entries, but test uses only first from the list and if first is that deleted neighbor then test fails.

To fix the issue need to modify "ip neigh show" command in order to get only valid and reachable neighbor entries:

ip -4 neigh show dev {{crm_intf}} nud reachable

Type of change

  • [*] Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

How did you do it?

Modified "ip neigh show" command in order to get only valid and reachable neighbor entries:

ip -4 neigh show dev {{crm_intf}} nud reachable

How did you verify/test it?

Execute CRM test and verified that it passed.

Any platform specific information?

N/A

Supported testbed topology if it's a new test case?

N/A

Documentation

N/A

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
@prsunny
Copy link
Contributor

prsunny commented May 25, 2018

@volodymyrsamotiy , I observed this issue and made a fix. However, I was planning to change it in such a way as to "grep -v FAILED" instead of nud reachable. Reason being, sometimes the entries would be in STALE state. Also for IPv6 neighbors, we would need to filter out "FE80" as nexthops. i.e grep -v FE80
What do you think?

@volodymyrsamotiy
Copy link
Contributor Author

@prsunny , I believe we should skip INCOMPLETE entries as well (it also could mean that entry was already deleted). If we need only REACHABLE and STALE neighbors maybe we can just use: "ip -4 neigh show dev {{crm_intf}} nud reachable nud stale". Regarding IPv6 neighbors, I agree that it is better to filter out link-local entries.

Since you already made a fix should I close this PR?

@prsunny
Copy link
Contributor

prsunny commented May 30, 2018

@volodymyrsamotiy , thanks for the feedback. I updated the fix and raised #635
Please review and sign-off. You can close this PR

wangxin pushed a commit to wangxin/sonic-mgmt that referenced this pull request Oct 27, 2025
Temporary solution for tests failing from recent regression as a result
of upgrading to a newer SAI.
Original PR: sonic-net#20049
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…net#3424)

Submodule src/sonic-sairedis 4ee82cb..1cf2eea:
  > Add acl counter match logic based on acl entry field (sonic-net#511)
  > Add specific comparison logic for ACL counter (sonic-net#484)

Submodule src/sonic-swss 46bc1f4..660530e:
  > Fix VLAN error introduced with new 4.9 kernel behavior (sonic-net#1001)
  > Warmboot Vlan neigh restore fix (sonic-net#1040)

Submodule src/sonic-utilities 11b4cf1..f76fc2c:
  > [warm reboot] Skip ASIC config pre-check if current image does not support it (sonic-net#637)
  > [FastReboot]: Send SIGINT to all teamd before stop (sonic-net#633)
  > [warm/fast reboot] provide strict option to prevent warm reboot under certain conditions (sonic-net#631)

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Submodule src/sonic-utilities fe2c656..afaedb7:
  > Revert "[FastReboot]: Send SIGINT to all teamd before stop (sonic-net#633)" (sonic-net#650)
  > Fixed config Asym PFC CLI. (sonic-net#632)
  > [config] Do no stop or restart dependent services (sonic-net#582)

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants