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 #2302

Merged
merged 9 commits into from
Jun 4, 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 6 commits April 27, 2022 05:19
Signed-off-by: bingwang <bingwang@microsoft.com>
Signed-off-by: bingwang <wang.bing@microsoft.com>
Signed-off-by: bingwang <wang.bing@microsoft.com>
Signed-off-by: bingwang <wang.bing@microsoft.com>
Signed-off-by: bingwang <wang.bing@microsoft.com>
speed = m_speedLookup[port];
if (m_portStatusLookup.count(port) == 0)
{
// admin_statue is not available yet. This can happen when notification of `PORT_QOS_MAP` table
Copy link
Contributor

Choose a reason for hiding this comment

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

spell check: admin_status

cfgmgr/buffermgr.cpp Show resolved Hide resolved
@@ -473,37 +573,37 @@ void BufferMgr::doTask(Consumer &consumer)
}
if (fvField(i) == "admin_status")
{
admin_up = ("up" == fvValue(i));
Copy link
Contributor

Choose a reason for hiding this comment

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

remove the declaration in L567


m_portList[p.m_alias] = p;

SWSS_LOG_INFO("Set PFC watchdog port id=0x%" PRIx64 ", bitmast=0x%x", portId, pfcwd_bitmask);
Copy link
Contributor

Choose a reason for hiding this comment

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

spell check: bitmask

@bingwang-ms
Copy link
Contributor Author

@neethajohn Thanks. All fixed.

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