Skip to content

Strict priority QOS test.#21051

Merged
vmittal-msft merged 4 commits intosonic-net:masterfrom
nexthop-ai:strict_priority_test
Mar 12, 2026
Merged

Strict priority QOS test.#21051
vmittal-msft merged 4 commits intosonic-net:masterfrom
nexthop-ai:strict_priority_test

Conversation

@abhishek-nexthop
Copy link
Copy Markdown
Contributor

@abhishek-nexthop abhishek-nexthop commented Oct 22, 2025

Description of PR

Summary:
Add a new comprehensive rate limiting test for QoS validation in SONiC. The test validates CIR (Committed Information Rate) and PIR (Peak Information Rate) rate limiting functionality by generating traffic and validating drop behavior under different traffic conditions.]
Fixing #21052

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

What is the motivation for this PR?

Validate Strict priority scheduler

How did you do it?

  • Created StrictPriorityRateLimitingDriver class to manage test flow
  • Used Redis commands to configure scheduler policies with CIR/PIR rates
  • Added direct PTF traffic generation with precise rate control
  • Added counter-based validation using sonic-clear counters and interface statistics
  • Implemented comprehensive cleanup with QoS reload
  • Implemented three-phase testing: baseline (no limits), low traffic (within limits), high traffic (exceeding limits)

How did you verify/test it?

  • Validates baseline traffic has minimal drops without rate limiting
  • Confirms low traffic within CIR limits passes without drops
  • Verifies high traffic exceeding PIR limits triggers appropriate packet drops
  • Uses interface TX_DRP counters for drop validation with configurable thresholds

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Oct 22, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@abhishek-nexthop abhishek-nexthop marked this pull request as ready for review October 24, 2025 08:36
@pinky-nexthop
Copy link
Copy Markdown
Contributor

@vmittal-msft
Kindly review this new test. Thanks.

Copy link
Copy Markdown
Contributor

@vmittal-msft vmittal-msft left a comment

Choose a reason for hiding this comment

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

@abhishek-nexthop Few things -

  1. I see that interface counters is used to check drop counters. I believe we should use queue counters to check if higher priority traffic goes out at expense of low priority traffic. Please confirm if i am mistaken.
  2. I see this is only supported for TH5 and not for Q3D. Can we add ? We can add github issue for extending this support later.
  3. Does these changes support single asic as well as multi asic scenarios ?
  4. I feel we may not be able to generate high enough traffic to test via PTF to test various load. Please add snappi test requirement/test gap for the same.

@abhishek-nexthop
Copy link
Copy Markdown
Contributor Author

abhishek-nexthop commented Dec 17, 2025

@vmittal-msft

  1. I see that interface counters is used to check drop counters. I believe we should use queue counters to check if higher priority traffic goes out at expense of low priority traffic. Please confirm if i am mistaken.
    For this workflow, we are only validating whether PIR and CIR are working as expected. Therefore, we use a single queue, send traffic to that queue, and check for any packet drops. Since there is only one type of traffic, it is not necessary to identify which queue is experiencing the drop.
  2. I see this is only supported for TH5 and not for Q3D. Can we add ? We can add github issue for extending this support later.
    Yes Q3D is in pipeline, we are working on it and will add the code soon.
  3. Does these changes support single asic as well as multi asic scenarios ?
    Yes it only supports single asic configuration.
  4. I feel we may not be able to generate high enough traffic to test via PTF to test various load. Please add snappi test requirement/test gap for the same.
    As we are testing functionality only, we used PTF and smaller limits (within MB). Do we also need to have a similar snappi test?

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@vmittal-msft
Copy link
Copy Markdown
Contributor

@vmittal-msft

  1. I see that interface counters is used to check drop counters. I believe we should use queue counters to check if higher priority traffic goes out at expense of low priority traffic. Please confirm if i am mistaken.
    For this workflow, we are only validating whether PIR and CIR are working as expected. Therefore, we use a single queue, send traffic to that queue, and check for any packet drops. Since there is only one type of traffic, it is not necessary to identify which queue is experiencing the drop.
  2. I see this is only supported for TH5 and not for Q3D. Can we add ? We can add github issue for extending this support later.
    Yes Q3D is in pipeline, we are working on it and will add the code soon.
  3. Does these changes support single asic as well as multi asic scenarios ?
    Yes it only supports single asic configuration.
  4. I feel we may not be able to generate high enough traffic to test via PTF to test various load. Please add snappi test requirement/test gap for the same.
    As we are testing functionality only, we used PTF and smaller limits (within MB). Do we also need to have a similar snappi test?

@abhishek-nexthop

  1. Yes i feel testing with ixia is better way to test this.
  2. Please use this as base pr for strict priority scheduling support and add test for verifying strict priority scheudling across multiple TCs including lossy as well as lossless. please open a github issue and tag here.
  3. please tag PR for Q3D support here
  4. Is this extensible to multi asic support ?

vmittal-msft
vmittal-msft previously approved these changes Feb 5, 2026
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@github-actions github-actions bot requested a review from vmittal-msft February 6, 2026 03:12
@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@github-actions github-actions bot requested review from sdszhang and wangxin February 6, 2026 03:36
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@vmittal-msft vmittal-msft added Request for 202511 branch Request to backport a change to 202511 branch Approved for 202511 branch labels Feb 26, 2026
@abhishek-nexthop
Copy link
Copy Markdown
Contributor Author

@vmittal-msft

  1. I see that interface counters is used to check drop counters. I believe we should use queue counters to check if higher priority traffic goes out at expense of low priority traffic. Please confirm if i am mistaken.
    For this workflow, we are only validating whether PIR and CIR are working as expected. Therefore, we use a single queue, send traffic to that queue, and check for any packet drops. Since there is only one type of traffic, it is not necessary to identify which queue is experiencing the drop.
  2. I see this is only supported for TH5 and not for Q3D. Can we add ? We can add github issue for extending this support later.
    Yes Q3D is in pipeline, we are working on it and will add the code soon.
  3. Does these changes support single asic as well as multi asic scenarios ?
    Yes it only supports single asic configuration.
  4. I feel we may not be able to generate high enough traffic to test via PTF to test various load. Please add snappi test requirement/test gap for the same.
    As we are testing functionality only, we used PTF and smaller limits (within MB). Do we also need to have a similar snappi test?

@abhishek-nexthop

  1. Yes i feel testing with ixia is better way to test this.
  2. Please use this as base pr for strict priority scheduling support and add test for verifying strict priority scheudling across multiple TCs including lossy as well as lossless. please open a github issue and tag here.
  3. please tag PR for Q3D support here
  4. Is this extensible to multi asic support ?
  1. Yes, but we need something that can run continuously in sonic-mgmt, which is why we are working on a PTF-based test.
  2. Here is issue for extending the testcase: Enhancement: Add new testcase to verify default strict priority #22405
  3. The Q3D code is already included in this PR (it supports both TH5 and Q3D).
  4. Yes, the code can be extended to support multi-ASIC setups.

@vmittal-msft vmittal-msft merged commit 17e0da8 into sonic-net:master Mar 12, 2026
24 checks passed
@mssonicbld
Copy link
Copy Markdown
Collaborator

@abhishek-nexthop PR conflicts with 202511 branch

selldinesh pushed a commit to selldinesh/sonic-mgmt that referenced this pull request Mar 16, 2026
* Strict priority QOS test.

Signed-off-by: Abhishek <[email protected]>

* Add q3d and portchannel support for strict priority.

Signed-off-by: Abhishek <[email protected]>

* Fix per-commit and missing function.

Signed-off-by: Abhishek <[email protected]>

---------

Signed-off-by: Abhishek <[email protected]>
Signed-off-by: selldinesh <[email protected]>
abhishek-nexthop added a commit to nexthop-ai/sonic-mgmt that referenced this pull request Mar 17, 2026
* Strict priority QOS test.

