Skip to content
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

[202205] clear: Fix clear queuecounters to also clear VOQ counters #2879

Merged

Conversation

patrickmacarthur
Copy link
Contributor

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

  1. Start traffic on an interface on a specific queue.
  2. Use show queue counters and show queue counters --voq to verify that the counters are non-zero.
  3. Stop traffic on the interface.
  4. Run sonic-clear queuecounters.
  5. Repeat the show commands and ensure that the counters have been reset.

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)

@kenneth-arista
Copy link
Contributor

@wenyiz2021 @arlakshm

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.
@patrickmacarthur patrickmacarthur force-pushed the 202205-fix-clear-queue-counters branch from f1af1db to f66775b Compare June 20, 2023 20:16
@maipbui maipbui requested review from arlakshm and wenyiz2021 June 29, 2023 17:22
Copy link
Contributor

@wenyiz2021 wenyiz2021 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM..

@arlakshm
Copy link
Contributor

MSFT ADO 24865273

@yxieca yxieca merged commit 56a1ae2 into sonic-net:202205 Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants