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

Update WRR test to support qos remapping #6737

Merged
merged 3 commits into from
Nov 11, 2022

Conversation

bingwang-ms
Copy link
Collaborator

Description of PR

Summary:
Fixes # (issue)
This PR is to update testQosSaiDwrr to support qos remapping scenario.
When qos remapping is enabled, the QoS map is different from before.
When the remap is enabled, we have below map

DSCP TC QUEUE
3    3    3
4    4    4
8    0    0
0    1    1
46   5    5
48   7    7

So the test script need to be updated.

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?

This PR is to update testQosSaiDwrr to support qos remapping scenario.

How did you do it?

Update test script to to use different testing DSCP values.

How did you verify/test it?

Verified on an Arista-7050cx3 dualtor testbed.

collected 1 item                                                                                                                                                                                      

qos/test_qos_sai.py::TestQosSai::testQosSaiDwrr[None] PASSED                                                                                                                                    [100%]

Any platform specific information?

No.

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

No.

Documentation

@azure-pipelines
Copy link

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/qos/qos_sai_base.py
Fixing tests/qos/files/qos.yml
Fixing tests/qos/test_qos_sai.py

fix end of files.........................................................Passed
check yaml...............................................................Failed
- hook id: check-yaml
- exit code: 1

while constructing a mapping
in "tests/qos/files/qos.yml", line 2540, column 13
found duplicate key "ecn_1" with value "{}" (original value: "{}")
in "tests/qos/files/qos.yml", line 2793, column 13

To suppress this check see:
...
[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>

@lgtm-com
Copy link

lgtm-com bot commented Nov 4, 2022

This pull request introduces 1 alert when merging d24fcd1 into 5990a18 - view on LGTM.com

new alerts:

  • 1 for Unused import

@azure-pipelines
Copy link

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tests/qos/qos_sai_base.py
Fixing tests/qos/files/qos.yml

fix end of files.........................................................Passed
check yaml...............................................................Failed
- hook id: check-yaml
- exit code: 1

while constructing a mapping
in "tests/qos/files/qos.yml", line 2720, column 13
found duplicate key "ecn_1" with value "{}" (original value: "{}")
in "tests/qos/files/qos.yml", line 2973, column 13

To suppress this check see:
http://yaml.readthedocs.io/en/latest/api.html#duplicate-keys
...
[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>

@lgtm-com
Copy link

lgtm-com bot commented Nov 7, 2022

This pull request introduces 1 alert when merging 72fc936 into f5cca01 - view on LGTM.com

new alerts:

  • 1 for Unused import

@bingwang-ms
Copy link
Collaborator Author

The change is verified on dualtor and T1 testbed, with and without remap.

@bingwang-ms bingwang-ms merged commit 88a1c3b into sonic-net:master Nov 11, 2022
wangxin pushed a commit that referenced this pull request Nov 11, 2022
* Update WRR test to support qos remapping
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