[Nexthop] Clear egress queue stats for all port queues, not just the configured… - #1613
Open
vvasavada-nexthop wants to merge 1 commit into
Open
[Nexthop] Clear egress queue stats for all port queues, not just the configured…#1613vvasavada-nexthop wants to merge 1 commit into
vvasavada-nexthop wants to merge 1 commit into
Conversation
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.
… ones
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
Root cause
clear interface countersreported success but left per-interfaceOutput Discardsunchanged, whileInput Discardson the same port cleared correctly.SaiPortManager::clearStatsclears the port level counters and then the egress queue drop counters, but it only walkedportHandle->configuredQueues. That list is built from theSwtichStateport queue config, andBroadcomXgsAsic::getQueueStreamTypes(INTERFACE_PORT)returns{UNICAST}- so the multicast queues, which exist in HW and are present in SAI'sQOS_QUEUE_LIST(and therefore inportHandle->queues), were never in it.On XGS the port level
SAI_PORT_STAT_IF_OUT_DISCARDSis derived from the sum of the per queue drop counters across every queue, so any queue left out of the clear pinsHwPortStats::outDiscards_at a non-zero value indefinitely. Drops parked on multicast queue - flooded BUM traffic, e.g. a port that is the sole member of its VLAN - therefore survived the clear.Input Discardswas unaffected beforeinDiscards_is accumulated in software and explicitly zeroed inclearStats, which masks the same behavior on the ingress size.Fix
Iterate
portHandle->queuesinstead.Test Plan
Before fix
After fix