clear: Fix clear queuecounters to also clear VOQ counters#2878
Merged
arlakshm merged 1 commit intosonic-net:masterfrom Aug 11, 2023
Merged
Conversation
Contributor
arlakshm
reviewed
Jun 14, 2023
Contributor
arlakshm
left a comment
There was a problem hiding this comment.
@patrickmacarthur , can you add a unit test for this command
7fa8d13 to
bace4a1
Compare
Contributor
Author
|
/azpw run Semgrep |
Collaborator
|
/AzurePipelines run Semgrep |
|
No pipelines are associated with this pull request. |
Contributor
|
@patrickmacarthur Please merge latest master code to trigger Semgrep. |
bace4a1 to
7e2c286
Compare
7e2c286 to
92cffdf
Compare
1083622 to
92646d7
Compare
Contributor
Author
Contributor
Author
|
Looks like Semgrep succeeded so this is ready for review |
Contributor
|
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
wenyiz2021
approved these changes
Aug 9, 2023
arlakshm
approved these changes
Aug 11, 2023
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 queuecounterswould 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 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)