-
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
[Bug]: [Snappi] Different speed ingress and egress interface causes snappi-api to crash #12966
Comments
@kamalsahu0001 / @selldinesh please check on this and update with ETA |
Current workaround is to replace below code in snappi_fixtures.py to support multi-speed. Will raise PR once the confirmation is there from @amitpawar12 config.options.port_options.location_preemption = True
|
@kamalsahu0001 - Where is temp_tg_port defined? Please let me know. Thanks, |
This is not working. What I tried:
Result: Crash:
(2)
Result: Crash:
|
@amitpawar12 Can you giving the port numbers as specified below for multi-speed. Instead of Card1/Port2 for 400G port, you can use directly Port2 for 400G. StartDevice,StartPort,EndDevice,EndPort,BandWidth,VlanID,VlanMode |
Thanks for the update. I tried these changes. I needed to update the snappi_dut_base_config to iterate over the ports as well. The test ran well. However, I ran into issue when I tried the Pause Frames. I am seeing this warning message in IxNetwork for Pause Frames:
I ignored the issue and went ahead with test. I saw that one of the IXIA transmitting interfaces was receiving the PFCs but it was quietly dropping the PFCs frames and, hence ignoring it. Way to reproduce this:
The test should throw the above warning and one of the ingress interfaces should be receiving PFCs but ignoring it. Thanks, |
Hi Amit,
You must enable FCOE under l1 settings of the port. Then it will honor the pfc frames.
Regards,
Kamal
…________________________________
From: Amit Pawar ***@***.***>
Sent: Wednesday, July 31, 2024 7:26:56 AM
To: sonic-net/sonic-mgmt ***@***.***>
Cc: Kamal Sahu ***@***.***>; Mention ***@***.***>
Subject: Re: [sonic-net/sonic-mgmt] [Bug]: [Snappi] Different speed ingress and egress interface causes snappi-api to crash (Issue #12966)
@ kamalsahu0001 , Thanks for the update. I tried these changes. I needed to update the snappi_dut_base_config to iterate over the ports as well. The test ran well. However, I ran into issue when I tried the Pause Frames. I am seeing this warning
ZjQcmQRYFpfptBannerStart
This Message is From an External Sender: Use caution opening files, clicking links or responding to requests.
ZjQcmQRYFpfptBannerEnd
@kamalsahu0001<https://urldefense.com/v3/__https://github.com/kamalsahu0001__;!!I5pVk4LIGAfnvw!iyi-bw2YSpVPJy6_zCDNwZFMDxwM-XYSg2WuqSXYMB07u7RiHJsTLKtOwkZ6eKamayB5OIYqE6m1IiPnbd_r2rVM0Lg$> ,
Thanks for the update. I tried these changes. I needed to update the snappi_dut_base_config to iterate over the ports as well.
The test ran well. However, I ran into issue when I tried the Pause Frames.
I am seeing this warning message in IxNetwork for Pause Frames:
02:01:04 snappi_api.info L1132 INFO | IxNet - Port does not support given protocol stack when not in data center mode.
I ignored the issue and went ahead with test. I saw that one of the IXIA transmitting interfaces was receiving the PFCs but it was quietly dropping the PFCs frames and, hence ignoring it.
Way to reproduce this:
* Configure the ports as you have described in connection_graph.xml.
* Modify the snappi_dut_base_config to iterate over the ports and add L1 config per port.
* Ensure that test has 2 ingress interfaces and 1 egress interface ( of any speed).
* Ensure that test has PFC frames.
The test should throw the above warning and one of the ingress interfaces should be receiving PFCs but ignoring it.
Thanks,
-A
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https://github.com/sonic-net/sonic-mgmt/issues/12966*issuecomment-2260654931__;Iw!!I5pVk4LIGAfnvw!iyi-bw2YSpVPJy6_zCDNwZFMDxwM-XYSg2WuqSXYMB07u7RiHJsTLKtOwkZ6eKamayB5OIYqE6m1IiPnbd_r0AK0bOk$>, or unsubscribe<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ANUC6S62EN56FYGY5JUGBWDZPDX3BAVCNFSM6AAAAABIGHLBMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRQGY2TIOJTGE__;!!I5pVk4LIGAfnvw!iyi-bw2YSpVPJy6_zCDNwZFMDxwM-XYSg2WuqSXYMB07u7RiHJsTLKtOwkZ6eKamayB5OIYqE6m1IiPnbd_rmxcNdL8$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Yeah. I went through the code again and seems like this piece of the code is one making the difference, not sure how though!
This seems to be enabling the FCOE only for the last port in the list (of the ports). Rest of the ports do not have FCOE enabled. Please let me know if u know, why that would happen. Thanks, |
@amitpawar12 .. Can you please move the lines after that line inside the for loop.
|
…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
…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
This issue is resolved via PR #14856 . Hence closing this issue. Thanks, |
…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
…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
Issue Description
When we try to have a ingress and egress with different speeds, the snappi_api crashes. There is assert in snappi_fixture to disallow ports of different speeds but if we really need to have let's say 400Gbps ingress and 100Gbps egress port test, there is no way to achieve it.
We need to support multi-speed interfaces via Snappi.
Current crash:
snappi_tests/multidut/systest/files/pfcwd_multidut_helper.py:316: in run_pfc_test
snappi_extra_params=snappi_extra_params)
common/snappi_tests/traffic_generation.py:589: in run_sys_traffic
api.set_config(config)
self = <snappi_ixnetwork.snappi_api.Api object at 0x7f8161e4c810>, config = <snappi.snappi.Config object at 0x7f8161b5adc0>
E SnappiIxnException: File "/usr/local/lib/python2.7/dist-packages/snappi_ixnetwork/snappi_api.py", line 214, in set_config
E self.config_ixnetwork(config)
E File "/usr/local/lib/python2.7/dist-packages/snappi_ixnetwork/snappi_api.py", line 258, in config_ixnetwork
E self.vport.config()
E File "/usr/local/lib/python2.7/dist-packages/snappi_ixnetwork/vport.py", line 157, in config
E self._set_location()
E File "/usr/local/lib/python2.7/dist-packages/snappi_ixnetwork/vport.py", line 293, in _set_location
E layer1_check = self._api.resource_group.set_group()
E File "/usr/local/lib/python2.7/dist-packages/snappi_ixnetwork/resourcegroup.py", line 68, in set_group
E "Please check the speed of these ports ", error_ports
E Port 1
config = <snappi.snappi.Config object at 0x7f8161b5adc0>
err = Exception('Please check the speed of these ports ', ['Port 1', 'Port 2'])
self = <snappi_ixnetwork.snappi_api.Api object at 0x7f8161e4c810>
Results you see
Crash reported above.
Results you expected to see
Test should allow multi-speed ingress and egress port selection.
Is it platform specific
generic
Relevant log output
No response
Output of
show version
No response
Attach files (if any)
No response
The text was updated successfully, but these errors were encountered: