[fdb] Add FDB learning during config reload test#887
[fdb] Add FDB learning during config reload test#887liat-grozovik merged 5 commits intosonic-net:masterfrom wangxin:fdb-issue-pr
Conversation
This case is to ensure that all the FDB entries learned by SDK are correctly reported to upper layer in the initialization process after config reload. Signed-off-by: Xin Wang <xinw@mellanox.com>
Signed-off-by: Xin Wang <xinw@mellanox.com>
|
@qiluo-msft Could you please help review this? |
ansible/roles/test/tasks/fdb.yml
Outdated
| pause: seconds=10 | ||
|
|
||
| - name: Count FDB entries from SDK | ||
| shell: "docker exec syncd sx_api_fdb_dump.py | grep {{ dummy_mac_prefix }} | wc -l" |
There was a problem hiding this comment.
Why there is a sx_api_fdb_dump.py call without platform check?
sx_api*.py scripts are Mellanox SDK example/dump scripts and do not exist in other vendors syncd container
UPD: Ok, I see there is a platform check at the bottom but it is better to think of generic approach
There was a problem hiding this comment.
It takes around 4 minutes to run this case. There is no point taking time to run the test and skip the SDK checking step for other vendors for now.
ansible/roles/test/tasks/fdb.yml
Outdated
| become: yes | ||
|
|
||
| - name: Wait until the PTF script completed execution | ||
| shell: "ps -ef | grep /usr/bin/ptf | grep -v grep" |
There was a problem hiding this comment.
ps -ef | grep /usr/bin/ptf | grep -v grep [](start = 12, length = 41)
Could you try wait pid or tail --pid=$pid -f /dev/null ? #Closed
There was a problem hiding this comment.
OK, updated and comitted.
ansible/roles/test/tasks/fdb.yml
Outdated
| pause: seconds=10 | ||
|
|
||
| - name: Count FDB entries from SDK | ||
| shell: "docker exec syncd sx_api_fdb_dump.py | grep {{ dummy_mac_prefix }} | wc -l" |
There was a problem hiding this comment.
grep {{ dummy_mac_prefix }} [](start = 51, length = 27)
In stead of testing only dummy mac, how about testing all AGEABLE(dynamic) mac? #Closed
There was a problem hiding this comment.
In this new test case, PTF script doesn't inject packets with src MAC set to MAC of PTF ports. So, all AGEABLE MAC are the dummy MAC addresses. #Closed
There was a problem hiding this comment.
I understand that all AGEABLE MAC are the dummy MAC addresses. So the two option are the effectively the same.
I am wondering the test purpose. Should we test all AGEABLE(dynamic) mac, no matter whether the MAC is generated with dummy mac or not?
In reply to: 278421108 [](ancestors = 278421108)
There was a problem hiding this comment.
Got your point. Updated the script to count all AGEABLE MAC.
ansible/roles/test/tasks/fdb.yml
Outdated
|
|
||
| always: | ||
| - name: clear FDB table | ||
| command: sonic-clear fdb all |
There was a problem hiding this comment.
If the test failed, should we keep the scene and not clear FDB table? #Closed
There was a problem hiding this comment.
OK, updated and comitted.
* Use "tail --pid=<pid> -f /dev/null" to wait for PTF script to complete * Clear FDB only when test case pass Signed-off-by: Xin Wang <xinw@mellanox.com>
|
Fo many PRs, Test results are not available for even single successful run. I think we should make it mandatory to paste test results at least once per PR. [A general comment]. Thanks. |
ansible/roles/test/tasks/fdb.yml
Outdated
| become: yes | ||
|
|
||
| - name: Get PID of the PTF script | ||
| shell: "ps -ef | grep /usr/bin/ptf | grep -v grep | awk '{print $2}'" |
There was a problem hiding this comment.
ps -ef | grep [](start = 12, length = 13)
pgrep is just for this purpose #Closed
There was a problem hiding this comment.
Right, my method is silly. Updated with - command: pgrep -f '/usr/bin/python /usr/bin/ptf'. Thanks!
Signed-off-by: Xin Wang <xinw@mellanox.com>
Signed-off-by: Xin Wang <xinw@mellanox.com>
|
@praveen-li Attached ansible test result of this script. |
|
@stepanblyschak any more concern? I notice you 'requested changes' on this PR. |
[Vxlan] : adding show vnet/vxlan cmds (sonic-net#880) [show][bgp] Use only 'show ip bgp' as the base and use bgp_frr_v4 file for FRR routing stack (sonic-net#884) [fast reboot] set a fast-reboot DB flag (sonic-net#887) [show] Add 'ip/ipv6 bgp network' commands (sonic-net#888)
Description of PR
Summary:
Fixes # (issue)
This case is to verify that all the FDB entries learned by SDK are correctly reported to upper layer in the initialization process after config reload.
The added case in this PR is to cover the issue fixed by SAI commit: Mellanox/SAI-Implementation@fc5a8dd
Steps performed by the scripts:
docker exec syncd sx_api_fdb_dump.py | grep {{ dummy_mac_prefix }} | wc -lshow mac | grep {{ dummy_mac_prefix }} | wc -lWith the current tuning (send for 200 seconds, 8 packets in a batch, send to VLAN ports and LAG ports in interleaved pattern, 0.1s interval between batches), the issue could be reproduced 4 times in 6 tests.
Type of change
Approach
How did you do it?
Extended the existing FDB testing scripts. Please refer to the description for detailed steps.
How did you verify/test it?
Verified on Mellanox platform.
Any platform specific information?
The command for checking FDB entries learned from SDK is Mellanox specific. It takes nearly 4 minutes to run this added test case. There is no point wasting time run the case and skip verification step for other vendors. Because of this, I set the whole new test case Mellanox specific for now.
If other vendors consider this test case useful, they need little effort to refactor this test case to make just the step for counting FDB entries learned in SDK vendor specific.
Supported testbed topology if it's a new test case?
['t0', 't0-64', 't0-116']
Documentation
https://github.com/Azure/SONiC/wiki/FDB-Scale-Test-Plan
fdb_test_ansible.log