Skip to content

Commit

Permalink
Add ACL actions for setting inner MACs (#2079)
Browse files Browse the repository at this point in the history
Add actions SET_INNER_SRC_MAC and SET_INNER_DST_MAC
for tunneled packets to be able to override inner
values independently from router based on ACL policy.

Signed-off-by: Marian Pritsak <[email protected]>
  • Loading branch information
marian-pritsak authored Feb 20, 2025
1 parent 6168071 commit 7157445
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion inc/saiacl.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,12 @@ typedef enum _sai_acl_action_type_t

/** Disable packet trim */
SAI_ACL_ACTION_TYPE_PACKET_TRIM_DISABLE = 0x00000039,

/** Set Packet inner Src MAC Address */
SAI_ACL_ACTION_TYPE_SET_INNER_SRC_MAC = 0x0000003a,

/** Set Packet inner Dst MAC Address */
SAI_ACL_ACTION_TYPE_SET_INNER_DST_MAC = 0x0000003b,
} sai_acl_action_type_t;

/**
Expand Down Expand Up @@ -3303,10 +3309,28 @@ typedef enum _sai_acl_entry_attr_t
*/
SAI_ACL_ENTRY_ATTR_ACTION_PACKET_TRIM_DISABLE = SAI_ACL_ENTRY_ATTR_ACTION_START + 0x39,

/**
* @brief Set Packet Inner Src MAC Address
*
* @type sai_acl_action_data_t sai_mac_t
* @flags CREATE_AND_SET
* @default disabled
*/
SAI_ACL_ENTRY_ATTR_ACTION_SET_INNER_SRC_MAC = SAI_ACL_ENTRY_ATTR_ACTION_START + 0x3a,

/**
* @brief Set Packet Inner Dst MAC Address
*
* @type sai_acl_action_data_t sai_mac_t
* @flags CREATE_AND_SET
* @default disabled
*/
SAI_ACL_ENTRY_ATTR_ACTION_SET_INNER_DST_MAC = SAI_ACL_ENTRY_ATTR_ACTION_START + 0x3b,

/**
* @brief End of Rule Actions
*/
SAI_ACL_ENTRY_ATTR_ACTION_END = SAI_ACL_ENTRY_ATTR_ACTION_PACKET_TRIM_DISABLE,
SAI_ACL_ENTRY_ATTR_ACTION_END = SAI_ACL_ENTRY_ATTR_ACTION_SET_INNER_DST_MAC,

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

0 comments on commit 7157445

Please sign in to comment.