You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description (updated after upstream code analysis)
show queue wredcounters --voq returns no useful data on
VOQ-chassis platforms. Two distinct gaps in upstream SwSS combine
to cause this:
Gap 1: VOQ OIDs are never registered for WRED stats
PortsOrch::addWredQueueFlexCounters only iterates port.m_queue_ids (egress queue OIDs) and never registers
per-port VOQ OIDs (m_port_voq_ids) with the WRED flex counter
group. So VOQ rows have nothing to display, even on platforms
whose SAI fully supports WRED counters at the VOQ object.
Gap 2: A naive VOQ-OID registration trips on ECN_MARKED stats
The shared 4-stat list registered today contains both:
SAI_QUEUE_STAT_WRED_DROPPED_PACKETS / _BYTES
SAI_QUEUE_STAT_WRED_ECN_MARKED_PACKETS / _BYTES
SAI_QUEUE_STAT_WRED_ECN_MARKED_* describes packets transmitted
with the CE bit set — an egress-side action. On a queue of type SAI_QUEUE_TYPE_UNICAST_VOQ this counter is not architecturally
exposed; ECN marking on VOQ-chassis platforms is reported at the
egress queue object, not at the ingress VOQ.
When a SAI implementation is asked for an unsupported stat as part
of a bulk read it typically returns SAI_STATUS_NOT_SUPPORTED,
which makes FlexCounter abort the entire bulk for that queue. Any
fix for Gap 1 that re-uses the existing 4-stat list will therefore
result in N/A across all four columns instead of working
WRED-drop counters.
So fixing Gap 1 alone is not enough — the registration must also
be split per queue type so that VOQ OIDs only get the WRED_DROPPED_* stats.
Steps to reproduce
Bring up SONiC on a VOQ-chassis platform (linecard).
Apply a WRED profile to a queue (e.g. lossless egress queue).
Run show queue wredcounters --voq.
Observe: VOQ rows print blanks/N/A because no WRED stats are
ever registered against the VOQ OIDs.
If a downstream branch adds VOQ OID registration on top of the
existing single 4-stat list, step 4 instead shows N/A in all
four columns due to Gap 2.
Expected after fix
show queue wredcounters --voq shows numeric values (initially 0) for WredDrp/pkts and WredDrp/bytes on each VOQ row.
EcnMarked/* columns show N/A for VOQ rows (the counter is
not valid on a VOQ object).
show queue wredcounters (egress) is unchanged on all
platforms.
Possible fix shapes
Register VOQ OIDs + split the stat list per queue type.
Wire m_port_voq_ids into the WRED flex counter group when gMySwitchType == \"voq\".
Maintain two stat lists in PortsOrch — one for egress queues
(all 4) and one for VOQ queues (only WRED_DROPPED_*) — and
pick the right one based on the existing voq flag in addWredQueueFlexCountersPerPortPerQueueIndex.
Description (updated after upstream code analysis)
show queue wredcounters --voqreturns no useful data onVOQ-chassis platforms. Two distinct gaps in upstream SwSS combine
to cause this:
Gap 1: VOQ OIDs are never registered for WRED stats
PortsOrch::addWredQueueFlexCountersonly iteratesport.m_queue_ids(egress queue OIDs) and never registersper-port VOQ OIDs (
m_port_voq_ids) with the WRED flex countergroup. So VOQ rows have nothing to display, even on platforms
whose SAI fully supports WRED counters at the VOQ object.
Gap 2: A naive VOQ-OID registration trips on ECN_MARKED stats
The shared 4-stat list registered today contains both:
SAI_QUEUE_STAT_WRED_DROPPED_PACKETS/_BYTESSAI_QUEUE_STAT_WRED_ECN_MARKED_PACKETS/_BYTESSAI_QUEUE_STAT_WRED_ECN_MARKED_*describes packets transmittedwith the CE bit set — an egress-side action. On a queue of type
SAI_QUEUE_TYPE_UNICAST_VOQthis counter is not architecturallyexposed; ECN marking on VOQ-chassis platforms is reported at the
egress queue object, not at the ingress VOQ.
When a SAI implementation is asked for an unsupported stat as part
of a bulk read it typically returns
SAI_STATUS_NOT_SUPPORTED,which makes FlexCounter abort the entire bulk for that queue. Any
fix for Gap 1 that re-uses the existing 4-stat list will therefore
result in
N/Aacross all four columns instead of workingWRED-drop counters.
So fixing Gap 1 alone is not enough — the registration must also
be split per queue type so that VOQ OIDs only get the
WRED_DROPPED_*stats.Steps to reproduce
show queue wredcounters --voq.N/Abecause no WRED stats areever registered against the VOQ OIDs.
If a downstream branch adds VOQ OID registration on top of the
existing single 4-stat list, step 4 instead shows
N/Ain allfour columns due to Gap 2.
Expected after fix
show queue wredcounters --voqshows numeric values (initially0) forWredDrp/pktsandWredDrp/byteson each VOQ row.EcnMarked/*columns showN/Afor VOQ rows (the counter isnot valid on a VOQ object).
show queue wredcounters(egress) is unchanged on allplatforms.
Possible fix shapes
Register VOQ OIDs + split the stat list per queue type.
m_port_voq_idsinto the WRED flex counter group whengMySwitchType == \"voq\".(all 4) and one for VOQ queues (only
WRED_DROPPED_*) — andpick the right one based on the existing
voqflag inaddWredQueueFlexCountersPerPortPerQueueIndex.Smallest change; matches current SAI semantics.
PR [orchagent] WRED queue counters on VOQ-chassis platforms: split stat list + register on VOQ OIDs #4545 implements this.
Affected releases
group was added.
WRED_ECN_MARKED_*was added towred_queue_stat_ids(202405 onwards).