-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clear: Fix clear queuecounters to also clear VOQ counters #2878
clear: Fix clear queuecounters to also clear VOQ counters #2878
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@patrickmacarthur , can you add a unit test for this command
7fa8d13
to
bace4a1
Compare
/azpw run Semgrep |
/AzurePipelines run Semgrep |
No pipelines are associated with this pull request. |
@patrickmacarthur Please merge latest master code to trigger Semgrep. |
bace4a1
to
7e2c286
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
7e2c286
to
92cffdf
Compare
1083622
to
92646d7
Compare
Looks like Semgrep succeeded so this is ready for review |
can you resolve the conflict. |
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.
92646d7
to
a8b5b5e
Compare
What I did
Fix a bug where the CLI command
sonic-clear queuecounters
would not clear the VOQ counters.fixes sonic-net/sonic-buildimage#15198
How I did it
Added the command to clear the VOQ counters.
How to verify it
show queue counters
andshow queue counters --voq
to 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)