Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choose ARP scale based on available NH entries for CISCO 8000 platforms #15842

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tests/arp/test_stress_arp.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ def test_ipv4_arp(duthost, garp_enabled, ip_and_intf_info, intfs_for_test,
pytest_assert(ipv4_available > 0 and fdb_available > 0, "Entries have been filled")

arp_available = min(min(ipv4_available, fdb_available), ENTRIES_NUMBERS)
# Neighbor support is dependant on NH scale for some cisco platforms.
# Limit ARP scale based on available NH entries
asic_type = duthost.facts["asic_type"]
if 'cisco-8000' in asic_type:
ipv4_nh_available = get_crm_resources(duthost, "ipv4_nexthop", "available")
arp_available = min(arp_available, ipv4_nh_available)

pytest_require(garp_enabled, 'Gratuitous ARP not enabled for this device')
ptf_intf_ipv4_hosts = genrate_ipv4_ip()
Expand Down Expand Up @@ -195,7 +201,10 @@ def test_ipv6_nd(duthost, ptfhost, config_facts, tbinfo, ip_and_intf_info,
pytest_assert(ipv6_available > 0 and fdb_available > 0, "Entries have been filled")

nd_available = min(min(ipv6_available, fdb_available), ENTRIES_NUMBERS)

asic_type = duthost.facts["asic_type"]
if 'cisco-8000' in asic_type:
ipv6_nh_available = get_crm_resources(duthost, "ipv6_nexthop", "available")
nd_available = min(nd_available, ipv6_nh_available)
while loop_times > 0:
loop_times -= 1
try:
Expand Down
Loading