Skip to content

Adjusting test_stress_arp is it can handle cases of ipv6-only topologies .#20932

Merged
roy-sror merged 95 commits intosonic-net:masterfrom
gshemesh2:stress_arp_ipv6
Oct 28, 2025
Merged

Adjusting test_stress_arp is it can handle cases of ipv6-only topologies .#20932
roy-sror merged 95 commits intosonic-net:masterfrom
gshemesh2:stress_arp_ipv6

Conversation

@gshemesh2
Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

What is the motivation for this PR?

Adjusting test_stress_arp is it can handle cases of ipv6-only topologies .

How did you do it?

In IPv6-only topologies, use 'ip -6 neigh flush all' insted of 'ip -stats neigh flush all' to make it more focus on IPv6 only, and reduce the chance of unsuccessful execution of a command.

Add skip for test_ipv4_arp in case of ipv6 only topology.

How did you verify/test it?

Ran it on Nvidia platforms in IPv6 and IPv4 topologies.

Any platform specific information?

No

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

IPv6 and IPv4 topologies.

Documentation

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 23, 2026
…ies . (sonic-net#20932)

In IPv6-only topologies, use 'ip -6 neigh flush all' insted of 'ip -stats neigh flush all' to make it more focus on IPv6 only, and reduce the chance of unsuccessful execution of a command.

Add skip for test_ipv4_arp in case of ipv6 only topology.
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202511: #22112

gshemesh2 added a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
…ies . (sonic-net#20932)

In IPv6-only topologies, use 'ip -6 neigh flush all' insted of 'ip -stats neigh flush all' to make it more focus on IPv6 only, and reduce the chance of unsuccessful execution of a command.

Add skip for test_ipv4_arp in case of ipv6 only topology.

Signed-off-by: Guy Shemesh <gshemesh@nvidia.com>
lakshmi-nexthop pushed a commit to lakshmi-nexthop/sonic-mgmt that referenced this pull request Jan 28, 2026
…ies . (sonic-net#20932)

In IPv6-only topologies, use 'ip -6 neigh flush all' insted of 'ip -stats neigh flush all' to make it more focus on IPv6 only, and reduce the chance of unsuccessful execution of a command.

Add skip for test_ipv4_arp in case of ipv6 only topology.

Signed-off-by: Lakshmi Yarramaneni <lakshmi@nexthop.ai>
StormLiangMS pushed a commit that referenced this pull request Jan 29, 2026
1) Use "enum_rand_one_per_hwsku_frontend_hostname" for "test_ipv6_nd_incomplete"
   to select the duthost (as being used by other config fixtures like "config_facts",
   "ip_and_intf_info" etc). [Test was updated recently in PR20780 to use
   "enum_rand_one_per_hwsku_frontend_hostname" fixture but it seems mistakenly
   reverted by #20932]

2) Most of testcases are sending protocol packets (arp, ipv6_echo requests etc) from
   server towards ToR device. On dualtor, these protocol packets will be processed by
   both the ToR duts and thus NEIGH_TABLE in APPL_DB will be populated in both the
   duts (though hardware/ASIC_DB programming will happen only on active ToR).

   Fix: It's always better to clear arp and fdb tables on both the ToRs before and
   after the testcase by updating "arp_cache_fdb_cleanup" fixture to iterate over
   "duthosts" for cleanup.

Signed-off-by: Vinod <vkjammala@arista.com>
Co-authored-by: vkjammala-arista <152394203+vkjammala-arista@users.noreply.github.com>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Jan 29, 2026
…ies . (sonic-net#20932)

In IPv6-only topologies, use 'ip -6 neigh flush all' insted of 'ip -stats neigh flush all' to make it more focus on IPv6 only, and reduce the chance of unsuccessful execution of a command.

Add skip for test_ipv4_arp in case of ipv6 only topology.
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
…ies . (sonic-net#20932)

In IPv6-only topologies, use 'ip -6 neigh flush all' insted of 'ip -stats neigh flush all' to make it more focus on IPv6 only, and reduce the chance of unsuccessful execution of a command.

Add skip for test_ipv4_arp in case of ipv6 only topology.

Signed-off-by: Yael Tzur <ytzur@nvidia.com>
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
1) Use "enum_rand_one_per_hwsku_frontend_hostname" for "test_ipv6_nd_incomplete"
   to select the duthost (as being used by other config fixtures like "config_facts",
   "ip_and_intf_info" etc). [Test was updated recently in PR20780 to use
   "enum_rand_one_per_hwsku_frontend_hostname" fixture but it seems mistakenly
   reverted by sonic-net#20932]

2) Most of testcases are sending protocol packets (arp, ipv6_echo requests etc) from
   server towards ToR device. On dualtor, these protocol packets will be processed by
   both the ToR duts and thus NEIGH_TABLE in APPL_DB will be populated in both the
   duts (though hardware/ASIC_DB programming will happen only on active ToR).

   Fix: It's always better to clear arp and fdb tables on both the ToRs before and
   after the testcase by updating "arp_cache_fdb_cleanup" fixture to iterate over
   "duthosts" for cleanup.

Signed-off-by: Vinod <vkjammala@arista.com>
Signed-off-by: Yael Tzur <ytzur@nvidia.com>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Feb 6, 2026
…ies . (sonic-net#20932)

In IPv6-only topologies, use 'ip -6 neigh flush all' insted of 'ip -stats neigh flush all' to make it more focus on IPv6 only, and reduce the chance of unsuccessful execution of a command.

Add skip for test_ipv4_arp in case of ipv6 only topology.
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Feb 6, 2026
1) Use "enum_rand_one_per_hwsku_frontend_hostname" for "test_ipv6_nd_incomplete"
   to select the duthost (as being used by other config fixtures like "config_facts",
   "ip_and_intf_info" etc). [Test was updated recently in PR20780 to use
   "enum_rand_one_per_hwsku_frontend_hostname" fixture but it seems mistakenly
   reverted by sonic-net#20932]

2) Most of testcases are sending protocol packets (arp, ipv6_echo requests etc) from
   server towards ToR device. On dualtor, these protocol packets will be processed by
   both the ToR duts and thus NEIGH_TABLE in APPL_DB will be populated in both the
   duts (though hardware/ASIC_DB programming will happen only on active ToR).

   Fix: It's always better to clear arp and fdb tables on both the ToRs before and
   after the testcase by updating "arp_cache_fdb_cleanup" fixture to iterate over
   "duthosts" for cleanup.

Signed-off-by: Vinod <vkjammala@arista.com>
lakshmi-nexthop pushed a commit to lakshmi-nexthop/sonic-mgmt that referenced this pull request Feb 11, 2026
…) (sonic-net#22066)

1) Use "enum_rand_one_per_hwsku_frontend_hostname" for "test_ipv6_nd_incomplete"
   to select the duthost (as being used by other config fixtures like "config_facts",
   "ip_and_intf_info" etc). [Test was updated recently in PR20780 to use
   "enum_rand_one_per_hwsku_frontend_hostname" fixture but it seems mistakenly
   reverted by sonic-net#20932]

2) Most of testcases are sending protocol packets (arp, ipv6_echo requests etc) from
   server towards ToR device. On dualtor, these protocol packets will be processed by
   both the ToR duts and thus NEIGH_TABLE in APPL_DB will be populated in both the
   duts (though hardware/ASIC_DB programming will happen only on active ToR).

   Fix: It's always better to clear arp and fdb tables on both the ToRs before and
   after the testcase by updating "arp_cache_fdb_cleanup" fixture to iterate over
   "duthosts" for cleanup.

Signed-off-by: Vinod <vkjammala@arista.com>
Co-authored-by: vkjammala-arista <152394203+vkjammala-arista@users.noreply.github.com>
Signed-off-by: Lakshmi Yarramaneni <lakshmi@nexthop.ai>
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Feb 12, 2026
1) Use "enum_rand_one_per_hwsku_frontend_hostname" for "test_ipv6_nd_incomplete"
   to select the duthost (as being used by other config fixtures like "config_facts",
   "ip_and_intf_info" etc). [Test was updated recently in PR20780 to use
   "enum_rand_one_per_hwsku_frontend_hostname" fixture but it seems mistakenly
   reverted by sonic-net#20932]

2) Most of testcases are sending protocol packets (arp, ipv6_echo requests etc) from
   server towards ToR device. On dualtor, these protocol packets will be processed by
   both the ToR duts and thus NEIGH_TABLE in APPL_DB will be populated in both the
   duts (though hardware/ASIC_DB programming will happen only on active ToR).

   Fix: It's always better to clear arp and fdb tables on both the ToRs before and
   after the testcase by updating "arp_cache_fdb_cleanup" fixture to iterate over
   "duthosts" for cleanup.

Signed-off-by: Vinod <vkjammala@arista.com>
Signed-off-by: nnelluri-cisco <nnelluri@cisco.com>
rraghav-cisco pushed a commit to rraghav-cisco/sonic-mgmt that referenced this pull request Feb 13, 2026
…ies . (sonic-net#20932)

In IPv6-only topologies, use 'ip -6 neigh flush all' insted of 'ip -stats neigh flush all' to make it more focus on IPv6 only, and reduce the chance of unsuccessful execution of a command.

Add skip for test_ipv4_arp in case of ipv6 only topology.

Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
rraghav-cisco pushed a commit to rraghav-cisco/sonic-mgmt that referenced this pull request Feb 13, 2026
1) Use "enum_rand_one_per_hwsku_frontend_hostname" for "test_ipv6_nd_incomplete"
   to select the duthost (as being used by other config fixtures like "config_facts",
   "ip_and_intf_info" etc). [Test was updated recently in PR20780 to use
   "enum_rand_one_per_hwsku_frontend_hostname" fixture but it seems mistakenly
   reverted by sonic-net#20932]

2) Most of testcases are sending protocol packets (arp, ipv6_echo requests etc) from
   server towards ToR device. On dualtor, these protocol packets will be processed by
   both the ToR duts and thus NEIGH_TABLE in APPL_DB will be populated in both the
   duts (though hardware/ASIC_DB programming will happen only on active ToR).

   Fix: It's always better to clear arp and fdb tables on both the ToRs before and
   after the testcase by updating "arp_cache_fdb_cleanup" fixture to iterate over
   "duthosts" for cleanup.

Signed-off-by: Vinod <vkjammala@arista.com>
Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
rraghav-cisco pushed a commit to rraghav-cisco/sonic-mgmt that referenced this pull request Feb 18, 2026
…ies . (sonic-net#20932)

In IPv6-only topologies, use 'ip -6 neigh flush all' insted of 'ip -stats neigh flush all' to make it more focus on IPv6 only, and reduce the chance of unsuccessful execution of a command.

Add skip for test_ipv4_arp in case of ipv6 only topology.

Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
rraghav-cisco pushed a commit to rraghav-cisco/sonic-mgmt that referenced this pull request Feb 18, 2026
1) Use "enum_rand_one_per_hwsku_frontend_hostname" for "test_ipv6_nd_incomplete"
   to select the duthost (as being used by other config fixtures like "config_facts",
   "ip_and_intf_info" etc). [Test was updated recently in PR20780 to use
   "enum_rand_one_per_hwsku_frontend_hostname" fixture but it seems mistakenly
   reverted by sonic-net#20932]

2) Most of testcases are sending protocol packets (arp, ipv6_echo requests etc) from
   server towards ToR device. On dualtor, these protocol packets will be processed by
   both the ToR duts and thus NEIGH_TABLE in APPL_DB will be populated in both the
   duts (though hardware/ASIC_DB programming will happen only on active ToR).

   Fix: It's always better to clear arp and fdb tables on both the ToRs before and
   after the testcase by updating "arp_cache_fdb_cleanup" fixture to iterate over
   "duthosts" for cleanup.

Signed-off-by: Vinod <vkjammala@arista.com>
Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
anilal-amd pushed a commit to anilal-amd/anilal-forked-sonic-mgmt that referenced this pull request Feb 19, 2026
1) Use "enum_rand_one_per_hwsku_frontend_hostname" for "test_ipv6_nd_incomplete"
   to select the duthost (as being used by other config fixtures like "config_facts",
   "ip_and_intf_info" etc). [Test was updated recently in PR20780 to use
   "enum_rand_one_per_hwsku_frontend_hostname" fixture but it seems mistakenly
   reverted by sonic-net#20932]

2) Most of testcases are sending protocol packets (arp, ipv6_echo requests etc) from
   server towards ToR device. On dualtor, these protocol packets will be processed by
   both the ToR duts and thus NEIGH_TABLE in APPL_DB will be populated in both the
   duts (though hardware/ASIC_DB programming will happen only on active ToR).

   Fix: It's always better to clear arp and fdb tables on both the ToRs before and
   after the testcase by updating "arp_cache_fdb_cleanup" fixture to iterate over
   "duthosts" for cleanup.

Signed-off-by: Vinod <vkjammala@arista.com>
Signed-off-by: Zhuohui Tan <zhuohui.tan@amd.com>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Mar 17, 2026
1) Use "enum_rand_one_per_hwsku_frontend_hostname" for "test_ipv6_nd_incomplete"
   to select the duthost (as being used by other config fixtures like "config_facts",
   "ip_and_intf_info" etc). [Test was updated recently in PR20780 to use
   "enum_rand_one_per_hwsku_frontend_hostname" fixture but it seems mistakenly
   reverted by sonic-net#20932]

2) Most of testcases are sending protocol packets (arp, ipv6_echo requests etc) from
   server towards ToR device. On dualtor, these protocol packets will be processed by
   both the ToR duts and thus NEIGH_TABLE in APPL_DB will be populated in both the
   duts (though hardware/ASIC_DB programming will happen only on active ToR).

   Fix: It's always better to clear arp and fdb tables on both the ToRs before and
   after the testcase by updating "arp_cache_fdb_cleanup" fixture to iterate over
   "duthosts" for cleanup.

Signed-off-by: Vinod <vkjammala@arista.com>
Signed-off-by: Abhishek <abhishek@nexthop.ai>
ZhaohuiS added a commit to ZhaohuiS/sonic-mgmt that referenced this pull request Mar 23, 2026
On some platforms (e.g., S6100/202305), 'ip -stats neigh flush all'
fails with 'Failed to send flush request: No such file or directory'.

Wrap clear_dut_arp_cache() calls in try/except to handle this error
gracefully, matching the approach in PR sonic-net#20932 on master.

Tested on S6100 (tbtk5-t0-s6100-4, 202305 image):
- Before: FAILED with RunAnsibleModuleFail on neigh flush
- After: PASSED (1 passed in 434.67s)

Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
ZhaohuiS added a commit to ZhaohuiS/sonic-mgmt that referenced this pull request Mar 23, 2026
On some platforms (e.g., S6100/202305), 'ip -stats neigh flush all'
fails with 'Failed to send flush request: No such file or directory'.

Wrap clear_dut_arp_cache() calls in try/except to handle this error
gracefully, matching the approach in PR sonic-net#20932 on master.

Tested on S6100 (tbtk5-t0-s6100-4, 202305 image):
- Before: FAILED with RunAnsibleModuleFail on neigh flush
- After: PASSED (1 passed in 434.67s)

Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
StormLiangMS pushed a commit that referenced this pull request Mar 23, 2026
On some platforms (e.g., S6100/202305), 'ip -stats neigh flush all'
fails with 'Failed to send flush request: No such file or directory'.

Wrap clear_dut_arp_cache() calls in try/except to handle this error
gracefully, matching the approach in PR #20932 on master.

Tested on S6100 (tbtk5-t0-s6100-4, 202305 image):
- Before: FAILED with RunAnsibleModuleFail on neigh flush
- After: PASSED (1 passed in 434.67s)

