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][pfcwd] Avoid ingress drop by not attaching zero profiles when pfc storm is detected #2279

Merged
merged 2 commits into from
May 19, 2022

Conversation

neethajohn
Copy link
Contributor

@neethajohn neethajohn commented May 17, 2022

Signed-off-by: Neetha John nejo@microsoft.com

What I did
According to the current pfcwd detection logic on certain platforms, when wd fires, we create an ingress zero pool, ingress zero profile, egress zero pool, egress zero profile (if not already created) and then attach the ingress zero profile to the ingress pg and egress zero profile to the egress queue. As a result traffic ingressing that port/pg and egressing that port/queue will get dropped.

The current changes are done to avoid dropping traffic that is ingressing the port/pg that is in storm. The code changes in this PR avoid creating the ingress zero pool and profile and not attach any zero profile to the ingress pg when pfcwd is triggered

How I verified it
Modified the pfcwd func tests (sonic-net/sonic-mgmt#5665) and testcase passed on Mellanox platform

Details if related

Signed-off-by: Neetha John <nejo@microsoft.com>
@neethajohn neethajohn changed the title [pfcwd] Avoid ingress drop by not attaching zero profiles when pfc storm is detected [201911][pfcwd] Avoid ingress drop by not attaching zero profiles when pfc storm is detected May 17, 2022
@neethajohn
Copy link
Contributor Author

@vivekreddynv , please review as well. Not able to add you as a reviewer

@neethajohn neethajohn requested a review from prsunny May 18, 2022 00:32
Copy link
Collaborator

@stephenxs stephenxs left a comment

Choose a reason for hiding this comment

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

Minor comments in the test cases.
All the rest looks good to me

tests/mock_tests/portsorch_ut.cpp Show resolved Hide resolved
Signed-off-by: Neetha John <nejo@microsoft.com>
@neethajohn neethajohn marked this pull request as ready for review May 18, 2022 16:40
@lguohan lguohan merged commit 923db73 into sonic-net:201911 May 19, 2022
@neethajohn neethajohn deleted the zero_buf_ing_forward branch May 19, 2022 00:51
neethajohn added a commit to sonic-net/sonic-mgmt that referenced this pull request Jul 11, 2022
…on Rx (#5665)

Signed-off-by: Neetha John <nejo@microsoft.com>

For platforms that use the zero buffer detection logic for pfcwd, modify the testcase to check for ingress traffic getting forwarded. Related to sonic-net/sonic-swss#2279

How did you verify/test it?
Ran the test with these changes on Mellanox platform and it passed
wangxin pushed a commit to sonic-net/sonic-mgmt that referenced this pull request Jul 12, 2022
…on Rx (#5665)

Signed-off-by: Neetha John <nejo@microsoft.com>

For platforms that use the zero buffer detection logic for pfcwd, modify the testcase to check for ingress traffic getting forwarded. Related to sonic-net/sonic-swss#2279

How did you verify/test it?
Ran the test with these changes on Mellanox platform and it passed
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