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

[201911] [Flex counters] Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group #2263

Merged
merged 1 commit into from
Jun 22, 2022

Conversation

ayurkiv-nvda
Copy link
Contributor

@ayurkiv-nvda ayurkiv-nvda commented May 7, 2022

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

  1. 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, …
  2. 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)
  3. 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.

Details if related

@ayurkiv-nvda ayurkiv-nvda changed the title Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group [Flex counters] Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group May 7, 2022
@prsunny
Copy link
Collaborator

prsunny commented May 10, 2022

Can you provide a link to master PR?

@ayurkiv-nvda
Copy link
Contributor Author

ayurkiv-nvda commented May 10, 2022

Can you provide a link to master PR?

@prsunny #1600

@liat-grozovik
Copy link
Collaborator

@neethajohn following your ask enclose in the backport PR. Appreciate if you can prioritized the review.

@liat-grozovik liat-grozovik changed the title [Flex counters] Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group [201911] [Flex counters] Add SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS counter, create new FlexCounter group May 11, 2022
@mssonicbld
Copy link
Collaborator

/AzurePipelines run LGTM

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@ayurkiv-nvda
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

tests/test_pg_drop_counter.py Outdated Show resolved Hide resolved
tests/test_pg_drop_counter.py Outdated Show resolved Hide resolved
…ew FlexCounter group

Signed-off-by: Andriy Yurkiv <ayurkiv@nvidia.com>
@liat-grozovik
Copy link
Collaborator

@ayurkiv-nvda could you please followup on the LGTM issue raised in this PR? if this infra issue please contact the build team.

@liat-grozovik
Copy link
Collaborator

@ayurkiv-nvda kindly reminder to check the LGTM

@ayurkiv-nvda
Copy link
Contributor Author

@ayurkiv-nvda kindly reminder to check the LGTM

@liat-grozovik It looks like these LGTM issue for 201911 is know problem
There are PR's that were merged despite the LGTM test failure: #1901, #2196, #2279
I think we can ignore it

@ayurkiv-nvda
Copy link
Contributor Author

ayurkiv-nvda commented Jun 22, 2022

@liat-grozovik
hello
so, can we merge this PR? despite LGTM failure It looks safe?

@neethajohn neethajohn merged commit 805f4bb into sonic-net:201911 Jun 22, 2022
neethajohn pushed a commit to sonic-net/sonic-utilities that referenced this pull request Jun 22, 2022
…rpoll, show/clear counters) (#2155)

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

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
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.

5 participants