Skip to content

[Fix]: Enhancement of port selection criteria for multidut RDMA cases based on testbed informaition#14127

Merged
yejianquan merged 4 commits intosonic-net:masterfrom
selldinesh:multidut_rdma_infra_fix_pr
Aug 20, 2024
Merged

[Fix]: Enhancement of port selection criteria for multidut RDMA cases based on testbed informaition#14127
yejianquan merged 4 commits intosonic-net:masterfrom
selldinesh:multidut_rdma_infra_fix_pr

Conversation

@selldinesh
Copy link
Copy Markdown
Contributor

@selldinesh selldinesh commented Aug 14, 2024

Description of PR

Summary: This PR enhances the logic for port selection for multidut RDMA cases based on the conf-name defined in the testbed.csv / testbed.yaml file. And also a generic fixture for single and multidut topology to get the snappi ports, dut port, asic_type, asic_value information
Fixes # (issue)
#13389
#13769

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?

For enhancing the port selection logic and a generic fixture for single and multidut topology

How did you do it?

Added a pytest fixture called get_snappi_ports and get_snappi_ports_for_rdma whcih selects the ports from the information provided in MULTIDUT_PORT_INFO in variables.py and the testbed info as shown below in testbed.csv

vms-snappi-sonic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-sonic-multidut,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
vms-snappi-single-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-multi-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman

How did you verify/test it?

Tested the logic on pfc cases

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@mssonicbld
Copy link
Copy Markdown
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/common/snappi_tests/snappi_fixtures.py:1034:21: E128 continuation line under-indented for visual indent
tests/common/snappi_tests/snappi_fixtures.py:1035:21: E128 continuation line under-indented for visual indent
tests/common/snappi_tests/snappi_fixtures.py:1036:21: E128 continuation line under-indented for visual indent
tests/common/snappi_tests/snappi_fixtures.py:1037:21: E124 closing bracket does not match visual indentation
tests/snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossless_with_snappi.py:2:1: F401 'random' imported but unused

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@selldinesh
Copy link
Copy Markdown
Contributor Author

@sdszhang Added the testbed info in the form of parameter

@mssonicbld
Copy link
Copy Markdown
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/common/snappi_tests/snappi_fixtures.py:17:1: F401 'tests.snappi_tests.variables.MULTIDUT_PORT_INFO' imported but unused
tests/snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossless_with_snappi.py:2:1: F401 'random' imported but unused

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

Comment thread tests/snappi_tests/variables.py Outdated
Comment thread tests/snappi_tests/variables.py Outdated
Copy link
Copy Markdown
Collaborator

@yejianquan yejianquan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mssonicbld
Copy link
Copy Markdown
Collaborator

@selldinesh PR conflicts with 202405 branch

