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

T2/snappi: Use natsort instead of sort for sorting the asic list in disable_pfcwd and enable_pfcwd functions. #16176

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

rraghav-cisco
Copy link
Contributor

Description of PR

Summary:
Even after #15863, the problem is still seen in RP. The issue is that the sort() function only sorts alphabetically, not numerically. So we need to use natsort module instead of normal sort() in these functions.

Type of change

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

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

Seeing a lot of loganalyzer messages, but in RP only.

How did you do it?

Change sort to natsort().

How did you verify/test it?

Running in my TB, I don't see the LA error anymore.

Any platform specific information?

T2 mAsic only.

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rraghav-cisco
Copy link
Contributor Author

@sdszhang , @auspham: FYI.

Copy link
Contributor

@sdszhang sdszhang left a comment

Choose a reason for hiding this comment

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

LGTM

@yejianquan yejianquan merged commit 4dfcdc9 into sonic-net:master Jan 1, 2025
19 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 1, 2025
…d and enable_pfcwd functions. (sonic-net#16176)

Description of PR
Summary:
Even after sonic-net#15863, the problem is still seen in RP. The issue is that the sort() function only sorts alphabetically, not numerically. So we need to use natsort module instead of normal sort() in these functions.

Approach
What is the motivation for this PR?
Seeing a lot of loganalyzer messages, but in RP only.

How did you do it?
Change sort to natsort().

How did you verify/test it?
Running in my TB, I don't see the LA error anymore.

Any platform specific information?
T2 mAsic only.

co-authorized by: jianquanye@microsoft.com
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411: #16276

mssonicbld pushed a commit that referenced this pull request Jan 2, 2025
…d and enable_pfcwd functions. (#16176)

Description of PR
Summary:
Even after #15863, the problem is still seen in RP. The issue is that the sort() function only sorts alphabetically, not numerically. So we need to use natsort module instead of normal sort() in these functions.

Approach
What is the motivation for this PR?
Seeing a lot of loganalyzer messages, but in RP only.

How did you do it?
Change sort to natsort().

How did you verify/test it?
Running in my TB, I don't see the LA error anymore.

Any platform specific information?
T2 mAsic only.

co-authorized by: jianquanye@microsoft.com
@sdszhang
Copy link
Contributor

sdszhang commented Jan 2, 2025

Chassis output:

snappi_tests/multidut/pfcwd/test_multidut_pfcwd_basic_with_snappi.py::test_pfcwd_basic_single_lossless_prio[multidut_port_info0-False] PASSED [  5%]
snappi_tests/multidut/pfcwd/test_multidut_pfcwd_basic_with_snappi.py::test_pfcwd_basic_single_lossless_prio[multidut_port_info1-True] PASSED [  7%]
snappi_tests/multidut/pfcwd/test_multidut_pfcwd_basic_with_snappi.py::test_pfcwd_basic_single_lossless_prio[multidut_port_info1-False] PASSED [ 10%]
snappi_tests/multidut/pfcwd/test_multidut_pfcwd_basic_with_snappi.py::test_pfcwd_basic_multi_lossless_prio[multidut_port_info0-True] PASSED [ 12%]
snappi_tests/multidut/pfcwd/test_multidut_pfcwd_basic_with_snappi.py::test_pfcwd_basic_multi_lossless_prio[multidut_port_info0-False] PASSED [ 15%]
snappi_tests/multidut/pfcwd/test_multidut_pfcwd_basic_with_snappi.py::test_pfcwd_basic_multi_lossless_prio[multidut_port_info1-True] PASSED [ 17%]
snappi_tests/multidut/pfcwd/test_multidut_pfcwd_basic_with_snappi.py::test_pfcwd_basic_multi_lossless_prio[multidut_port_info1-False] PASSED [ 20%]

T0/T1 testbed are being used for other purpose, not able to verify it on T0/T1. As T0/T1 is using single ASIC, this change should not affect them.

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 2, 2025
…d and enable_pfcwd functions. (sonic-net#16176)

Description of PR
Summary:
Even after sonic-net#15863, the problem is still seen in RP. The issue is that the sort() function only sorts alphabetically, not numerically. So we need to use natsort module instead of normal sort() in these functions.

Approach
What is the motivation for this PR?
Seeing a lot of loganalyzer messages, but in RP only.

How did you do it?
Change sort to natsort().

How did you verify/test it?
Running in my TB, I don't see the LA error anymore.

Any platform specific information?
T2 mAsic only.

co-authorized by: jianquanye@microsoft.com
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #16291

mssonicbld pushed a commit that referenced this pull request Jan 2, 2025
…d and enable_pfcwd functions. (#16176)

Description of PR
Summary:
Even after #15863, the problem is still seen in RP. The issue is that the sort() function only sorts alphabetically, not numerically. So we need to use natsort module instead of normal sort() in these functions.

Approach
What is the motivation for this PR?
Seeing a lot of loganalyzer messages, but in RP only.

How did you do it?
Change sort to natsort().

How did you verify/test it?
Running in my TB, I don't see the LA error anymore.

Any platform specific information?
T2 mAsic only.

co-authorized by: jianquanye@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.

6 participants