Skip to content

[ACL] Add support for REDIRECT_ORIGINAL_PACKET action - #2318

Open
mobinmohan wants to merge 1 commit into
opencomputeproject:masterfrom
mobinmohan:redirect_original_packet
Open

[ACL] Add support for REDIRECT_ORIGINAL_PACKET action#2318
mobinmohan wants to merge 1 commit into
opencomputeproject:masterfrom
mobinmohan:redirect_original_packet

Conversation

@mobinmohan

@mobinmohan mobinmohan commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Add SAI_ACL_ENTRY_ATTR_ACTION_REDIRECT_ORIGINAL_PACKET action to redirect packets to the destination without modification. This action is used to redirect the original copy of packet to a front panel port/lag.

How is this different from SAI_ACL_ACTION_TYPE_REDIRECT ?

Existing SAI_ACL_ACTION_TYPE_REDIRECT allows packets to go through egress editing(like L2/L3 rewrites) after ACL lookup. However, this new action sends packets to a Port or LAG without modifying them. It skips the egress stages like L2/L3 rewrite and VLAN editing, so the headers stay exactly the same as when they were first received by the switch.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@mobinmohan
mobinmohan force-pushed the redirect_original_packet branch from 71200f2 to 556a3d4 Compare July 20, 2026 21:01
Add SAI_ACL_ENTRY_ATTR_ACTION_REDIRECT_ORIGINAL_PACKET action
to support redirecting packets to a physical Port or LAG destination
same as received by the switch.

This action sends packets to a Port or LAG without modifying them. It
skips the egress stages like L2/L3 rewrite and VLAN editing, so the
headers stay exactly the same as when they were first received by the
switch.
@mobinmohan
mobinmohan force-pushed the redirect_original_packet branch from 556a3d4 to 0b78706 Compare July 20, 2026 22:26
Comment thread inc/saiacl.h
SAI_ACL_ACTION_TYPE_TAM_OBJECT = 0x0000003d,

/** Set Redirect Original Packet */
SAI_ACL_ACTION_TYPE_REDIRECT_ORIGINAL_PACKET = 0x0000003e,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How is this different from SAI_ACL_ACTION_TYPE_REDIRECT ?
Would this attr also use SAI_ACL_ACTION_TYPE_REDIRECT_LIST as the destination for redirected packets ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Existing SAI_ACL_ACTION_TYPE_REDIRECT allows packets to go through egress editing(like L2/L3 rewrites) after ACL lookup. However, this new action sends packets to a Port or LAG without modifying them. It skips the egress stages like L2/L3 rewrite and VLAN editing, so the headers stay exactly the same as when they were first received by the switch.

I have updated PR summary with these details.

Would this attr also use SAI_ACL_ACTION_TYPE_REDIRECT_LIST as the destination for redirected packets ?

I found the below lines in saiacl.h for REDIRECT_LIST. Hence a _LIST equivalent is not added for the new action.

     * This action is deprecated and will be removed in future release. In order to achieve the functionality,
     * please use redirect action with next hop group or L2MC group or IPMC group.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please capture the action resolution for parallel lookups and sequential lookups. Also if this is applicable only for ingress, should post ingress be skipped ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you update the comments.
I believe intent is that ingress packet is not modified at all. L3 as well as L2 data is intact i.e. no TTL changes and/or L2 rewrite.

@tjchadaga tjchadaga added the reviewed PR is discussed in SAI Meeting label Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewed PR is discussed in SAI Meeting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants