Skip to content

Add CLI support for configurable drop counters#688

Merged
yxieca merged 12 commits intosonic-net:masterfrom
daall:drop_counter_cli
Nov 19, 2019
Merged

Add CLI support for configurable drop counters#688
yxieca merged 12 commits intosonic-net:masterfrom
daall:drop_counter_cli

Conversation

@daall
Copy link
Copy Markdown
Contributor

@daall daall commented Oct 1, 2019

Add CLI support for configurable drop counters

  • Adds dropconfig script to configure drop counters
  • Adds dropstat script to show and clear drop counters
  • Adds handlers for drop counters to show, config, and sonic-clear

New command output (if the output of a command-line utility has changed)

  • A command reference update has been provided

Details if related
Depends on:

Signed-off-by: Danny Allen [email protected]

@daall
Copy link
Copy Markdown
Contributor Author

daall commented Oct 2, 2019

I got some feedback on the behavior of the scripts that I wanted to note here:

  • It would be helpful to print the descriptions for the counters in the header of show drops counts so that users know what they're looking at

Because drop reasons are very platform specific it would probably be good to include the check for supported counters and drop reasons at this stage and work with the platform vendors to support the query APIs along with the drop counters (addressed below)

@daall daall marked this pull request as ready for review October 3, 2019 22:08
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do user need to reset the drop counter explicitly when drop_reasons are added/removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch! I don't believe the counter gets cleared when drop reasons are added and removed from the counter but I need to verify.

Copy link
Copy Markdown
Contributor Author

@daall daall Nov 5, 2019

Choose a reason for hiding this comment

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

They don't appear to be automatically cleared when drop reasons are added/removed. Do you have any concerns with this approach?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The counters are cleared when drop reasons are added and removed.

@lguohan
Copy link
Copy Markdown
Contributor

lguohan commented Oct 18, 2019

can you follow example here to add unit test for your show command.

https://github.com/Azure/sonic-utilities/tree/master/sonic-utilities-tests

Copy link
Copy Markdown
Contributor

@lguohan lguohan left a comment

Choose a reason for hiding this comment

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

need unit test for show commands

@daall daall requested a review from jleveque October 29, 2019 18:35
@wendani wendani requested a review from qiluo-msft October 30, 2019 07:50
Copy link
Copy Markdown
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

commented

@daall
Copy link
Copy Markdown
Contributor Author

daall commented Nov 5, 2019

need unit test for show commands

added!

daall added 5 commits November 5, 2019 09:46
- Adds dropconfig script to configure drop counters
- Adds dropstat script to show and clear drop counters
- Adds handlers for drop counters to show, config, and sonic-clear

Signed-off-by: Danny Allen <[email protected]>
@daall
Copy link
Copy Markdown
Contributor Author

daall commented Nov 5, 2019

retest this please

Copy link
Copy Markdown
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

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

Looks good to me. Please check other review comments.
In future, please minimize force-push, because we are using internal tool to compare between iterations, and force push will lose comment context.

@daall
Copy link
Copy Markdown
Contributor Author

daall commented Nov 5, 2019

Looks good to me. Please check other review comments.
In future, please minimize force-push, because we are using internal tool to compare between iterations, and force push will lose comment context.

Will do, thanks for the heads up! And thanks for the review! :)

@daall daall requested a review from yxieca November 11, 2019 23:08
@daall daall requested review from jleveque and lguohan November 15, 2019 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants