Skip to content

[202205] Fix issue: unconfigured PGs are displayed in watermarkstat#2568

Merged
liat-grozovik merged 2 commits intosonic-net:202205from
stephenxs:fix-watermark-pg-202205
Dec 26, 2022
Merged

[202205] Fix issue: unconfigured PGs are displayed in watermarkstat#2568
liat-grozovik merged 2 commits intosonic-net:202205from
stephenxs:fix-watermark-pg-202205

Conversation

@stephenxs
Copy link
Copy Markdown
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 stephens@nvidia.com

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 <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
@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