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

[202012][cherry-pick]Update orchagent to support new field pfcwd_sw_enable #2245

Merged
merged 3 commits into from
May 9, 2022

Conversation

bingwang-ms
Copy link
Contributor

What I did
This PR is to cherry-pick #2171 after resolving conflicts.
Currently, the entry pfc_enable in table PORT_QOS_MAP is used to specify pfc and pfc_watchdog are enabled on which queues.
To avoid PFC deadlock in Dual-ToR scrnario, we are going to introduce two extra lossless queues to carry bounced back traffic.HLD.
The extra lossless queues require another two pfc_watchdogs, and the new watchdogs will be implemented by hardware due to limited resources. The hardware pfc watchdog is not covered in this PR.
To specify on which queue to enable pfc watchdog, we need to define new table pfcwd_sw_enable.

Table Description
pfc_enable Specify on which queues to enable PFC
pfcwd_sw_enable Specify on which queues to enable software PFC watchdog

This PR is to update orchagent to support new field pfcwd_sw_enable .

As two extra lossless PGs (2 and 6) are to be added, buffermgrd is also updated in this PR to generate lossless profile for the new PGs.

Why I did it
Update orchagent to support new field pfcwd_sw_enable .

How I verified it
Verified by UT.

sudo pytest test_buffer_traditional.py -v --pdb --dvsname=vs
========================================================================================= test session starts =========================================================================================
platform linux -- Python 3.7.5, pytest-7.1.1, pluggy-1.0.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/bingwang/work/sonic/sonic-buildimage-202012/src/sonic-swss/tests
collected 2 items                                                                                                                                                                                     

test_buffer_traditional.py::TestBuffer::test_zero_cable_len_profile_update PASSED                                                                                                               [ 50%]
test_buffer_traditional.py::TestBuffer::test_buffer_pg_update PASSED                                                                                                                            [100%]

Test cases in sonic-mgmt is working in progress.

Details if related

bingwang-ms and others added 2 commits April 27, 2022 05:19
Signed-off-by: bingwang <bingwang@microsoft.com>
Signed-off-by: bingwang <wang.bing@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented Apr 29, 2022

This pull request fixes 1 alert when merging 97f3027 into 0b58595 - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@bingwang-ms
Copy link
Contributor Author

bingwang-ms commented May 3, 2022

PR testing will pass after #2077 is cherry-picked into 202012 branch.

sudo pytest test_pfcwd.py -v --pdb --dvsname=vs-202012
===================================================================================================================== test session starts ======================================================================================================================
platform linux -- Python 3.7.5, pytest-7.1.1, pluggy-1.0.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/bingwang/work/sonic/sonic-buildimage-202012/src/sonic-swss/tests
collected 4 items                                                                                                                                                                                                                                              

test_pfcwd.py::TestPfcWd::test_PfcWdAclCreationDeletion PASSED                                                                                                                                                                                           [ 25%]
test_pfcwd.py::TestPfcwdFunc::test_pfcwd_software_single_queue PASSED                                                                                                                                                                                    [ 50%]
test_pfcwd.py::TestPfcwdFunc::test_pfcwd_software_multi_queue PASSED                                                                                                                                                                                     [ 75%]
test_pfcwd.py::test_nonflaky_dummy PASSED                                                                                                                                                                                                                [100%]

Signed-off-by: bingwang <wang.bing@microsoft.com>
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