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

[aclorch]: add support for acl rule to match out port #810

Merged
merged 7 commits into from
Jan 29, 2020

Conversation

shine4chen
Copy link
Contributor

@shine4chen shine4chen commented Mar 8, 2019

What I did
ACL rule can match out port. Out port could be port intf , lag or vlan.

Why I did it
mclag need acl rule can bind to LAG and acl rule can match out port.

How I verified it
test it on nephos lab

Details if related

@shine4chen shine4chen changed the title Acl enhancement [aclorch]: add support for acl rule to match out port Mar 11, 2019
orchagent/aclorch.cpp Outdated Show resolved Hide resolved
orchagent/aclorch.cpp Outdated Show resolved Hide resolved
}
else if (port.m_type == Port::LAG)
{
m_outPorts.push_back(port.m_lag_id);
Copy link
Contributor

Choose a reason for hiding this comment

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

Choose a reason for hiding this comment

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

Thinks, we will delete LAG port.

* Aclorch can be the consumer of the APP_ACL_TABLE_NAME and
  APP_ACL_RULE_TABLE_NAME tables in APP_DB
* ACL rule can match out port

Signed-off-by: shine.chen <shine.chen@nephosinc.com>
Signed-off-by: leo.li <leo.li@nephosinc.com>
@leoli-nps
Copy link
Contributor

The corresponding VS test case has been added, please review.

Signed-off-by: shine.chen <shine.chen@nephosinc.com>
@stcheng
Copy link
Contributor

stcheng commented Jul 23, 2019

could you resolve the conflicts?

Signed-off-by: shine.chen <shine.chen@nephosinc.com>
@shine4chen
Copy link
Contributor Author

@stcheng we have fixed the conflicts.

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

lguohan commented Aug 1, 2019

where is the mclag design spec? since out_ports match are not supported in various asic vendor. we need a more generic approach to address this need.

@lguohan lguohan requested a review from rlhui August 1, 2019 17:54
@shine4chen
Copy link
Contributor Author

shine4chen commented Aug 2, 2019

@lguohan we have discuss it with BRCM folks in sonic-mclag-subgroup. There is a workaround in SAI layer by combination of ingress acl and egress acl. With this workaround most vendors can support out-ports.

The following is the isolation logic description copied from MCLAG-HLD

  • In ASIC, ACL rule is used to isolate peer link from MC-LAG port. The rule is when the traffic is received from peer link and the output port is MC-LAG member port, the traffic must be dropped. For the chips whose ACL rule can't support out-port, there is a workaround in SAI layer by combination of ingress acl and egress acl. An alternative approach is to use isolation group. Isolation group still have some weakness, First isolation group can't support tunnel-port and orchagent doesn't support it currently. secondly isolation group may not be supported by all ASIC vendors. Using ACL is a more generic way to support the isolation function. We can refine this function to use isolation group later if it’s required.

@lguohan
Copy link
Contributor

lguohan commented Sep 18, 2019

unless Broadcom SAI as well as other vendor SAI has implemented outPorts, merging this PR will immediately break the image.

@lguohan
Copy link
Contributor

lguohan commented Sep 18, 2019

isolation group is much more generic and different ASIC can choose different way to implement. Not all ASIC verdors have the same workaround as broadcom. I do not see a reason why we cannot add LAG into isolation group, it is a simple metadata change.

@shine4chen
Copy link
Contributor Author

@lguohan Thanks for the feedback. The following is my answer for your concern.

  1. Mclag feature is not enabled by default. So even for the vendor who doesn't work around acl-outport it wouldn't break the image by default. If vendor like to enable the mclag , of course it need to fix up.
  2. In the existing master branch , saiisolationgroup.h isn't included and orchagent support is missing too. So needless to mention SAI support. Nephos team plans to include mclag feature on 201910 release. As time is limited could community accept this PR now? We can refine the isolation code on our next release.

@adyeung
Copy link

adyeung commented Sep 20, 2019

BRCM will implement an isolation group solution for ingress filtering instead of outPorts, pkts will be dropped at the ingress instead of queueing for egress drop. Design proposal along with other MCLAG improvements will be shared in the upcoming BRCM enhancement HLD.

Copy link

@adyeung adyeung left a comment

Choose a reason for hiding this comment

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

BRCM team has completed the review, we have no further request or comment to add, please proceed to the next steps.

@shine4chen
Copy link
Contributor Author

retest this please

1 similar comment
@shine4chen
Copy link
Contributor Author

retest this please

merge azure/sonic-swss to aclorch branch
Signed-off-by: shine.chen <shine.chen@mediatek.com>
@rlhui rlhui requested a review from prsunny November 16, 2019 00:50
@shine4chen
Copy link
Contributor Author

retest this please

3 similar comments
@shine4chen
Copy link
Contributor Author

retest this please

@shine4chen
Copy link
Contributor Author

retest this please

@shine4chen
Copy link
Contributor Author

retest this please

@lguohan lguohan merged commit be867dc into sonic-net:master Jan 29, 2020
lguohan pushed a commit that referenced this pull request Jan 30, 2020
ACL rule can match out port. Out port could be port intf , lag or vlan.

Signed-off-by: shine.chen <shine.chen@nephosinc.com>
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…b-cli/sonic-db-dump (sonic-net#810)

* [MultiDB] sonic-utilities - replace redis-cli/redis-dump with sonic-db-cli/sonic-db-dump
* only accept upper and underscore to prevent injection
* quotation on db_name
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.

9 participants