Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion inc/saiacl.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ typedef enum _sai_acl_action_type_t
/** Bind a TAM object */
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.


/** Custom range base value */
SAI_ACL_ACTION_TYPE_CUSTOM_RANGE_BASE = 0x10000000

Expand Down Expand Up @@ -3529,10 +3532,20 @@ typedef enum _sai_acl_entry_attr_t
*/
SAI_ACL_ENTRY_ATTR_ACTION_TAM_OBJECT = SAI_ACL_ENTRY_ATTR_ACTION_START + 0x3d,

/**
* @brief Redirect Packet to a port or LAG destination as the original, unmodified packet
*
* @type sai_acl_action_data_t sai_object_id_t
* @flags CREATE_AND_SET
* @objects SAI_OBJECT_TYPE_PORT, SAI_OBJECT_TYPE_LAG
* @default disabled
*/
SAI_ACL_ENTRY_ATTR_ACTION_REDIRECT_ORIGINAL_PACKET = SAI_ACL_ENTRY_ATTR_ACTION_START + 0x3e,

/**
* @brief End of Rule Actions
*/
SAI_ACL_ENTRY_ATTR_ACTION_END = SAI_ACL_ENTRY_ATTR_ACTION_TAM_OBJECT,
SAI_ACL_ENTRY_ATTR_ACTION_END = SAI_ACL_ENTRY_ATTR_ACTION_REDIRECT_ORIGINAL_PACKET,

/**
* @brief End of ACL Entry attributes
Expand Down
Loading