Open rraguraj opened 2 years ago
@yxieca any help on who can take this issue for review?
@prsunny can you help?
@prsunny could you please help on this issue?
@prsunny could you please help on this issue?
agree that this would fail for platforms that doesn't return MAX_COUNT
max_nhop = switch_capability.get("MAX_NEXTHOP_GROUP_COUNT")
Even if this returns, i dont think we can test by such high number. Request @smaheshm, original author to comment on this.
Ignore my previous comment, misunderstood the issue. Some platforms don't have the 'MAX_NEXTHOP_GROUP_COUNT', so the limit is set to 1k as we are aware they do not support more than that.
the script can create > 16k nhop groups. Have you tried with 16k NHOP groups.
If orchagent can handle it I don't see any issue, but the script is run for older releases too where the code is different.
I think we can add platform specific check and set the max nhop group accordingly.
Once all platfomrs support "MAX_NEXTHOP_GROUP_COUNT", this check can be removed.
we can get rid of this variable: nhop_group_count and use "max_nhop + extra_nhops"
Maybe, we are mixing things a bit here. switch_capability.get("MAX_NEXTHOP_GROUP_COUNT") querying SAI attribute SAI_SWITCH_ATTR_NUMBER_OF_ECMP_GROUPS and CRM nexthop_group querying SAI_SWITCH_ATTR_AVAILABLE_NEXT_HOP_GROUP_ENTRY. Can't we just get the nexthop_group available count directly from CRM show CLI output and use it?
Maybe, we are mixing things a bit here. switch_capability.get("MAX_NEXTHOP_GROUP_COUNT") querying SAI attribute SAI_SWITCH_ATTR_NUMBER_OF_ECMP_GROUPS and CRM nexthop_group querying SAI_SWITCH_ATTR_AVAILABLE_NEXT_HOP_GROUP_ENTRY. Can't we just get the nexthop_group available count directly from CRM show CLI output and use it?
It doesn't work with all platforms since some platforms share resources. e.g. Mellanox for which the check for CRM NHOP resource exhaustion is skipped.
Maybe, we are mixing things a bit here. switch_capability.get("MAX_NEXTHOP_GROUP_COUNT") querying SAI attribute SAI_SWITCH_ATTR_NUMBER_OF_ECMP_GROUPS and CRM nexthop_group querying SAI_SWITCH_ATTR_AVAILABLE_NEXT_HOP_GROUP_ENTRY. Can't we just get the nexthop_group available count directly from CRM show CLI output and use it?
It doesn't work with all platforms since some platforms share resources. e.g. Mellanox for which the check for CRM NHOP resource exhaustion is skipped.
This test case is semantically wrong as it is trying to cause resource exhaustion for route nexthop group based on what is returned for ecmp group, i.e.) reading from one SAI counter to cause resource exhaustion based on different SAI resource counter. I am not sure of other non-mellanox platform but in Cisco-8000 platform, switch_capability.get("MAX_NEXTHOP_GROUP_COUNT") going to return 8192 (number of ECMP groups supported) and CRM resource counter shown will be 16380(number of nexthop group supported.
There is no switch capability for next hop resource count, only nexthop group count. Using CRM resources is not reliable. In your case removing line '289' will work. Add platform specific checks if required.
In test script nhop_group_limit is set tp 1024
In cisco platform, available nexthop_group is more that 1024 as shown below
After utilizing the routes
Test expects crm available next hop routes to 0(to utillize all nhop available routes). However test uses only 1034 nhop routes. so test failed.
verify the test used up all the NHOP group resources
E Failed: Unused NHOP group resource: 15346, used:1038
Please let us know Why the nhop_group_limit is restricted to 1024, Since other platforms can handle much more nexthop_groups