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

Use shared egress ACL table for PFCWD in BRCM DNX platform #3136

Merged
merged 19 commits into from
Jun 28, 2024

Conversation

ysmanman
Copy link
Contributor

@ysmanman ysmanman commented May 7, 2024

Today PFCWD uses separate egress ACL tables, one table for each traffic class. This may result in ACL resource overflow when other features that also need egress ACL table is enabled at the same time, e.g., MACSEC. ( See sonic-net/sonic-buildimage#17839 for details).

The fix is to use shared egress ACL table for PFCWD in BRCM DNX platform.

What I did

Why I did it

How I verified it

Details if related

@ysmanman ysmanman requested a review from prsunny as a code owner May 7, 2024 17:02
@ysmanman
Copy link
Contributor Author

ysmanman commented May 7, 2024

Add @kenneth-arista @arlakshm @vmittal-msft for viz.

@arlakshm
Copy link
Contributor

arlakshm commented May 8, 2024

Please add UT.

@arlakshm
Copy link
Contributor

arlakshm commented May 8, 2024

Sai changes still now complete. These are sonic changes for this functionality change. PR to be merged after the SAI changes are integrated.

@arlakshm arlakshm requested a review from vmittal-msft May 8, 2024 17:10
@arlakshm
Copy link
Contributor

arlakshm commented May 8, 2024

@saksarav-nokia

Copy link
Contributor

@vmittal-msft vmittal-msft left a comment

Choose a reason for hiding this comment

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

Changes looks fine.

  1. Can you please share all the test run results to verify this functionality? Manual, sonic-mgmt, ixia tests etc
  2. Please share syslog message change due to this. current/new both.
  3. Please test with/without mac sec enabled ports.
  4. Also, please post results from pizzabox.
  5. Are these swss changes complete or expecting more after applying second patch from BRCM ?
  6. Please make sure to verify pfcwd drop counters to make sure they are still reporting drops.

Thanks
Vineet

@vmittal-msft
Copy link
Contributor

Also, please add test cases to cover changes.

Today PFCWD uses separate egress ACL tables, one table for each traffic class.
This may result in ACL resource overflow when other features that also need
egress ACL table is enabled at the same time, e.g., MACSEC. ( See
sonic-net/sonic-buildimage#17839 for details).

The fix is to use shared egress ACL table for PFCWD in BRCM DNX platform.
…o switch.

Implement the requirement in aclorch.
@ysmanman
Copy link
Contributor Author

The test added in this PR depends on sonic-net/sonic-buildimage#19108

@ysmanman
Copy link
Contributor Author

Changes looks fine.

  1. Can you please share all the test run results to verify this functionality? Manual, sonic-mgmt, ixia tests etc
  2. Please share syslog message change due to this. current/new both.
  3. Please test with/without mac sec enabled ports.
  4. Also, please post results from pizzabox.
  5. Are these swss changes complete or expecting more after applying second patch from BRCM ?
  6. Please make sure to verify pfcwd drop counters to make sure they are still reporting drops.

Thanks Vineet

Changes looks fine.

  1. Can you please share all the test run results to verify this functionality? Manual, sonic-mgmt, ixia tests etc

We completed the testing with ixia, and shared egress acl worked fine without seeing any issue.

  1. Please share syslog message change due to this. current/new both.

The change adds the following new syslog when binging eress ACL table to switch:

May 22 17:34:39.194760 cmp329-6 NOTICE swss0#orchagent: :- bindEgrAclTableToSwitch: Bind egress acl table EgressTable_PfcWdAclHandler_Drop to switch
  1. Please test with/without mac sec enabled ports.

Yes, we tested PFCWD alone and also PFCWD + MACsec.

  1. Also, please post results from pizzabox.

We will provide the result when the testing is done.

  1. Are these swss changes complete or expecting more after applying second patch from BRCM ?

The swss change is complete.

  1. Please make sure to verify pfcwd drop counters to make sure they are still reporting drops.

Yes, the drop counters worked fine.

Thanks Vineet

@ysmanman
Copy link
Contributor Author

Also, please add test cases to cover changes.

Also, please add test cases to cover changes.

Hi @vmittal-msft, test was added.

@ysmanman
Copy link
Contributor Author

Hi @vmittal-msft , the test in this PR depends on sonic-net/sonic-buildimage#19108.

@prsunny
Copy link
Collaborator

prsunny commented Jun 25, 2024

@kperumalbfn , kindly review. @ysmanman , do you've plans to fix coverage?

if (platform == BRCM_PLATFORM_SUBSTRING && sub_platform == BRCM_DNX_PLATFORM_SUBSTRING &&
newTable.type.getName() == TABLE_TYPE_PFCWD)
{
if(!bindEgrAclTableToSwitch(newTable))
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of binding ACL table directly to switch, can we use ACL Table Group? If we use ACL Table, we could bind only one ACL to the switch bind point. ACL Table groups are used for port binding.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Instead of binding ACL table directly to switch, can we use ACL Table Group? If we use ACL Table, we could bind only one ACL to the switch bind point. ACL Table groups are used for port binding.

This was discussed in a previous meeting with both MSFT and BRCM. We understood the limitation, and decided to deferred this change later when we encounter the actual use case, i.e., we have multiple egress tables that need to bind to switch. @vmittal-msft

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. This is was discussed in BRCM meeting and decided to bind acl table instead of group since there no current use case for this. If need arise in future, we can enhance this and support.

@@ -5112,3 +5168,48 @@ void AclOrch::removeAllAclRuleStatus()
}
}

// Bind egress ACL table (with bind type switch) to switch
Copy link
Contributor

Choose a reason for hiding this comment

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

SwitchOrch already has the code to bind ACLGroup to the switch.

ReturnCode SwitchOrch::bindAclGroupToSwitch(const sai_acl_stage_t &group_stage, const referenced_object &acl_grp)

Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

}

// Unbind egress ACL table from swtich
bool AclOrch::unbindEgrAclTableFromSwitch(AclTable &table)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as bind aclTable, please use ACL Group instead of ACLTable and switchorch already has the code.

Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

@vmittal-msft
Copy link
Contributor

@ysmanman please check comments and re-base.

@ysmanman
Copy link
Contributor Author

@kperumalbfn , kindly review. @ysmanman , do you've plans to fix coverage?

Hi @prsunny , I chatted with @vmittal-msft yesterday about the code coverage issue. The missing code coverage was due to existing code not providing any code coverage for PfcWdAclHandler. So this is a test gap in current code. My PR unfortunately hit the test gap in coverage check. We need to fix the gap here. @vmittal-msft was suggesting to merge the PR first since the PR is required by 202405 and 202205 release, and then fixed coverage separately.

@prsunny
Copy link
Collaborator

prsunny commented Jun 25, 2024

@kperumalbfn , kindly review. @ysmanman , do you've plans to fix coverage?

Hi @prsunny , I chatted with @vmittal-msft yesterday about the code coverage issue. The missing code coverage was due to existing code not providing any code coverage for PfcWdAclHandler. So this is a test gap in current code. My PR unfortunately hit the test gap in coverage check. We need to fix the gap here. @vmittal-msft was suggesting to merge the PR first since the PR is required by 202405 and 202205 release, and then fixed coverage separately.

ok, we can take that separately. waiting for reviewers to sign-off

orchagent/aclorch.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@kperumalbfn kperumalbfn left a comment

Choose a reason for hiding this comment

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

LGTM

@vmittal-msft
Copy link
Contributor

@ysmanman please re-base.

@prsunny prsunny merged commit b02181a into sonic-net:master Jun 28, 2024
16 of 17 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-swss that referenced this pull request Aug 2, 2024
…#3136)

* Use shared egress ACL table for PFCWD in BRCM DNX platform.

Today PFCWD uses separate egress ACL tables, one table for each traffic class.
This may result in ACL resource overflow when other features that also need
egress ACL table is enabled at the same time, e.g., MACSEC. ( See
sonic-net/sonic-buildimage#17839 for details).

The fix is to use shared egress ACL table for PFCWD in BRCM DNX platform.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #3250

mssonicbld pushed a commit that referenced this pull request Aug 3, 2024
* Use shared egress ACL table for PFCWD in BRCM DNX platform.

Today PFCWD uses separate egress ACL tables, one table for each traffic class.
This may result in ACL resource overflow when other features that also need
egress ACL table is enabled at the same time, e.g., MACSEC. ( See
sonic-net/sonic-buildimage#17839 for details).

The fix is to use shared egress ACL table for PFCWD in BRCM DNX platform.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

9 participants