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

[Snappi] Update test PFC pause frame functionality to include DUT counter polling #9847

Merged
merged 18 commits into from
Oct 2, 2023

Conversation

developfast
Copy link
Contributor

Description of PR

Summary: Currently, all verification for PFC pause frames are done by polling the ixia device at the end of the test. We need to add functionality to poll the appropriate counters on the DUT while the DUT continues to receive PFC pause frames from the neighboring device.

This PR is dependent on #9775.

Fixes (issue) #9843

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

Poll DUT on top on ixia when the test runs

How did you do it?

How did you verify/test it?

Tested on lab device

Any platform specific information?

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

Documentation

@mssonicbld
Copy link
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.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/common/snappi_tests/traffic_generation.py
Fixing tests/snappi_tests/pfc/files/helper.py

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_test_params.py:30:121: E501 line too long (122 > 120 characters)
tests/common/snappi_tests/snappi_test_params.py:33:121: E501 line too long (123 > 120 characters)
tests/common/snappi_tests/snappi_test_params.py:34:121: E501 line too long (124 > 120 characters)
tests/common/snappi_tests/traffic_generation.py:359:121: E501 line too long (139 > 120 characters)
...
[truncated extra lines, please run pre-commit locally to view full check results]

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>

@@ -821,6 +823,42 @@ def get_pfc_frame_count(duthost, port, priority, is_tx=False):
return int(pause_frame_count.replace(',', ''))


def get_tx_frame_count(duthost, port):
Copy link
Contributor

Choose a reason for hiding this comment

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

unify these 2 functions - get_tx_frame_count and get_rx_frame_count

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unified in #9775. this PR is dependent on that PR.

@mssonicbld
Copy link
Collaborator

@developfast PR conflicts with 202012 branch

@mssonicbld
Copy link
Collaborator

@developfast PR conflicts with 202205 branch

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Oct 24, 2023
…nter polling (sonic-net#9847)

Summary: Currently, all verification for PFC pause frames are done by polling the ixia device at the end of the test. We need to add functionality to poll the appropriate counters on the DUT while the DUT continues to receive PFC pause frames from the neighboring device.

This PR is dependent on sonic-net#9775.

Fixes (issue) sonic-net#9843
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202305: #10450

mssonicbld pushed a commit that referenced this pull request Oct 26, 2023
…nter polling (#9847)

Summary: Currently, all verification for PFC pause frames are done by polling the ixia device at the end of the test. We need to add functionality to poll the appropriate counters on the DUT while the DUT continues to receive PFC pause frames from the neighboring device.

This PR is dependent on #9775.

Fixes (issue) #9843
auspham added a commit to auspham/sonic-mgmt that referenced this pull request Jan 28, 2025
…h_snappi

Signed-off-by: Austin Pham <austinpham@microsoft.com>
auspham added a commit to auspham/sonic-mgmt that referenced this pull request Jan 28, 2025
…h_snappi

Signed-off-by: Austin Pham <austinpham@microsoft.com>
auspham added a commit to auspham/sonic-mgmt that referenced this pull request Jan 28, 2025
…h_snappi

Signed-off-by: Austin Pham <austinpham@microsoft.com>
auspham added a commit to auspham/sonic-mgmt that referenced this pull request Jan 28, 2025
chore: migrate sonic-net#15002 to multidut_helper

Signed-off-by: Austin Pham <austinpham@microsoft.com>

chore: fix disable_pfcwd

Signed-off-by: Austin Pham <austinpham@microsoft.com>

chore: migrate sonic-net#9847 to test_multidut_pfc_pause_lossless_with_snappi

Signed-off-by: Austin Pham <austinpham@microsoft.com>
auspham added a commit to auspham/sonic-mgmt that referenced this pull request Jan 28, 2025
chore: migrate sonic-net#11704 to multidut_helper

chore: migrate sonic-net#15002 to multidut_helper

Signed-off-by: Austin Pham <austinpham@microsoft.com>

chore: fix disable_pfcwd

Signed-off-by: Austin Pham <austinpham@microsoft.com>

chore: migrate sonic-net#9847 to test_multidut_pfc_pause_lossless_with_snappi

Signed-off-by: Austin Pham <austinpham@microsoft.com>
auspham added a commit to auspham/sonic-mgmt that referenced this pull request Jan 30, 2025
chore: migrate sonic-net#11704 to multidut_helper

chore: migrate sonic-net#15002 to multidut_helper

Signed-off-by: Austin Pham <austinpham@microsoft.com>

chore: fix disable_pfcwd

Signed-off-by: Austin Pham <austinpham@microsoft.com>

chore: migrate sonic-net#9847 to test_multidut_pfc_pause_lossless_with_snappi

Signed-off-by: Austin Pham <austinpham@microsoft.com>
auspham added a commit to auspham/sonic-mgmt that referenced this pull request Feb 2, 2025
chore: migrate sonic-net#11704 to multidut_helper

chore: migrate sonic-net#15002 to multidut_helper

Signed-off-by: Austin Pham <austinpham@microsoft.com>

chore: fix disable_pfcwd

Signed-off-by: Austin Pham <austinpham@microsoft.com>

chore: migrate sonic-net#9847 to test_multidut_pfc_pause_lossless_with_snappi

Signed-off-by: Austin Pham <austinpham@microsoft.com>
auspham added a commit to auspham/sonic-mgmt that referenced this pull request Feb 3, 2025
chore: migrate sonic-net#11704 to multidut_helper

chore: migrate sonic-net#15002 to multidut_helper

Signed-off-by: Austin Pham <austinpham@microsoft.com>

chore: fix disable_pfcwd

Signed-off-by: Austin Pham <austinpham@microsoft.com>

chore: migrate sonic-net#9847 to test_multidut_pfc_pause_lossless_with_snappi

Signed-off-by: Austin Pham <austinpham@microsoft.com>
auspham added a commit to auspham/sonic-mgmt that referenced this pull request Feb 4, 2025
chore: migrate sonic-net#11704 to multidut_helper

chore: migrate sonic-net#15002 to multidut_helper

Signed-off-by: Austin Pham <austinpham@microsoft.com>

chore: fix disable_pfcwd

Signed-off-by: Austin Pham <austinpham@microsoft.com>

chore: migrate sonic-net#9847 to test_multidut_pfc_pause_lossless_with_snappi

Signed-off-by: Austin Pham <austinpham@microsoft.com>
yejianquan pushed a commit that referenced this pull request Feb 7, 2025
Description of PR
Summary:
Fixes # (issue) 31085729

Migrate the following PR:

[Snappi] Update test PFC pause frame functionality to include DUT counter polling #9847
Fixed the failure of test_valid_pfc_frame_with_snappi.py in Cisco DUT  #15002
[Snappi] Bug fix for checking counters to account for forwarding lag #11704

Approach
What is the motivation for this PR?
Migrate PRs for pfc test cases to t2

Signed-off-by: Austin Pham <austinpham@microsoft.com>
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Feb 7, 2025
Description of PR
Summary:
Fixes # (issue) 31085729

Migrate the following PR:

[Snappi] Update test PFC pause frame functionality to include DUT counter polling sonic-net#9847
Fixed the failure of test_valid_pfc_frame_with_snappi.py in Cisco DUT  sonic-net#15002
[Snappi] Bug fix for checking counters to account for forwarding lag sonic-net#11704

Approach
What is the motivation for this PR?
Migrate PRs for pfc test cases to t2

Signed-off-by: Austin Pham <austinpham@microsoft.com>
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