Adding support for calculating balancing in multi-lc/multi-asic case (Test_fib.py)#6391
Adding support for calculating balancing in multi-lc/multi-asic case (Test_fib.py)#6391abdosi merged 4 commits intosonic-net:masterfrom
Conversation
|
FYI @abdosi |
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@abdosi , As per your request, added the balancing results: Kindly notice that the expected count is different for the 3 asics (based on interfaces per asic in the dest port list) 14:41:36.115 root : INFO : type port(s) exp_cnt act_cnt diff(%) |
|
@abdosi, I have updated the PR description as per your request and also verified that the change works on T0-64 and T1-64-lag profiles (Both are tested on single asic platforms) |
|
@vperumal, the below import for 'defaultdict' is missing in both files 'fib_test.py', 'hash_test.py' and only if we have this change, the above fix works, and the test cases are going through. |
|
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
Thanks @sanjair-git - I have added that change |
|
@abdosi : As per your request, I have made the change applicable only for non-voq based chassis. Kindly take a look and let me know. |
|
The pre-commit check detected issues in the files touched by this pull request. For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame Detailed pre-commit check results: To run the pre-commit checks locally, you can follow below steps:
|
|
@arlakshm can you please review again |
…(Test_fib.py) (#6391) Currently in multi-lc/multi-asic environment, expected count is not calculated properly and divided equally over all the interfaces, even though number of paths per asic maybe different. Added support for calculating expected count based on number of interface per asic. The reason we needed to calculate per asic is because BGP add-path feature is currently not supported. So the current behavior for multi-lc/multi-asic case is traffic gets load balanced per asic from remote end and then load balanced based on the number of interfaces per asic. But since the script currently does a flat calculation based on number of interfaces, script fails for deviation above 25%.
…ic-mgmt into internal-202205 Fix merge conflicts. - Fix verify_no_packet_any call in fib_test (sonic-net#6461) - Fix the test case test_TSA failure when check the routes on the eos host (sonic-net#6483) - Use conditional mark to skip testcase instead of required_mocked_dualtor (sonic-net#6766) - [tagged_arp] fix issue 'fixture ports_list not found' (sonic-net#6773) - [QoS] fixes after moving to python3 (sonic-net#6786) - update parse funciton for image url (sonic-net#6848) - Fix typo in get_queue_counter (sonic-net#6852) - Revert "Fix loganalyzer.py UnicodeDecodeError (sonic-net#6524)" (sonic-net#6858) - Enhancing core_dump_and_config_check to be multi-asic aware (sonic-net#6527) - Adding support for calculating balancing in multi-lc/multi-asic case (Test_fib.py) (sonic-net#6391) - Support different RC in case of pre or post sanity check failed (sonic-net#6860) - Update getbuild.py to support pass an empty access_token - [202205] Fixing auto_techsupport (sonic-net#6882) - Merge branch 'azure-202205' into dev/yaqiangzhu/202205_manually_merge

Description of PR
Currently in multi-lc/multi-asic environment, expected count is not calculated properly and divided equally over all the interfaces, even though number of paths per asic maybe different. Added support for calculating expected count based on number of interface per asic.
The reason we needed to calculate per asic is because BGP add-path feature is currently not supported. So the current behavior for multi-lc/multi-asic case is traffic gets load balanced per asic from remote end and then load balanced based on the number of interfaces per asic. But since the script currently does a flat calculation based on number of interfaces, script fails for deviation above 25%.
For e.g.
Current behavior - say we have 4 interfaces (2 on asic0, 1 on asic1, 1 on asic2) and send 100 packets. Exp_count is 25 per port. But the traffic is divided 33 packets on asic0, 33 on asic1 and 33 asic2. Further dividing it to 16 packets on asic0 for the two interfaces, causing the testcase to fail.
New behavior - Expected count will be calculated on per_asic level so expected count for asic0 will be 33 and per interface on it to 16.
Summary:
Fixes # (issue)
Type of change
Back port request
Approach
What is the motivation for this PR?
Currently in multi-lc/multi-asic environment, expected count is not calculated properly and divided equally over all the interfaces, even though number of paths per asic maybe different.
How did you do it?
Added support for calculating expected count based on number of interface per asic.
How did you verify/test it?
Verified it on Cisco-8808 chassis
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation