[HLD][QoS] WRED and ECN statistics: VOQ-chassis support#2428
Merged
vmittal-msft merged 3 commits intoJul 9, 2026
Conversation
Update the WRED/ECN statistics HLD to describe VOQ-chassis handling. The corresponding code change landed in sonic-net/sonic-swss#4545. - Revision row 0.2 added. - FLEX_COUNTER_DB: register a per-queue-type WRED stat list. Egress queues (SAI_QUEUE_TYPE_UNICAST/MULTICAST/ALL) register all 4 stats (drops + ECN-marked). VOQ objects (UNICAST_VOQ) register only WRED_DROPPED_*, since WRED_ECN_MARKED_* describes an egress-side action and is not exposed on the ingress VOQ. - COUNTERS_DB: document the additional per-VOQ entries on VOQ- chassis platforms. - Orchagent: describe the additional VOQ registration when the switch type is `voq`, and note that VOQ-object counters are always enabled on VOQ-chassis (no per-queue counter-enabled gating). - CLI: add `show queue wredcounters --voq [interface-name]` to the list of new commands and add a "CLI output on a VOQ-chassis platform" example showing WRED-drop rows and N/A in the EcnMarked columns. Refs: sonic-net/sonic-swss#4544, sonic-net/sonic-swss#4545 Signed-off-by: arawat <arawat@nexthop.ai>
Collaborator
|
/azp run |
|
No pipelines are associated with this pull request. |
|
@vmittal-msft @abdosi @prsunny Kindly review this updated HLD for wred stats for VOQ systems. |
There was a problem hiding this comment.
Pull request overview
Updates the existing QoS HLD (doc/qos/ECN_and_WRED_statistics_HLD.md) to accurately describe WRED/ECN statistics behavior on VOQ-chassis platforms, aligning the design document with the already-merged implementation behavior.
Changes:
- Adds a new revision entry and documents VOQ-chassis-specific behavior/constraints for ECN-marked vs WRED-dropped queue stats.
- Clarifies FLEX_COUNTER_DB registration to be queue-type specific (egress queues vs VOQ objects).
- Expands COUNTERS_DB and CLI sections with VOQ-object counters and an example
show queue wredcounters --voqoutput section.
vmittal-msft
reviewed
Jul 1, 2026
vmittal-msft
previously approved these changes
Jul 1, 2026
- Fix Table of Contents anchor case for the "WRED and ECN queue statistics supported platform" section. GitHub-generated heading IDs are all-lowercase; the fragment used an uppercase `-ECN-` which did not resolve. (Copilot review comment.) - Extend the "CLI output on a VOQ-chassis platform" subsection with a `show queue wredcounters` (no --voq) example. On VOQ-chassis the two views are complementary: the egress-queue view shows ECN-marked packets, and the --voq view shows WRED drops. Show both. (vmittal-msft review comment.) - Document `sonic-clear queue wredcounters --voq` alongside the new `--voq` show variant. This is the counterpart clear command landed in sonic-net/sonic-utilities#4662. (venky-nexthop review comment.) Signed-off-by: arawat <arawat@nexthop.ai>
Collaborator
|
/azp run |
|
No pipelines are associated with this pull request. |
venky-nexthop
approved these changes
Jul 6, 2026
Follow-up to the review round: add a "Clear CLI output on a VOQ-chassis platform" subsection under CLI Changes that shows example output from both `sonic-clear queue wredcounters` and its `--voq` variant. Matches the pattern of the existing "CLI output on ..." subsections (which so far only covered show commands) and mirrors the two show forms already documented for VOQ chassis. The `--voq` variant of `sonic-clear queue wredcounters` is added in sonic-net/sonic-utilities#4662. Also add the matching Table-of-Contents entry. Signed-off-by: arawat <arawat@nexthop.ai>
Collaborator
|
/azp run |
|
No pipelines are associated with this pull request. |
vmittal-msft
approved these changes
Jul 9, 2026
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Update
doc/qos/ECN_and_WRED_statistics_HLD.mdto describe how theWRED and ECN statistics feature behaves on VOQ-chassis platforms.
Why
The original HLD (0.1, Feb 2023) predates broad VOQ-chassis support
and describes a single 4-stat WRED queue stat list registered
uniformly against every queue OID. On VOQ-chassis platforms this
causes two problems:
(
SAI_QUEUE_TYPE_UNICAST_VOQ), not the egress queue object.Without per-VOQ registration, WRED drop counters never reach
COUNTERS_DB and
show queue wredcounters --voqreturns nothinguseful.
SAI_QUEUE_STAT_WRED_ECN_MARKED_*describes packets transmittedwith the CE bit set — an egress-side action — and is not
architecturally exposed on a VOQ object. Registering the ECN-
marked stat IDs against a VOQ object causes the SAI bulk
getStatscall to returnSAI_STATUS_NOT_SUPPORTEDandFlexCounter aborts the whole bulk, so even the WRED-drop stats
that are valid on a VOQ never reach COUNTERS_DB.
The code change to close both gaps landed in
sonic-net/sonic-swss#4545 (issue
sonic-net/sonic-swss#4544). This HLD
update brings the design document into line with the code.
Changes in this PR
egress queues get all 4 stats; VOQ objects get only
WRED_DROPPED_*.VOQ-chassis platforms.
switch_type == voq, and note that VOQ-object counters arealways enabled on VOQ-chassis platforms.
show queue wredcounters --voq [interface-name]in the list of new commands and add a "CLI output on a VOQ-
chassis platform" subsection with example output.
Diff
+46 / -7indoc/qos/ECN_and_WRED_statistics_HLD.md.Refs