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

Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group #1600

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

ayurkiv-nvda
Copy link
Contributor

@ayurkiv-nvda ayurkiv-nvda commented Jan 14, 2021

Signed-off-by: Andriy Yurkiv ayurkiv@nvidia.com

depends on :
sonic-net/sonic-utilities#1355
sonic-net/sonic-buildimage#6444

merge priority:
#1600
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"

Details if related

@volodymyrsamotiy
Copy link
Collaborator

@neethajohn, could you you please review?

@liat-grozovik
Copy link
Collaborator

@neethajohn if this is needed for 201911 please add the proper label

Copy link
Contributor

@neethajohn neethajohn left a comment

Choose a reason for hiding this comment

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

Please add tests for the flex counter group/table creation/deletion. You can take a look at tests/test_drop_counters.py

orchagent/flexcounterorch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.cpp Outdated Show resolved Hide resolved
orchagent/portsorch.h Outdated Show resolved Hide resolved
@liat-grozovik
Copy link
Collaborator

@neethajohn could you please review recent changes?

@neethajohn
Copy link
Contributor

Please add tests for the flex counter group/table creation/deletion. You can take a look at tests/test_drop_counters.py

No unit tests have been added. Please add

@ayurkiv-nvda
Copy link
Contributor Author

Please add tests for the flex counter group/table creation/deletion. You can take a look at tests/test_drop_counters.py

tests in "tests/test_drop_counters.py" are different. We do not expect dynamic creation and deletion tables in this functionality.
I think tests in tests/test_watermark.py is more suitable for example

…ew FlexCounter group

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>
@ayurkiv-nvda
Copy link
Contributor Author

Please add tests for the flex counter group/table creation/deletion. You can take a look at tests/test_drop_counters.py

test added

@liat-grozovik
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 1600 in repo Azure/sonic-swss

@ayurkiv-nvda ayurkiv-nvda changed the title Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create ew FlexCounter group Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group Feb 15, 2021
@neethajohn
Copy link
Contributor

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@neethajohn
Copy link
Contributor

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@neethajohn neethajohn merged commit 710df0c into sonic-net:master Feb 17, 2021
neethajohn pushed a commit to sonic-net/sonic-utilities that referenced this pull request Feb 17, 2021
…er in counterpoll utility (#1355)

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>

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
@liat-grozovik
Copy link
Collaborator

@ayurkiv-nvda can you please update the swss submodule pointer so we can move forward with the rest?

@liat-grozovik
Copy link
Collaborator

@neethajohn please add label 'request for 202012' i am not able to add and this is needed.

yxieca pushed a commit that referenced this pull request Feb 23, 2021
…ew FlexCounter group (#1600)

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>

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"
yxieca pushed a commit to sonic-net/sonic-utilities that referenced this pull request Feb 23, 2021
…er in counterpoll utility (#1355)

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>

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
anand-kumar-subramanian pushed a commit to anand-kumar-subramanian/sonic-utilities that referenced this pull request Mar 2, 2021
…er in counterpoll utility (sonic-net#1355)

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>

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
DavidZagury pushed a commit to DavidZagury/sonic-swss that referenced this pull request Mar 4, 2021
…ew FlexCounter group (sonic-net#1600)

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>

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"
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-swss that referenced this pull request Oct 5, 2021
…ew FlexCounter group (sonic-net#1600)

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>

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"
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…nic-net#1600)

* [show][config] SNMP commands added

* fixed quotes for backticks

* Fixed run for runningconfiguration and Del for Delete

* changed admin@switch1 to admin@sonic and removed trailing prompt

* updated Usage statements for SNMP

* Updated for optional and required values

* updated to remove unneeded example () statements

* updated typo's
@abdosi
Copy link
Contributor

abdosi commented Mar 29, 2022

@ayurkiv-nvda can ypu please create PR for 201911 ? Cherry-pick has conflict

neethajohn pushed a commit that referenced this pull request Jun 22, 2022
… create new FlexCounter group (#2263)

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>

Appropriate PR in master #1600

What I did
Added possibility to calculate Priority Group drop packet counters

Why I did it
Need to merge feature from master to 201911

How I verified it
Setup a testbed like this: hostA - DUT – hostB, layer 2 or 3 forwarding between A/B. better to use layer 3 because by using layer 3 we can easily designate DSCP of the packet.
Make sure all entries for forwarding have been correctly established, ARP, routing, neighbor, …
Assume you will send traffic from A to B, start PFC storm on host B. if you are using SONiC testbed, you can start PFC storm on the fanout switch. (you can consult Volodymyr regarding how to start PFC storm)
Check and update the buffer profile on the DUT’s ports connected to host A:

Let’s say it’s Ethernet8, using the following command:
admin@arc-mtbc-1001:~$ redis-cli -n 4 hgetall "BUFFER_PG|Ethernet8|3-4"
1) "profile"
2) "[BUFFER_PROFILE|pg_lossless_25000_5m_profile]"
admin@arc-mtbc-1001:~$ redis-cli -n 4 hset "BUFFER_PROFILE|pg_lossless_25000_5m_profile" dynamic_th -8
and then save config and reload config.
Send packets from host A to host B, make sure the DSCP is 3.
You should be able to observe discard on PG 3 soon.
@ayurkiv-nvda ayurkiv-nvda deleted the ingress_pg_flex_azure branch May 30, 2023 21:47
malletvapid23 added a commit to malletvapid23/Sonic-Utility that referenced this pull request Aug 3, 2023
…er in counterpoll utility (#1355)

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants