Skip to content

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

Merged
bingwang-ms merged 9 commits intosonic-net:202012from
bingwang-ms:pfcwd_sw_enable_202012
Jun 4, 2022
Merged

[202012][cherry-pick]Update orchagent to support new field pfcwd_sw_enable#2302
bingwang-ms merged 9 commits intosonic-net:202012from
bingwang-ms:pfcwd_sw_enable_202012

Conversation

@bingwang-ms
Copy link
Copy Markdown
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

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
Copy Markdown
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

}
if (fvField(i) == "admin_status")
{
admin_up = ("up" == fvValue(i));
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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