-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Egress mirroring and ACL action support check via SAI HLD #411
Conversation
questions: |
@stcheng Yes, in SAI there is no such prohibitions. To support this scenario in sonic we might need to change the schema: Besides, we may also consider to change the redirect action, because there is no way to create rule with forward and redirect at the same time (same 'packet_action' key). So if we will change this for mirror action I would also like to have redirect as a seperate key ('redirect_action' and not part of 'packet_action') and of course preserving backwards compatibility with old schema. This will be more aligned with SAI types. e.g:
|
my consideration is that we could use
In order to retain the backward compatibility, we could still have the I agree that we could move redirect out of the current
What do you think? |
@stcheng Good, so I'll update PRs |
Below is for switch capability query: what about the following format?
The above indicates that the switch supports ingress ACL with four different actions while egress ACL with two actions. I don't know if a secondary query for the supported |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the comments
@stcheng |
@stcheng |
Sure. Also, do you have a plan to talk about this during a community meeting? |
@@ -86,6 +106,7 @@ private: | |||
void queryAclCapabilities(); | |||
|
|||
std::map<sai_acl_stage_t, std::set<sai_acl_action_type_t>> m_aclStageCapabilities; | |||
std::map<sai_acl_entry_attr_t, std::set<int32_t>> m_aclEnumActionCapabilities; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to m_aclPacketActionCapabilities?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stcheng This map is not only for PACKET_ACTION, there is also ACTION_DTEL_FLOW_OP which value is enum and can be validated
{ | ||
"ACL_RULE": { | ||
"EVERFLOW|RULE_1": { | ||
"MIRROR_EGRESS_ACTION": "everflow0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each acl table has binding point, egress or ingress.
Are we allowing ingress acl to have egress mirror action? or we should restrict only egress acl have egress mirror action, meanwhile, ingress acl can have ingress mirror action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lguohan
There is not restriction. EVERFLOW table in example can be either ingress stage or egress stage.
Application (acl-loader) should look in SWITCH_CAPABILITY table to check if action is supported on specific acl table stage.
The example below in the design shows the capability table example on Mellanox.
So you can see that on Mellanox egress mirror on ingress acl is not supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not clear the relationship between egress mirror action v.s acl binding point. Need to make it more clear.
One question here: what would be the sequence of decap and ingress ACL/mirror? will the packet get encapsulated first or match the ACL rules or get copied first? |
should go to master branch. |
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
…versa Signed-off-by: Stepan Blyschak <stepanb@mellanox.com>
c961d05
to
e32dc9f
Compare
@lguohan changed to master |
No description provided.