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

[ACL] Add support for COPY action #3288

Merged
merged 1 commit into from
Sep 23, 2024
Merged

Conversation

devpatha
Copy link
Contributor

What I did
Added COPY packet action, that uses SAI_PACKET_ACTION_COPY attribute.

Why I did it
This allows ACL to copy packets to CPU. It can be used to dump and debug transit packets.

How I verified it
Install the ACL with COPY action and verify that packets are punted towards the CPU with matching criteria.

Details if related

@prsunny prsunny merged commit 971dfc1 into sonic-net:master Sep 23, 2024
17 checks passed
@prsunny
Copy link
Collaborator

prsunny commented Sep 23, 2024

@bingwang-ms for viz

@devpatha
Copy link
Contributor Author

@prsunny Could we please get it in 202405? Shall I raise a separate PR for it?

mssonicbld pushed a commit to mssonicbld/sonic-swss that referenced this pull request Oct 29, 2024
What I did
Added COPY packet action, that uses SAI_PACKET_ACTION_COPY attribute.

Why I did it
This allows ACL to copy packets to CPU. It can be used to dump and debug transit packets.
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #3346

@bingwang-ms
Copy link
Contributor

@developfast , @prsunny Sorry I missed the review of this PR. The only concern for this change is different capabilities on different platforms. Not sure if we have checked that?
And some YANG model change is also required to support this new action.

@devpatha
Copy link
Contributor Author

@bingwang-ms shall I update yang to add PACKET_ACTION enumeration of COPY? https://github.com/sonic-net/SONiC/blob/master/sonic-acl.yang#L138
AFAIK if a platform doesn't have support for SAI_PACKET_ACTION_COPY, the ACL rule will remain inactive?

@bingwang-ms
Copy link
Contributor

@bingwang-ms shall I update yang to add PACKET_ACTION enumeration of COPY? https://github.com/sonic-net/SONiC/blob/master/sonic-acl.yang#L138 AFAIK if a platform doesn't have support for SAI_PACKET_ACTION_COPY, the ACL rule will remain inactive?

Yes, the YANG model needs to be updated.
If the new action is not supported, we need to ensure orchagent/syncd won't crash.

mssonicbld pushed a commit that referenced this pull request Oct 30, 2024
What I did
Added COPY packet action, that uses SAI_PACKET_ACTION_COPY attribute.

Why I did it
This allows ACL to copy packets to CPU. It can be used to dump and debug transit packets.
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.

4 participants