selldinesh added a commit to selldinesh/sonic-mgmt that referenced this pull request Aug 26, 2024
… based on testbed informaition (sonic-net#14127)

Description of PR
Summary: This PR enhances the logic for port selection for multidut RDMA cases based on the conf-name defined in the testbed.csv / testbed.yaml file. And also a generic fixture for single and multidut topology to get the snappi ports, dut port, asic_type, asic_value information
Fixes # (issue)

Approach
What is the motivation for this PR?
For enhancing the port selection logic and a generic fixture for single and multidut topology

How did you do it?
Added a pytest fixture called get_snappi_ports and get_snappi_ports_for_rdma whcih selects the ports from the information provided in MULTIDUT_PORT_INFO in variables.py and the testbed info as shown below in testbed.csv

vms-snappi-sonic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-sonic-multidut,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
vms-snappi-single-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-multi-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
How did you verify/test it?
Tested the logic on pfc cases

co-authorized by: [email protected]
selldinesh added a commit to selldinesh/sonic-mgmt that referenced this pull request Aug 26, 2024
… based on testbed informaition (sonic-net#14127)

Description of PR
Summary: This PR enhances the logic for port selection for multidut RDMA cases based on the conf-name defined in the testbed.csv / testbed.yaml file. And also a generic fixture for single and multidut topology to get the snappi ports, dut port, asic_type, asic_value information
Fixes # (issue)

Approach
What is the motivation for this PR?
For enhancing the port selection logic and a generic fixture for single and multidut topology

How did you do it?
Added a pytest fixture called get_snappi_ports and get_snappi_ports_for_rdma whcih selects the ports from the information provided in MULTIDUT_PORT_INFO in variables.py and the testbed info as shown below in testbed.csv

vms-snappi-sonic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-sonic-multidut,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
vms-snappi-single-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-multi-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
How did you verify/test it?
Tested the logic on pfc cases

co-authorized by: [email protected]
yejianquan pushed a commit that referenced this pull request Aug 29, 2024
… prio from test_flow for oversubscribtion cases (#14153)

Description of PR
Summary: This PR accomodates the infra change from PR 14127 and separates the flow prio from test_flow
Fixes # (issue)
#14004

Approach
What is the motivation for this PR?
To accomodate the infra change from PR 14127 and separe the flow prio from test_flow

How did you do it?
Assigned single prio to the test flow instead of passing the entire flow priority to the test flow

Dependency
Need to incorporate the changes from #14127

co-authorized by: [email protected]
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Aug 29, 2024
… prio from test_flow for oversubscribtion cases (sonic-net#14153)

Description of PR
Summary: This PR accomodates the infra change from PR 14127 and separates the flow prio from test_flow
Fixes # (issue)
sonic-net#14004

Approach
What is the motivation for this PR?
To accomodate the infra change from PR 14127 and separe the flow prio from test_flow

How did you do it?
Assigned single prio to the test flow instead of passing the entire flow priority to the test flow

Dependency
Need to incorporate the changes from sonic-net#14127

co-authorized by: [email protected]
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Aug 29, 2024
… based on testbed informaition (sonic-net#14127)

Description of PR
Summary: This PR enhances the logic for port selection for multidut RDMA cases based on the conf-name defined in the testbed.csv / testbed.yaml file. And also a generic fixture for single and multidut topology to get the snappi ports, dut port, asic_type, asic_value information
Fixes # (issue)
sonic-net#13389
sonic-net#13769

Approach
What is the motivation for this PR?
For enhancing the port selection logic and a generic fixture for single and multidut topology

How did you do it?
Added a pytest fixture called get_snappi_ports and get_snappi_ports_for_rdma whcih selects the ports from the information provided in MULTIDUT_PORT_INFO in variables.py and the testbed info as shown below in testbed.csv

vms-snappi-sonic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-sonic-multidut,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
vms-snappi-single-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-multi-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
How did you verify/test it?
Tested the logic on pfc cases

co-authorized by: [email protected]
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202405: #14314

mssonicbld pushed a commit that referenced this pull request Aug 29, 2024
… based on testbed informaition (#14127)

Description of PR
Summary: This PR enhances the logic for port selection for multidut RDMA cases based on the conf-name defined in the testbed.csv / testbed.yaml file. And also a generic fixture for single and multidut topology to get the snappi ports, dut port, asic_type, asic_value information
Fixes # (issue)
#13389
#13769

Approach
What is the motivation for this PR?
For enhancing the port selection logic and a generic fixture for single and multidut topology

How did you do it?
Added a pytest fixture called get_snappi_ports and get_snappi_ports_for_rdma whcih selects the ports from the information provided in MULTIDUT_PORT_INFO in variables.py and the testbed info as shown below in testbed.csv

vms-snappi-sonic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-sonic-multidut,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
vms-snappi-single-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-multi-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
How did you verify/test it?
Tested the logic on pfc cases

co-authorized by: [email protected]
mssonicbld pushed a commit that referenced this pull request Aug 30, 2024
… prio from test_flow for oversubscribtion cases (#14153)

Description of PR
Summary: This PR accomodates the infra change from PR 14127 and separates the flow prio from test_flow
Fixes # (issue)
#14004

Approach
What is the motivation for this PR?
To accomodate the infra change from PR 14127 and separe the flow prio from test_flow

How did you do it?
Assigned single prio to the test flow instead of passing the entire flow priority to the test flow

Dependency
Need to incorporate the changes from #14127

co-authorized by: [email protected]
hdwhdw pushed a commit to hdwhdw/sonic-mgmt that referenced this pull request Sep 20, 2024
… prio from test_flow for oversubscribtion cases (sonic-net#14153)

Description of PR
Summary: This PR accomodates the infra change from PR 14127 and separates the flow prio from test_flow
Fixes # (issue)
sonic-net#14004

Approach
What is the motivation for this PR?
To accomodate the infra change from PR 14127 and separe the flow prio from test_flow

How did you do it?
Assigned single prio to the test flow instead of passing the entire flow priority to the test flow

Dependency
Need to incorporate the changes from sonic-net#14127

co-authorized by: [email protected]
arista-hpandya pushed a commit to arista-hpandya/sonic-mgmt that referenced this pull request Oct 2, 2024
… based on testbed informaition (sonic-net#14127)

Description of PR
Summary: This PR enhances the logic for port selection for multidut RDMA cases based on the conf-name defined in the testbed.csv / testbed.yaml file. And also a generic fixture for single and multidut topology to get the snappi ports, dut port, asic_type, asic_value information
Fixes # (issue)
sonic-net#13389
sonic-net#13769

Approach
What is the motivation for this PR?
For enhancing the port selection logic and a generic fixture for single and multidut topology

How did you do it?
Added a pytest fixture called get_snappi_ports and get_snappi_ports_for_rdma whcih selects the ports from the information provided in MULTIDUT_PORT_INFO in variables.py and the testbed info as shown below in testbed.csv

vms-snappi-sonic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-sonic-multidut,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
vms-snappi-single-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-multi-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
How did you verify/test it?
Tested the logic on pfc cases

co-authorized by: [email protected]
arista-hpandya pushed a commit to arista-hpandya/sonic-mgmt that referenced this pull request Oct 2, 2024
… prio from test_flow for oversubscribtion cases (sonic-net#14153)

Description of PR
Summary: This PR accomodates the infra change from PR 14127 and separates the flow prio from test_flow
Fixes # (issue)
sonic-net#14004

Approach
What is the motivation for this PR?
To accomodate the infra change from PR 14127 and separe the flow prio from test_flow

How did you do it?
Assigned single prio to the test flow instead of passing the entire flow priority to the test flow

Dependency
Need to incorporate the changes from sonic-net#14127

co-authorized by: [email protected]
vikshaw-Nokia pushed a commit to vikshaw-Nokia/sonic-mgmt that referenced this pull request Oct 23, 2024
… based on testbed informaition (sonic-net#14127)

Description of PR
Summary: This PR enhances the logic for port selection for multidut RDMA cases based on the conf-name defined in the testbed.csv / testbed.yaml file. And also a generic fixture for single and multidut topology to get the snappi ports, dut port, asic_type, asic_value information
Fixes # (issue)
sonic-net#13389
sonic-net#13769

Approach
What is the motivation for this PR?
For enhancing the port selection logic and a generic fixture for single and multidut topology

How did you do it?
Added a pytest fixture called get_snappi_ports and get_snappi_ports_for_rdma whcih selects the ports from the information provided in MULTIDUT_PORT_INFO in variables.py and the testbed info as shown below in testbed.csv

vms-snappi-sonic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-sonic-multidut,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
vms-snappi-single-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,sonic-s6100-dut1,snappi-sonic,True,Batman
vms-snappi-multi-dut-multi-asic,vms6-1,ptf64,docker-ptf-snappi,snappi-sonic-ptf,10.36.78.59,,Server_6,,[sonic-s6100-dut1;sonic-s6100-dut2],snappi-sonic,True,Batman
How did you verify/test it?
Tested the logic on pfc cases

co-authorized by: [email protected]
vikshaw-Nokia pushed a commit to vikshaw-Nokia/sonic-mgmt that referenced this pull request Oct 23, 2024
… prio from test_flow for oversubscribtion cases (sonic-net#14153)

Description of PR
Summary: This PR accomodates the infra change from PR 14127 and separates the flow prio from test_flow
Fixes # (issue)
sonic-net#14004

Approach
What is the motivation for this PR?
To accomodate the infra change from PR 14127 and separe the flow prio from test_flow

How did you do it?
Assigned single prio to the test flow instead of passing the entire flow priority to the test flow

Dependency
Need to incorporate the changes from sonic-net#14127

co-authorized by: [email protected]
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.

4 participants