Signed-off-by: Zhaohui Sun <zhaohuisun@microsoft.com>
Pterosaur pushed a commit to Pterosaur/sonic-mgmt that referenced this pull request Mar 26, 2026
```
*   d849917 (HEAD -> user/r12f/merge-202412, origin/user/r12f/merge-202412, internal-202412) r12f 260209:0619 - Merge remote-tracking branch 'azure/202412' into internal-202412
|\
| * c4c429c (azure/202412) mssonicbld 260209:0115 - [action] [PR:21843] Fix test_bgp_suppress_fib.py flakiness on scale topos (sonic-net#1011)
| * 46503f1 Mark Xiao 260205:1058 - [202412] Fix test_acl.py [ipv6-ingress-uplink->downlink-*] cases for v6 topo (sonic-net#942)
| * b6c58d4 mssonicbld 260130:1215 - [action] [PR:21772] Fix test_bgp_suppress_fib.py for v6 topos (sonic-net#985)
| * e762451 mssonicbld 260130:1016 - [action] [PR:21762] Fix test_disk_exhaustion.py for v6 topos (sonic-net#983)
| * 02cadbb mssonicbld 260130:1016 - [action] [PR:21771] Fix test_bgp_bounce.py for v6 topos (sonic-net#984)
| * 7eab3e7 Priyansh 260129:1437 - [202412] Fix/nonlinear dataplane downtime (sonic-net#982)
| * de89a46 mssonicbld 260130:0616 - [action] [PR:21143] configlet/test_add_rack.py Add comparison ignore for extra entries added by generic patcher (sonic-net#977)
| * c731442 mssonicbld 260130:0616 - [action] [PR:21647] Remove test_route_flow_counter.py xfail for v6 topos (sonic-net#979)
| * 0ff3ecc mssonicbld 260130:0116 - [action] [PR:21717] [BGP][test_bgp_session.py::test_bgp_session_interface_down] - Increase BGP Session State Timeout Window when restarting SWSS Container (sonic-net#978)
| * e0a408c Mark Xiao 260129:0914 - [202412] Fix fib/test_fib.py test_vxlan_hash [ipv6-*] (sonic-net#971)
| * 51b0525 mssonicbld 260124:0615 - [action] [PR:21523] Feature/route programming data (sonic-net#974)
| * 2bb2a53 mssonicbld 260124:0615 - [action] [PR:21939] Fix/nonlinear high nexthop dataplane downtime (sonic-net#975)
| * 1fe73bc Mark Xiao 260123:1323 - [202412] Fix setup_interfaces fixture and related bgp tests for v6 topo (sonic-net#941)
| * fda4ac2 Chuan Wu 260124:0520 - Enhance PTF function at scale testbed (sonic-net#913)
| * e8edcae gshemesh2 260123:2317 - Manual cherry-pick PR: Adjust test_bgpmon.py to handle running over ipv6 only topologies sonic-net#21377 (sonic-net#888)
| * 24b3dc7 gshemesh2 260123:2313 - Manual cherry-pick of PR: Adjusting test_stress_arp is it can handle cases of ipv6-only topologies . sonic-net#20932 (sonic-net#923)
```

