Skip to content

Commit e2229eb

Browse files
authored
Revert PR:12186 crm_stats_ipv6_route_available counter was not decremented, as we have a fix in platform side of code (#14775)
Description of PR #14104 Reverting this PR as we have fix on the platform side to take care of the CRM route resource usage related issue. This change is merged in master #14602 This is a conflict merge to 202405 branch. Summary: Fixes # (issue) CRM route resource fix is committed in the platform side of code. the additional delay and checks added part of the PR/14104 is no longer needed. Approach What is the motivation for this PR? Revert the cisco specific change added in sonic-mgmt code. How did you do it? How did you verify/test it? Verified running sonic mgmt tests/test_crm.py::test_crm_route co-authorized by: jianquanye@microsoft.com
1 parent 64ea984 commit e2229eb

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

tests/crm/test_crm.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -517,10 +517,6 @@ def test_crm_route(duthosts, enum_rand_one_per_hwsku_frontend_hostname, enum_fro
517517
logging.info("route add cmd: {}".format(route_add))
518518
duthost.command(route_add)
519519

520-
if is_cisco_device(duthost):
521-
# Sleep more time after route add
522-
time.sleep(10)
523-
524520
check_available_counters = True
525521
if duthost.facts['asic_type'] == 'broadcom':
526522
check_available_counters = False
@@ -546,9 +542,7 @@ def test_crm_route(duthosts, enum_rand_one_per_hwsku_frontend_hostname, enum_fro
546542
RESTORE_CMDS["test_crm_route"].append(route_del_cmd.format(asichost.ip_cmd, i, nh_ip))
547543
pytest.fail("\"crm_stats_ipv{}_route_used\" counter was not incremented".format(ip_ver))
548544
# Verify "crm_stats_ipv[4/6]_route_available" counter was decremented
549-
# For Cisco-8000 devices, hardware counters are statistical-based with +/- 1 entry tolerance.
550-
# Hence, the available counter may not increase as per initial value.
551-
if check_available_counters and not (crm_stats_route_available - new_crm_stats_route_available > 1):
545+
if check_available_counters and not (crm_stats_route_available - new_crm_stats_route_available >= 1):
552546
if is_mellanox_device(duthost):
553547
# Get sai sdk dump file in case test fail, we can get the LPM tree information
554548
get_sai_sdk_dump_file(duthost, f"sai_sdk_dump_after_add_v{ip_ver}_router")

0 commit comments

Comments
 (0)