[202205] clear: Fix clear queuecounters to also clear VOQ counters#2879
Merged
yxieca merged 1 commit intosonic-net:202205from Aug 17, 2023
Merged
Conversation
Contributor
The `sonic-clear queuecounters` command does not currently clear VOQ counters. Fix it and add a unit test to verify that the VOQ counters were actually cleared. The unit test changes required some updates to the VOQ counters tests, because on an actual DUT the VOQ counter uses fully-qualified interface names (dut|asic|port) whereas the queue counters just use the port name. The unit tests had kept the names the same but this meant that the saved counters for VOQ and non-VOQ counters would overwrite each other when the counters were cleared during the unit tests. Qualify the interface names used in the VOQ unit tests to avoid this.
f1af1db to
f66775b
Compare
arlakshm
approved these changes
Aug 16, 2023
Contributor
|
MSFT ADO 24865273 |
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 I did
Fix a bug where the CLI command sonic-clear queuecounters would not clear the VOQ counters.
This is a manual backport of #2878 to 202205 due to a change in the syntax used by
run_command.How I did it
Added the command to clear the VOQ counters.
How to verify it
show queue countersandshow queue counters --voqto verify that the counters are non-zero.sonic-clear queuecounters.Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)