Signed-off-by: Abhishek <[email protected]>

* Add q3d and portchannel support for strict priority.

Signed-off-by: Abhishek <[email protected]>

* Fix per-commit and missing function.

Signed-off-by: Abhishek <[email protected]>

---------

Signed-off-by: Abhishek <[email protected]>
abhishek-nexthop added a commit to nexthop-ai/sonic-mgmt that referenced this pull request Mar 18, 2026
* Strict priority QOS test.

Signed-off-by: Abhishek <[email protected]>

* Add q3d and portchannel support for strict priority.

Signed-off-by: Abhishek <[email protected]>

* Fix per-commit and missing function.

Signed-off-by: Abhishek <[email protected]>

---------

Signed-off-by: Abhishek <[email protected]>
@YatishSVC
Copy link
Copy Markdown
Contributor

Hi @abhishek-nexthop, looks like there are conflicts with the 202511 branch, can you please help with those?
Thanks.

@pinky-nexthop
Copy link
Copy Markdown
Contributor

Hi @abhishek-nexthop, looks like there are conflicts with the 202511 branch, can you please help with those? Thanks.

@YatishSVC : Abhishek is working on it. Will share the PR link once it is raised.

vrajeshe pushed a commit to vrajeshe/sonic-mgmt that referenced this pull request Mar 23, 2026
* Strict priority QOS test.

Signed-off-by: Abhishek <[email protected]>

* Add q3d and portchannel support for strict priority.

Signed-off-by: Abhishek <[email protected]>

* Fix per-commit and missing function.

Signed-off-by: Abhishek <[email protected]>

---------

Signed-off-by: Abhishek <[email protected]>
Signed-off-by: Venkata Gouri Rajesh Etla <[email protected]>
venu-nexthop added a commit to nexthop-ai/sonic-mgmt that referenced this pull request Mar 24, 2026
venu-nexthop added a commit to nexthop-ai/sonic-mgmt that referenced this pull request Mar 25, 2026
This reverts commit 88c7897.

Signed-off-by: venu-nexthop <[email protected]>
vmittal-msft pushed a commit that referenced this pull request Mar 26, 2026
* Strict priority QOS test. (#21051)

* Strict priority QOS test.

Signed-off-by: Abhishek <[email protected]>

* Add q3d and portchannel support for strict priority.

Signed-off-by: Abhishek <[email protected]>

* Fix per-commit and missing function.

Signed-off-by: Abhishek <[email protected]>

---------

Signed-off-by: Abhishek <[email protected]>

* [backport][202511] reliable tsa tests are now skipped on single asic voq duts

reliable tsa tests require two duthosts: one as supe and one as LC single asic voq dut have only one duthost, hence reliable tsa tests are skipped
backporting #22089

Signed-off-by: Saravanan Sellappa <[email protected]>

* Revert "Strict priority QOS test. (#21051)"

This reverts commit 88c7897.

Signed-off-by: venu-nexthop <[email protected]>

* Revert "[backport][202511] reliable tsa tests are now skipped on single asic voq duts"

This reverts commit 66748e6.

Signed-off-by: venu-nexthop <[email protected]>

* Back porting #22224 to 202511

Signed-off-by: venu-nexthop <[email protected]>

---------

Signed-off-by: Abhishek <[email protected]>
Signed-off-by: Saravanan Sellappa <[email protected]>
Signed-off-by: venu-nexthop <[email protected]>
Co-authored-by: abhishek-nexthop <[email protected]>
Co-authored-by: saravanan sellappa <[email protected]>
ravaliyel pushed a commit to ravaliyel/sonic-mgmt that referenced this pull request Mar 27, 2026
* Strict priority QOS test.

Signed-off-by: Abhishek <[email protected]>

* Add q3d and portchannel support for strict priority.

Signed-off-by: Abhishek <[email protected]>

* Fix per-commit and missing function.

Signed-off-by: Abhishek <[email protected]>

---------

Signed-off-by: Abhishek <[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.

6 participants