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

[MUX/PFCWD] Use in_ports for acls instead of seperate ACL table #1670

Merged
merged 2 commits into from
Mar 17, 2021

Conversation

prsunny
Copy link
Collaborator

@prsunny prsunny commented Mar 12, 2021

What I did

  1. Use ACL_TABLE_DROP for both PFC_WD and MUX
  2. Use MATCH_IN_PORTS instead of binding port to ACL table and program single ACL rule
  3. Updated PFC_WD code for generic handling and use class data within member function.
  4. Update ACL rule by modifying IN_PORTS bitmap during mux transitions
  5. VS test to cover the new changes

Why I did it
Optimize ACL TCAM use

How I verified it
Run test on DUT and validated the PBMP

Details if related

@@ -101,7 +102,7 @@ class MuxCable
bool stateInitActive();
bool stateStandby();

bool aclHandler(sai_object_id_t, bool add = true);
bool aclHandler(sai_object_id_t, string, bool add = true);
Copy link
Contributor

Choose a reason for hiding this comment

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

can we give the rest of the parameters names?

Comment on lines +741 to +745
AclRule* rule = gAclOrch->getAclRule(table_name, rule_name);
if (rule == nullptr)
{
SWSS_LOG_THROW("ACL Rule does not exist for port %s, rule %s", alias_.c_str(), rule_name.c_str());
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we guaranteed there will always be a rule here? If there's no PFC storm and no switchover then won't we throw an unnecessary exception?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes it is guaranteed; In the constructor, we always create an ACL rule and in this destructor, it would be an exception if we don't find the rule. Same is done for pfwdacl as well, @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.

AH this is the handler not the orch, I understand now. Thanks!

@prsunny prsunny merged commit e6d9790 into sonic-net:master Mar 17, 2021
@prsunny prsunny deleted the acl branch March 17, 2021 18:13
daall pushed a commit that referenced this pull request Mar 19, 2021
*Use ACL_TABLE_DROP for both PFC_WD and MUX
*Use MATCH_IN_PORTS instead of binding port to ACL table and program single ACL rule
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-swss that referenced this pull request Oct 5, 2021
…c-net#1670)

*Use ACL_TABLE_DROP for both PFC_WD and MUX
*Use MATCH_IN_PORTS instead of binding port to ACL table and program single ACL rule
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
What I did
HLD for Dump Utility: HLD.

Added the COPP Module to the Debug Dump Utility
Added the Corresponding UT's
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
What I did
Implemented vlan and vlan_member modules for debug dump utility.

How I did it
Used infrastructure and followed examples in
sonic-net#1666
sonic-net#1667
sonic-net#1668
sonic-net#1669
sonic-net#1670

How to verify it
On switch: dump state vlan <vlan_name>
dump state vlan_member '<vlan_name|<member_name>'
Unit test: pytest-3 dump_tests/module_tests/vlan_test.py (same test file covers both vlan and vlan_member)
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