----
#### AI description  (iteration 1)
#### PR Classification
This pull request is a feature enhancement that adds and refines IPv6 compatibility across multiple BGP, ACL, and related test modules.

#### PR Summary
The changes extend the testing framework and helper utilities to support IPv6-only and dual-stack environments by conditionally switching commands, packet generation, and route verifications.
- `tests/bgp/test_bgpmon.py` and `tests/bgp/test_bgp_update_timer.py`: Updated function signatures and logic to construct, verify, and clean up IPv6 routes and packets (e.g., using /64 and /128 prefixes).
- `tests/bgp/test_bgp_suppress_fib.py` and `tests/bgp/test_bgp_peer_shutdown.py`: Modified commands and packet filters to support IPv6 addressing and proper neighbor session handling.
- `tests/common/...` files and generators: Integr...
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Mar 27, 2026
…ies . (sonic-net#20932)

In IPv6-only topologies, use 'ip -6 neigh flush all' insted of 'ip -stats neigh flush all' to make it more focus on IPv6 only, and reduce the chance of unsuccessful execution of a command.

Add skip for test_ipv4_arp in case of ipv6 only topology.
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Mar 27, 2026
1) Use "enum_rand_one_per_hwsku_frontend_hostname" for "test_ipv6_nd_incomplete"
   to select the duthost (as being used by other config fixtures like "config_facts",
   "ip_and_intf_info" etc). [Test was updated recently in PR20780 to use
   "enum_rand_one_per_hwsku_frontend_hostname" fixture but it seems mistakenly
   reverted by sonic-net#20932]

2) Most of testcases are sending protocol packets (arp, ipv6_echo requests etc) from
   server towards ToR device. On dualtor, these protocol packets will be processed by
   both the ToR duts and thus NEIGH_TABLE in APPL_DB will be populated in both the
   duts (though hardware/ASIC_DB programming will happen only on active ToR).

   Fix: It's always better to clear arp and fdb tables on both the ToRs before and
   after the testcase by updating "arp_cache_fdb_cleanup" fixture to iterate over
   "duthosts" for cleanup.

Signed-off-by: Vinod <vkjammala@arista.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants