From 0b787063c5841b5ca611c878bf59a45d67632990 Mon Sep 17 00:00:00 2001 From: Mobin Mohan Date: Mon, 20 Jul 2026 21:00:42 +0000 Subject: [PATCH] [ACL] Add support for REDIRECT_ORIGINAL_PACKET action 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. --- inc/saiacl.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/inc/saiacl.h b/inc/saiacl.h index fa6b60904..9522c52ed 100644 --- a/inc/saiacl.h +++ b/inc/saiacl.h @@ -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, + /** Custom range base value */ SAI_ACL_ACTION_TYPE_CUSTOM_RANGE_BASE = 0x10000000 @@ -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