-
Notifications
You must be signed in to change notification settings - Fork 746
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Snappi]: New base config function to accomodate mixed-speed ingress and egress tests. #14856
[Snappi]: New base config function to accomodate mixed-speed ingress and egress tests. #14856
Conversation
@rawal01 , @sdszhang , @selldinesh FYI. |
cb14d14
to
81bda2f
Compare
port_config_list=port_config_list, | ||
duthost=duthost, | ||
snappi_ports=new_snappi_ports) | ||
pytest_assert(config_result is True, 'Fail to configure IP interfaces') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems a lot of duplication with snappi_dut_base_config, setup_dut_ports. Can we reuse them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sdszhang ,
Thanks for your comments.
For mixed-speed ports, both the ports need to be part of l1_config and hence included in the for loop. If this not done, snappi crashes. We had raised an issue for this (#12966 ). As part of the fix, both the ports are added in l1_config so that snappi application knows that both the interfaces are of different speeds. This is not true with snappi_dut_base_config as it is handling ports of the same speed.
The snappi_dut_base_config has assert if the ports are of different speed. This function just prints a log in case interfaces used are of different speeds.
As discussed, I will add the port-channel and VLAN configuration for the same.
Thanks
81bda2f
to
cab9f21
Compare
…and egress tests. (sonic-net#14856) Description of PR Summary: Existing snappi_dut_base_config in tests/common/snappi_tests/snappi_fixtures.py has an assert in case, mixed-speed ingress and egress interfaces are selected. Since the interface speeds were same, the L1 configuration was done ONLY once. With mixed-speed interfaces being used as ingress and egress, the assert needs to be removed. Second issue with existing snappi_multi_base_config was that speed was set to ONLY one of the interfaces being used for the test. This was incorrect for mixed speed interfaces, causing Snappi API itself to crash. Fixes # (issue) sonic-net#12966 Approach What is the motivation for this PR? Existing snappi_dut_base_config asserts when ingress and egress interface speeds are different. Furthermore, snappi framework itself did not support mixed-speed interfaces for the test and crashed (Please see issue sonic-net#12966 ) for the same. How did you do it? Added a new function - snappi_sys_base_config which replaces the assert with info level log indicating that interfaces are of different speeds. The L1 configuration is done for all the snappi_ports and set appropriate speed for all the snappi_ports. Ideally, existing snappi_dut_base_config could be modified with additional argument mixed-speed=NONE, and then selectively run the code for the mixed-speed=TRUE. However, this being frequently used function, I will keep it as is, and add a new function to ensure, existing function is not broken. How did you verify/test it? Ran on the local clone with mixed and same speed interfaces. No issues seen. Any platform specific information? Supported testbed topology if it's a new test case? Documentation co-authorized by: jianquanye@microsoft.com
Cherry-pick PR to 202405: #16030 |
…and egress tests. (#14856) Description of PR Summary: Existing snappi_dut_base_config in tests/common/snappi_tests/snappi_fixtures.py has an assert in case, mixed-speed ingress and egress interfaces are selected. Since the interface speeds were same, the L1 configuration was done ONLY once. With mixed-speed interfaces being used as ingress and egress, the assert needs to be removed. Second issue with existing snappi_multi_base_config was that speed was set to ONLY one of the interfaces being used for the test. This was incorrect for mixed speed interfaces, causing Snappi API itself to crash. Fixes # (issue) #12966 Approach What is the motivation for this PR? Existing snappi_dut_base_config asserts when ingress and egress interface speeds are different. Furthermore, snappi framework itself did not support mixed-speed interfaces for the test and crashed (Please see issue #12966 ) for the same. How did you do it? Added a new function - snappi_sys_base_config which replaces the assert with info level log indicating that interfaces are of different speeds. The L1 configuration is done for all the snappi_ports and set appropriate speed for all the snappi_ports. Ideally, existing snappi_dut_base_config could be modified with additional argument mixed-speed=NONE, and then selectively run the code for the mixed-speed=TRUE. However, this being frequently used function, I will keep it as is, and add a new function to ensure, existing function is not broken. How did you verify/test it? Ran on the local clone with mixed and same speed interfaces. No issues seen. Any platform specific information? Supported testbed topology if it's a new test case? Documentation co-authorized by: jianquanye@microsoft.com
…and egress tests. (sonic-net#14856) Description of PR Summary: Existing snappi_dut_base_config in tests/common/snappi_tests/snappi_fixtures.py has an assert in case, mixed-speed ingress and egress interfaces are selected. Since the interface speeds were same, the L1 configuration was done ONLY once. With mixed-speed interfaces being used as ingress and egress, the assert needs to be removed. Second issue with existing snappi_multi_base_config was that speed was set to ONLY one of the interfaces being used for the test. This was incorrect for mixed speed interfaces, causing Snappi API itself to crash. Fixes # (issue) sonic-net#12966 Approach What is the motivation for this PR? Existing snappi_dut_base_config asserts when ingress and egress interface speeds are different. Furthermore, snappi framework itself did not support mixed-speed interfaces for the test and crashed (Please see issue sonic-net#12966 ) for the same. How did you do it? Added a new function - snappi_sys_base_config which replaces the assert with info level log indicating that interfaces are of different speeds. The L1 configuration is done for all the snappi_ports and set appropriate speed for all the snappi_ports. Ideally, existing snappi_dut_base_config could be modified with additional argument mixed-speed=NONE, and then selectively run the code for the mixed-speed=TRUE. However, this being frequently used function, I will keep it as is, and add a new function to ensure, existing function is not broken. How did you verify/test it? Ran on the local clone with mixed and same speed interfaces. No issues seen. Any platform specific information? Supported testbed topology if it's a new test case? Documentation co-authorized by: jianquanye@microsoft.com
Cherry-pick PR to 202411: #16296 |
…and egress tests. (#14856) Description of PR Summary: Existing snappi_dut_base_config in tests/common/snappi_tests/snappi_fixtures.py has an assert in case, mixed-speed ingress and egress interfaces are selected. Since the interface speeds were same, the L1 configuration was done ONLY once. With mixed-speed interfaces being used as ingress and egress, the assert needs to be removed. Second issue with existing snappi_multi_base_config was that speed was set to ONLY one of the interfaces being used for the test. This was incorrect for mixed speed interfaces, causing Snappi API itself to crash. Fixes # (issue) #12966 Approach What is the motivation for this PR? Existing snappi_dut_base_config asserts when ingress and egress interface speeds are different. Furthermore, snappi framework itself did not support mixed-speed interfaces for the test and crashed (Please see issue #12966 ) for the same. How did you do it? Added a new function - snappi_sys_base_config which replaces the assert with info level log indicating that interfaces are of different speeds. The L1 configuration is done for all the snappi_ports and set appropriate speed for all the snappi_ports. Ideally, existing snappi_dut_base_config could be modified with additional argument mixed-speed=NONE, and then selectively run the code for the mixed-speed=TRUE. However, this being frequently used function, I will keep it as is, and add a new function to ensure, existing function is not broken. How did you verify/test it? Ran on the local clone with mixed and same speed interfaces. No issues seen. Any platform specific information? Supported testbed topology if it's a new test case? Documentation co-authorized by: jianquanye@microsoft.com
Description of PR
Summary:
Existing snappi_dut_base_config in tests/common/snappi_tests/snappi_fixtures.py has an assert in case, mixed-speed ingress and egress interfaces are selected.
Since the interface speeds were same, the L1 configuration was done ONLY once.
With mixed-speed interfaces being used as ingress and egress, the assert needs to be removed.
Second issue with existing snappi_multi_base_config was that speed was set to ONLY one of the interfaces being used for the test. This was incorrect for mixed speed interfaces, causing Snappi API itself to crash.
Fixes # (issue)
#12966
Type of change
Back port request
Approach
What is the motivation for this PR?
Existing snappi_dut_base_config asserts when ingress and egress interface speeds are different.
Furthermore, snappi framework itself did not support mixed-speed interfaces for the test and crashed (Please see issue #12966 ) for the same.
How did you do it?
Added a new function - snappi_sys_base_config which replaces the assert with info level log indicating that interfaces are of different speeds.
The L1 configuration is done for all the snappi_ports and set appropriate speed for all the snappi_ports. Ideally, existing snappi_dut_base_config could be modified with additional argument mixed-speed=NONE, and then selectively run the code for the mixed-speed=TRUE. However, this being frequently used function, I will keep it as is, and add a new function to ensure, existing function is not broken.
How did you verify/test it?
Ran on the local clone with mixed and same speed interfaces. No issues seen.
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation