Skip to content
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

[action] [PR:14856] [Snappi]: New base config function to accomodate mixed-speed ingress and egress tests. #16030

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

mssonicbld
Copy link
Collaborator

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

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

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

…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
@mssonicbld
Copy link
Collaborator Author

/azp run

@mssonicbld
Copy link
Collaborator Author

Original PR: #14856

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld mssonicbld merged commit af7c4fa into sonic-net:202405 Dec 12, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants