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] Fix issue: unconfigured PGs are displayed in watermarkstat #2568

Merged
merged 2 commits into from
Dec 26, 2022

Conversation

stephenxs
Copy link
Collaborator

What I did

This is to cherry-pick #2556 to 202205
Fix issue
All the PGs between minimal and maximal indexes are displayed regardless of whether they are configured.
Originally, watermark counters were enabled for all PGs, so there is no issue.
Now, watermark counters are enabled only for PGs with buffer configured, eg. if PG 0/2/3/4/6, is configured, PG 0-6 will be displayed, which is confusing by giving users a feeling that PG 7 is lost

Signed-off-by: Stephen Sun [email protected]

How I did it

Display valid PGs only

How to verify it

Manually test and unit test.

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

       Port    PG0    PG1    PG2    PG3    PG4
-----------  -----  -----  -----  -----  -----
 Ethernet0      0      0      0      0      0
 Ethernet2      0      0      0      0      0
 Ethernet8      0      0      0      0      0
Ethernet10      0      0      0      0      0
Ethernet16      0      0      0      0      0
Ethernet18      0      0      0      0      0
Ethernet32      0      0      0      0      0

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

PG1 won't be displayed if it is not configured

       Port    PG0    PG3    PG4
-----------  -----  -----  -----
 Ethernet0      0      0      0
 Ethernet2      0      0      0
 Ethernet8      0      0      0
Ethernet10      0      0      0
Ethernet16      0      0      0
Ethernet18      0      0      0
Ethernet32      0      0      0

Root cause: all the PGs between minimal and maximal indexes are displayed
Originally, watermark counters were enabled for all PGs, so there is no issue
Now, watermark counters are enabled only for PGs with buffer configured,
eg. if PG 0/2/3/4/6, is configured, PG 0-6 will be displayed,
which gives users a feeling that PG 7 is lost, which is confusing

Fix: display valid PGs only

Signed-off-by: Stephen Sun <[email protected]>
Signed-off-by: Stephen Sun <[email protected]>
@liat-grozovik liat-grozovik merged commit 9f2984a into sonic-net:202205 Dec 26, 2022
@stephenxs stephenxs deleted the fix-watermark-pg-202205 branch December 26, 2022 23:54
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.

2 participants