[pytest/hash] Enhance hash test#1494
Conversation
|
|
||
| # The sample is too little for hash_key vlan-id and ingress-port, check it loose | ||
| check_balancing_mode = 'loose' if hash_key in ['vlan-id', 'ingress-port'] else 'strict' | ||
| self.check_balancing(next_hop.get_next_hop(), hit_count_map, check_balancing_mode) |
There was a problem hiding this comment.
i am not sure why we introduce loose mode, it seems defeating the purpose of the test.
There was a problem hiding this comment.
Load balance is established in the case of a large number of samples. When the sample size is too small, the result may be hashed to the same destination, and the result is load balance not very well. In our hash test, the number of vlan-id and ingress-port was small, so i add them to the loose mode.
|
@William-zx , there are many enhancement in the pr. it is very difficult to review all enhancement in one pr. can you break your enhancement in three PRs? We'll review them one by one. |
lguohan
left a comment
There was a problem hiding this comment.
@William-zx , there are many enhancement in the pr. it is very difficult to review all enhancement in one pr. can you break your enhancement in three PRs? We'll review them one by one.
Break the enhancement in four PRs: |
1. Iterate once for every port when hash key is ingress port. 2. In loose mode, do not need to enter the check_balancing function. 3. Delete loose mode in check_balancing function.
|
four sub PRs have been merged into the master. close this PR |
…ux-kernel submodules (sonic-net#7064) sonic-swss * Add table descriptions for dynamic buffer calculation to the documents (sonic-net#1664) * Remove vxlanmgrd dependency on orchagent (sonic-net#1647) sonic-utilities * [show] Fix 'show mac' output, when FDB entry with Vlan 1 is present (sonic-net#1368) * [warm-reboot]: Check empty key before issuing redis hget (sonic-net#1496) * [generate-dump] Remove Arista specific logic (sonic-net#1482) * [warm-reboot]: added automated recover for ISSU file (sonic-net#1466) * [warm-reboot] Check if warm restart flag is set when issuing a warm-reboot (sonic-net#1460) * [show][config] fix for show/config muxcable hwmode model value; fix show/config muxcable return codes; (sonic-net#1494) sonic-linux-kernel * [net] Disable prio and cls cgroups to make working cgroup2 sock matching (sonic-net#198) Signed-off-by: Danny Allen <[email protected]>
Description of PR
Summary:
Made the following change:
Type of change
Approach
How did you do it?
How did you verify/test it?
pytest --pdb -s -vvv --capture=no --disable_loganalyzer --inventory veos --host-pattern all -user admin --testbed vms-t1 --testbed_file testbed.csv --duration=0 --show-capture=stdout fib/test_fib.py::Test_Hash
============================================================== test session starts ==============================================================
platform linux2 -- Python 2.7.12, pytest-4.6.3, py-1.8.0, pluggy-0.12.0 -- /usr/bin/python
cachedir: .pytest_cache
ansible: 2.0.0.2
rootdir: /var/root/sonic-mgmt/tests, inifile: pytest.ini
plugins: ansible-2.0.2
collected 2 items
fib/test_fib.py::Test_Hash::test_hash_ipv4 PASSED
fib/test_fib.py::Test_Hash::test_hash_ipv6 PASSED
============================================================ slowest test durations =============================================================
670.56s call fib/test_fib.py::Test_Hash::test_hash_ipv6
634.48s call fib/test_fib.py::Test_Hash::test_hash_ipv4
11.01s setup fib/test_fib.py::Test_Hash::test_hash_ipv4
2.20s teardown fib/test_fib.py::Test_Hash::test_hash_ipv6
0.60s teardown fib/test_fib.py::Test_Hash::test_hash_ipv4
0.42s setup fib/test_fib.py::Test_Hash::test_hash_ipv6
========================================================== 2 passed in 1319.29 seconds ==========================================================
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation