Skip to content

Commit 556a3d4

Browse files
committed
[ACL] Add support for REDIRECT_ORIGINAL_PACKET action
Introduce 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.
1 parent 91e6b86 commit 556a3d4

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

inc/saiacl.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ typedef enum _sai_acl_action_type_t
324324
/** Bind a TAM object */
325325
SAI_ACL_ACTION_TYPE_TAM_OBJECT = 0x0000003d,
326326

327+
/** Set Redirect Original Packet */
328+
SAI_ACL_ACTION_TYPE_REDIRECT_ORIGINAL_PACKET = 0x0000003e,
329+
327330
/** Custom range base value */
328331
SAI_ACL_ACTION_TYPE_CUSTOM_RANGE_BASE = 0x10000000
329332

@@ -3529,10 +3532,20 @@ typedef enum _sai_acl_entry_attr_t
35293532
*/
35303533
SAI_ACL_ENTRY_ATTR_ACTION_TAM_OBJECT = SAI_ACL_ENTRY_ATTR_ACTION_START + 0x3d,
35313534

3535+
/**
3536+
* @brief Redirect Packet to a port or LAG destination as the original, unmodified packet
3537+
*
3538+
* @type sai_acl_action_data_t sai_object_id_t
3539+
* @flags CREATE_AND_SET
3540+
* @objects SAI_OBJECT_TYPE_PORT, SAI_OBJECT_TYPE_LAG
3541+
* @default disabled
3542+
*/
3543+
SAI_ACL_ENTRY_ATTR_ACTION_REDIRECT_ORIGINAL_PACKET = SAI_ACL_ENTRY_ATTR_ACTION_START + 0x3e,
3544+
35323545
/**
35333546
* @brief End of Rule Actions
35343547
*/
3535-
SAI_ACL_ENTRY_ATTR_ACTION_END = SAI_ACL_ENTRY_ATTR_ACTION_TAM_OBJECT,
3548+
SAI_ACL_ENTRY_ATTR_ACTION_END = SAI_ACL_ENTRY_ATTR_ACTION_REDIRECT_ORIGINAL_PACKET,
35363549

35373550
/**
35383551
* @brief End of ACL Entry attributes

0 commit comments

Comments
 (0)