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

Update orchagent to support new field pfcwd_sw_enable #2171

Merged
merged 17 commits into from
Apr 29, 2022

Conversation

bingwang-ms
Copy link
Contributor

@bingwang-ms bingwang-ms commented Mar 7, 2022

Signed-off-by: bingwang bingwang@microsoft.com

What I did
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 pytest3 --dvsname=vs tests/test_pfcwd.py::TestPfcwdFunc -v --pdb
========================================================================================= test session starts =========================================================================================
platform linux -- Python 3.6.9, pytest-7.0.1, pluggy-1.0.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/bingwang/work/sonic/sonic-buildimage-master/src/sonic-swss
plugins: flaky-3.7.0
collected 2 items                                                                                                                                                                                     

tests/test_pfcwd.py::TestPfcwdFunc::test_pfcwd_software_single_queue PASSED                                                                                                                     [ 50%]
tests/test_pfcwd.py::TestPfcwdFunc::test_pfcwd_software_multi_queue PASSED

sudo pytest test_buffer_traditional.py                
===================================================================================================================== test session starts ======================================================================================================================
platform linux -- Python 3.7.5, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/bingwang/work/sonic/sonic-buildimage-master/src/sonic-swss/tests
collected 1 item                                                                                                                                                                                                                                               

test_buffer_traditional.py .                                                                                                                                                                                                                             [100%]


Test cases in sonic-mgmt is working in progress.

Details if related

bingwang-ms and others added 2 commits March 7, 2022 06:53
Signed-off-by: bingwang <bingwang@microsoft.com>
Signed-off-by: bingwang <wang.bing@microsoft.com>
Signed-off-by: bingwang <bingwang@microsoft.com>
orchagent/port.h Outdated Show resolved Hide resolved
orchagent/pfcwdorch.cpp Show resolved Hide resolved
tests/test_pfcwd.py Outdated Show resolved Hide resolved
tests/test_pfcwd.py Outdated Show resolved Hide resolved
Signed-off-by: bingwang <wang.bing@microsoft.com>
@bingwang-ms
Copy link
Contributor Author

@neethajohn The last two comments are addressed. Please take a look again. Thanks

@neethajohn
Copy link
Contributor

@bingwang-ms , to support the additional queues, you will also need to make a change in buffermgr to not hardcode the lossless pgs - https://github.com/Azure/sonic-swss/blob/master/cfgmgr/buffermgr.h#L14

Signed-off-by: bingwang <bingwang@microsoft.com>
@bingwang-ms
Copy link
Contributor Author

@bingwang-ms , to support the additional queues, you will also need to make a change in buffermgr to not hardcode the lossless pgs - https://github.com/Azure/sonic-swss/blob/master/cfgmgr/buffermgr.h#L14

Updated. Thanks

cfgmgr/buffermgr.h Outdated Show resolved Hide resolved
Signed-off-by: bingwang <wang.bing@microsoft.com>
@bingwang-ms bingwang-ms changed the title Update orchagent to support new field pfcwd_sw_enable and pfcwd_hw_enable Update orchagent to support new field pfcwd_sw_enable Apr 7, 2022
@bingwang-ms
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

cfgmgr/buffermgr.cpp Outdated Show resolved Hide resolved
bingwang-ms and others added 2 commits April 17, 2022 23:10
Signed-off-by: bingwang <bingwang@microsoft.com>
Signed-off-by: bingwang <wang.bing@microsoft.com>
cfgmgr/buffermgr.cpp Outdated Show resolved Hide resolved
cfgmgr/buffermgr.cpp Outdated Show resolved Hide resolved
cfgmgr/buffermgr.cpp Show resolved Hide resolved
cfgmgr/buffermgr.cpp Outdated Show resolved Hide resolved
Signed-off-by: bingwang <wang.bing@microsoft.com>
cfgmgr/buffermgr.cpp Outdated Show resolved Hide resolved
cfgmgr/buffermgr.cpp Outdated Show resolved Hide resolved
cfgmgr/buffermgr.cpp Outdated Show resolved Hide resolved
tests/test_buffer_traditional.py Outdated Show resolved Hide resolved
Signed-off-by: bingwang <wang.bing@microsoft.com>
cfgmgr/buffermgr.cpp Outdated Show resolved Hide resolved
cfgmgr/buffermgr.cpp Show resolved Hide resolved
@bingwang-ms
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: bingwang <wang.bing@microsoft.com>
Signed-off-by: bingwang <wang.bing@microsoft.com>
Signed-off-by: bingwang <wang.bing@microsoft.com>
cfgmgr/buffermgr.cpp Show resolved Hide resolved
cfgmgr/buffermgr.cpp Show resolved Hide resolved
Signed-off-by: bingwang <wang.bing@microsoft.com>
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.

LGTM

@qiluo-msft
Copy link
Contributor

This commit could not be cleanly cherry-picked to 202012. Please submit another PR.

preetham-singh pushed a commit to preetham-singh/sonic-swss that referenced this pull request Aug 6, 2022
Signed-off-by: bingwang bingwang@microsoft.com

What I did
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 pytest3 --dvsname=vs tests/test_pfcwd.py::TestPfcwdFunc -v --pdb
========================================================================================= test session starts =========================================================================================
platform linux -- Python 3.6.9, pytest-7.0.1, pluggy-1.0.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/bingwang/work/sonic/sonic-buildimage-master/src/sonic-swss
plugins: flaky-3.7.0
collected 2 items                                                                                                                                                                                     

tests/test_pfcwd.py::TestPfcwdFunc::test_pfcwd_software_single_queue PASSED                                                                                                                     [ 50%]
tests/test_pfcwd.py::TestPfcwdFunc::test_pfcwd_software_multi_queue PASSED

sudo pytest test_buffer_traditional.py                
===================================================================================================================== test session starts ======================================================================================================================
platform linux -- Python 3.7.5, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/bingwang/work/sonic/sonic-buildimage-master/src/sonic-swss/tests
collected 1 item                                                                                                                                                                                                                                               

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