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

[pfcwd] Enhance DLR_INIT based recovery and DLR_PACKET_ACTION for broadcom platforms #2807

Merged
merged 3 commits into from
Jun 5, 2023

Conversation

neethajohn
Copy link
Contributor

@neethajohn neethajohn commented May 31, 2023

What I did
This PR contains the following changes

  • for brcm platforms that support DLR_INIT based recovery, use that method for both drop and forward action
  • While using DLR_INIT based recovery, do not update the pfc bitmask for that port
  • Update the logic to handle allowing drop/forward action on all ports without requiring a restart of swss
  • Mock tests for DLR_INIT and DLR_PACKET action

Why I did it
To provide support for DLR_INIT based pfcwd recovery on broadcom platforms in certain roles

How I verified it
Mock tests
Tested on various brcm platforms (TD3 dual tor, Th2 T1, TD3 single tor) with a custom swss deb along with updated bcm config and verified that the pfcwd recovery mechanism is as expected on 202205
Tested on td3 dual tor with custom deb along with updated bcm config and verified functionality working fine on internal branch

MSFT ADO: 17983504

@@ -238,11 +238,11 @@ task_process_status PfcWdOrch<DropHandler, ForwardHandler>::createEntry(const st
{
if(gSwitchOrch->checkPfcDlrInitEnable())
{
if(getPfcDlrPacketAction() == PfcWdAction::PFC_WD_ACTION_UNKNOWN)
if((getPfcDlrPacketAction() == PfcWdAction::PFC_WD_ACTION_UNKNOWN) || m_pfcwd_ports.empty())
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is this check on line 228? (action == PfcWdAction::PFC_WD_ACTION_UNKNOWN)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The action value is initialized to unknown. This check was initially there to set the action for the first port and compare subsequent port actions and disallow if they do not match. The check is not needed anymore with the introduction of the 'm_pfcwd_ports' variable. Will remove that

Signed-off-by: Neetha John <[email protected]>
@neethajohn neethajohn merged commit e37e55f into sonic-net:master Jun 5, 2023
@neethajohn neethajohn deleted the pfcwd_dlr_master branch June 5, 2023 15:23
yxieca pushed a commit that referenced this pull request Jun 7, 2023
…adcom platforms (#2807)

Signed-off-by: Neetha John <[email protected]>

What I did
This PR contains the following changes
* for brcm platforms that support DLR_INIT based recovery, use that method for both drop and forward action
* While using DLR_INIT based recovery, do not update the pfc bitmask for that port
* Update the logic to handle allowing drop/forward action on all ports without requiring a restart of swss
* Mock tests for DLR_INIT and DLR_PACKET action

Why I did it
To provide support for DLR_INIT based pfcwd recovery on broadcom platforms in certain roles

How I verified it
* Mock tests
* Tested on various brcm platforms (TD3 dual tor, Th2 T1, TD3 single tor) with a custom swss deb along with updated bcm config and verified that the pfcwd recovery mechanism is as expected on 202205
* Tested on td3 dual tor with custom deb along with updated bcm config and verified functionality working fine on internal branch
theasianpianist pushed a commit to theasianpianist/sonic-swss that referenced this pull request Jul 20, 2023
…adcom platforms (sonic-net#2807)

Signed-off-by: Neetha John <[email protected]>

What I did
This PR contains the following changes
* for brcm platforms that support DLR_INIT based recovery, use that method for both drop and forward action
* While using DLR_INIT based recovery, do not update the pfc bitmask for that port
* Update the logic to handle allowing drop/forward action on all ports without requiring a restart of swss
* Mock tests for DLR_INIT and DLR_PACKET action

Why I did it
To provide support for DLR_INIT based pfcwd recovery on broadcom platforms in certain roles

How I verified it
* Mock tests
* Tested on various brcm platforms (TD3 dual tor, Th2 T1, TD3 single tor) with a custom swss deb along with updated bcm config and verified that the pfcwd recovery mechanism is as expected on 202205
* Tested on td3 dual tor with custom deb along with updated bcm config and verified functionality working fine on internal branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants