-
Notifications
You must be signed in to change notification settings - Fork 664
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
Add new CLI for PG drop counters part of counterpoll utility #1355
Add new CLI for PG drop counters part of counterpoll utility #1355
Conversation
b782cb2
to
68b9964
Compare
retest this please |
68b9964
to
ecfed30
Compare
@neethajohn, could you you please review? |
@neethajohn if this is needed for 201911 please add the proper label |
@ayurkiv-nvda the PR description is missing some information. I have modified it a little bit but I believe the 'how to test' is should be extended with how to cause the drop counter to be incremented and then check validity. You are referring to the show command for the counters which is great but should you verify the reset counter command as well? Please all add content to the section of 'New command output (if the output of a command-line utility has changed)' as you do have a new command. |
To add on to Liat's comment, I do not see the 'show'/'clear' command to view/clear the pg drop counters. |
Currently 'counterpoll' utility provide few commands to work with it. There is no possibility to show only specific counter. |
added |
You cannot do it through 'counterpoll'. You need a separate cli to view the drop stats. Look at 'show priority-group' or 'show queue' in show/main.py. The same applies for 'clear' |
Can we come up with CLI for this counters? This was not considered at the planning stage and will take a time to implement.
And this for clear: |
…er in counterpoll utility Signed-off-by: Andriy Yurkiv <[email protected]>
ecfed30
to
517cbda
Compare
How about |
@neetha John<mailto:[email protected]> may I suggest to differ this req from the PR? As this was not in the initial discussion and there is no specific CLI for each type of counter we should add it as part of new PR and have this done.
From: Neetha John <[email protected]>
Sent: Tuesday, February 2, 2021 6:37 AM
To: Azure/sonic-utilities <[email protected]>
Cc: Liat Grozovik <[email protected]>; Comment <[email protected]>
Subject: Re: [Azure/sonic-utilities] Add new CLI for PG drop counters part of counterpoll utility (#1355)
To add on to Liat's comment, I do not see the 'show'/'clear' command to view/clear the pg drop counters.
Currently 'counterpoll' utility provide few commands to work with it.
'counterpoll show' - print all counters info in one table. We already have general test for it
'counterpoll < counter type> enable'
'counterpoll < counter type> disable'
'counterpoll < counter type> interval' - three option for each counter type
There is no possibility to show only specific counter.
The same with clearing. There is no possibility to clean any counters via counterpoll cli
You cannot do it through 'counterpoll'. You need a separate cli to view the drop stats. Look at 'show priority-group' or 'show queue' in show/main.py. The same applies for 'clear'
Can we come up with CLI for this counters? This was not considered at the planning stage and will take a time to implement.
What about this command for show:
show priority-group dropped_packets
Port PG0 PG1 PG2 PG3 PG4 PG5 PG6 PG7
…----------- ----- ----- ----- ----- ----- ----- ----- -----
Ethernet0 0 0 0 0 0 0 0 0
Ethernet4 0 0 0 0 0 0 0 0
Ethernet8 0 0 0 0 0 0 0 0
...............................................................
Ethernet116 0 0 0 0 0 0 0 0
Ethernet120 0 0 0 0 0 0 0 0
Ethernet124 0 0 0 0 0 0 0 0
And this for clear:
sonic-clear priority-group dropped_packet
?
How about
show priority-group drop counters
sonic-clear priority-group drop counters
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#1355 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKTABAYDM5MG65CREPXRVLDS456M7ANCNFSM4WBUB7ZQ>.
|
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
…ew FlexCounter group (#1600) Signed-off-by: Andriy Yurkiv <[email protected]> depends on : sonic-net/sonic-utilities#1355 sonic-net/sonic-buildimage#6444 What I did Added new option for "counterpoll" util Why I did it Add appropriate code to counterpoll/main.py How I verified it admin@arc-switch1041:~$ counterpoll pg-drop enable --> enable new counter admin@arc-switch1041:~$ counterpoll show --> check new PG_DROP_STAT counter status check counters admin@arc-switch1041:~$ redis-cli -n 2 127.0.0.1:6379[2]> HGETALL COUNTERS:oid:0x1a000000000062 1) "SAI_INGRESS_PRIORITY_GROUP_STAT_XOFF_ROOM_WATERMARK_BYTES" 2) "0" 3) "SAI_INGRESS_PRIORITY_GROUP_STAT_SHARED_WATERMARK_BYTES" 4) "0" 5) "SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS" 6) "0"
@ayurkiv-nvda can you please update submodule pointer so we can move forward with the next PR to be merged? |
…ew FlexCounter group (#1600) Signed-off-by: Andriy Yurkiv <[email protected]> depends on : sonic-net/sonic-utilities#1355 sonic-net/sonic-buildimage#6444 What I did Added new option for "counterpoll" util Why I did it Add appropriate code to counterpoll/main.py How I verified it admin@arc-switch1041:~$ counterpoll pg-drop enable --> enable new counter admin@arc-switch1041:~$ counterpoll show --> check new PG_DROP_STAT counter status check counters admin@arc-switch1041:~$ redis-cli -n 2 127.0.0.1:6379[2]> HGETALL COUNTERS:oid:0x1a000000000062 1) "SAI_INGRESS_PRIORITY_GROUP_STAT_XOFF_ROOM_WATERMARK_BYTES" 2) "0" 3) "SAI_INGRESS_PRIORITY_GROUP_STAT_SHARED_WATERMARK_BYTES" 4) "0" 5) "SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS" 6) "0"
…er in counterpoll utility (#1355) Signed-off-by: Andriy Yurkiv <[email protected]> depends on: sonic-net/sonic-buildimage#6444 sonic-net/sonic-swss#1600 - What I did Added new option for "counterpoll" utility - How I did it Enhance counterpoll utility for SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS Add new CLI command and extend the show command. - How to verify it To test it use QoS test. run the pfcxontest and Pfcxofftest, drop can be triggered in either of the test. It runs in ptf32 topo and requires RPC image. admin@arc-switch1041:~$ counterpoll pg-drop enable --> to enable the new counter admin@arc-switch1041:~$ counterpoll show --> check new INGRESS_PG_STAT_DROP counter status
…er in counterpoll utility (sonic-net#1355) Signed-off-by: Andriy Yurkiv <[email protected]> depends on: sonic-net/sonic-buildimage#6444 sonic-net/sonic-swss#1600 - What I did Added new option for "counterpoll" utility - How I did it Enhance counterpoll utility for SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS Add new CLI command and extend the show command. - How to verify it To test it use QoS test. run the pfcxontest and Pfcxofftest, drop can be triggered in either of the test. It runs in ptf32 topo and requires RPC image. admin@arc-switch1041:~$ counterpoll pg-drop enable --> to enable the new counter admin@arc-switch1041:~$ counterpoll show --> check new INGRESS_PG_STAT_DROP counter status
…ew FlexCounter group (sonic-net#1600) Signed-off-by: Andriy Yurkiv <[email protected]> depends on : sonic-net/sonic-utilities#1355 sonic-net/sonic-buildimage#6444 What I did Added new option for "counterpoll" util Why I did it Add appropriate code to counterpoll/main.py How I verified it admin@arc-switch1041:~$ counterpoll pg-drop enable --> enable new counter admin@arc-switch1041:~$ counterpoll show --> check new PG_DROP_STAT counter status check counters admin@arc-switch1041:~$ redis-cli -n 2 127.0.0.1:6379[2]> HGETALL COUNTERS:oid:0x1a000000000062 1) "SAI_INGRESS_PRIORITY_GROUP_STAT_XOFF_ROOM_WATERMARK_BYTES" 2) "0" 3) "SAI_INGRESS_PRIORITY_GROUP_STAT_SHARED_WATERMARK_BYTES" 4) "0" 5) "SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS" 6) "0"
@click.pass_context | ||
def pg_drop(ctx): | ||
""" Ingress PG drop counter commands """ | ||
ctx.obj = swsssdk.ConfigDBConnector() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swsssdk [](start = 14, length = 7)
swsssdk is deprecated largely in sonic-utilities. Could you adapt the new ConfigDBConnector
as in latest code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it also deprecated on 202012? this PR should go to 202012 as well thus need to know if the change should be done on specific branch only
@ayurkiv-nvda FYI
…ew FlexCounter group (sonic-net#1600) Signed-off-by: Andriy Yurkiv <[email protected]> depends on : sonic-net/sonic-utilities#1355 sonic-net/sonic-buildimage#6444 What I did Added new option for "counterpoll" util Why I did it Add appropriate code to counterpoll/main.py How I verified it admin@arc-switch1041:~$ counterpoll pg-drop enable --> enable new counter admin@arc-switch1041:~$ counterpoll show --> check new PG_DROP_STAT counter status check counters admin@arc-switch1041:~$ redis-cli -n 2 127.0.0.1:6379[2]> HGETALL COUNTERS:oid:0x1a000000000062 1) "SAI_INGRESS_PRIORITY_GROUP_STAT_XOFF_ROOM_WATERMARK_BYTES" 2) "0" 3) "SAI_INGRESS_PRIORITY_GROUP_STAT_SHARED_WATERMARK_BYTES" 4) "0" 5) "SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS" 6) "0"
@ayurkiv-nvda can ypu please create PR for 201911 ? Cherry-pick has conflict |
…rpoll, show/clear counters) (#2155) Signed-off-by: Andriy Yurkiv <[email protected]> Should be merged after sonic-net/sonic-swss#2263 Appropriate PR in master:#1355, #1461, #1583 What I did Added new option for "counterpoll" utility Added new CLI commands to view and clear PG dropped packet statistics. Added the new CLI commands to the command reference guide. How I did it Need to merge PG drop functionality to 201911 How to verify it admin@arc-switch1041:~$ counterpoll pg-drop enable --> to enable the new counter admin@arc-switch1041:~$ counterpoll show --> check new INGRESS_PG_STAT_DROP counter status Check counters admin@arc-switch1041:~$ redis-cli -n 2 127.0.0.1:6379[2]> HGETALL COUNTERS:oid:0x1a000000000062 1) "SAI_INGRESS_PRIORITY_GROUP_STAT_XOFF_ROOM_WATERMARK_BYTES" 2) "0" 3) "SAI_INGRESS_PRIORITY_GROUP_STAT_SHARED_WATERMARK_BYTES" 4) "0" 5) "SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS" 6) "0" show priority-group drop counters Ingress PG dropped packets: Port PG0 PG1 PG2 PG3 PG4 PG5 PG6 PG7 --------- ----- ----- ----- ----- ----- ----- ----- ----- Ethernet0 800 801 802 803 804 805 806 807 Ethernet4 400 401 402 403 404 405 406 407 Ethernet8 100 101 102 103 104 105 106 107 ... sonic-clear priority-group drop counters Cleared PG drop counters
Enhance counterpoll utility to support PG drop counters.
Add new CLI to enable/disable it.
Signed-off-by: Andriy Yurkiv [email protected]
depends on:
sonic-net/sonic-buildimage#6444
sonic-net/sonic-swss#1600
merge priority:
sonic-net/sonic-swss#1600
#1355
sonic-net/sonic-buildimage#6444
- What I did
Added new option for "counterpoll" utility
- How I did it
Enhance counterpoll utility for SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS
Add new CLI command and extend the show command.
- How to verify it
To test it use QoS test. run the pfcxontest and Pfcxofftest, drop can be triggered in either of the test.
It runs in ptf32 topo and requires RPC image.
Check counters
- 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)