Skip to content

Commit 1fc21bb

Browse files
committed
Add SAI_ACL_TABLE_ATTR_FIELD_MIRROR_COPY_TYPE
This change introduces a new ACL match field `MIRROR_COPY_TYPE` to allow ACLs to match based on whether the packet is a mirror copy. It allows ACLs to match based on the type of mirror copy (Ingress, Egress, or Any) Signed-off-by: Mobin Mohan <mobinmohan@google.com>
1 parent 9ca8312 commit 1fc21bb

1 file changed

Lines changed: 38 additions & 2 deletions

File tree

inc/saiacl.h

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,24 @@ typedef enum _sai_acl_table_group_member_attr_t
587587

588588
} sai_acl_table_group_member_attr_t;
589589

590+
/**
591+
* @brief Mirror copy type for ACL matching
592+
*/
593+
typedef enum _sai_acl_mirror_copy_type_t
594+
{
595+
/** Match packets that are not mirror copies */
596+
SAI_ACL_MIRROR_COPY_TYPE_NONE,
597+
598+
/** Match packets that are ingress mirror copies */
599+
SAI_ACL_MIRROR_COPY_TYPE_INGRESS,
600+
601+
/** Match packets that are egress mirror copies */
602+
SAI_ACL_MIRROR_COPY_TYPE_EGRESS,
603+
604+
/** Match packets that are any mirror copy (either ingress or egress) */
605+
SAI_ACL_MIRROR_COPY_TYPE_ANY
606+
} sai_acl_mirror_copy_type_t;
607+
590608
/**
591609
* @brief ACL User Defined Field Attribute ID Range
592610
*/
@@ -1647,10 +1665,19 @@ typedef enum _sai_acl_table_attr_t
16471665
*/
16481666
SAI_ACL_TABLE_ATTR_FIELD_CSIG_D_BIT = SAI_ACL_TABLE_ATTR_FIELD_START + 0x166,
16491667

1668+
/**
1669+
* @brief Match on mirror copy type
1670+
*
1671+
* @type bool
1672+
* @flags CREATE_ONLY
1673+
* @default false
1674+
*/
1675+
SAI_ACL_TABLE_ATTR_FIELD_MIRROR_COPY_TYPE = SAI_ACL_TABLE_ATTR_FIELD_START + 0x167,
1676+
16501677
/**
16511678
* @brief End of ACL Table Match Field
16521679
*/
1653-
SAI_ACL_TABLE_ATTR_FIELD_END = SAI_ACL_TABLE_ATTR_FIELD_CSIG_D_BIT,
1680+
SAI_ACL_TABLE_ATTR_FIELD_END = SAI_ACL_TABLE_ATTR_FIELD_MIRROR_COPY_TYPE,
16541681

16551682
/**
16561683
* @brief ACL table entries associated with this table.
@@ -2825,10 +2852,19 @@ typedef enum _sai_acl_entry_attr_t
28252852
*/
28262853
SAI_ACL_ENTRY_ATTR_FIELD_CSIG_D_BIT = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x166,
28272854

2855+
/**
2856+
* @brief Match on mirror copy type
2857+
*
2858+
* @type sai_acl_field_data_t sai_acl_mirror_copy_type_t
2859+
* @flags CREATE_AND_SET
2860+
* @default disabled
2861+
*/
2862+
SAI_ACL_ENTRY_ATTR_FIELD_MIRROR_COPY_TYPE = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x167,
2863+
28282864
/**
28292865
* @brief End of Rule Match Fields
28302866
*/
2831-
SAI_ACL_ENTRY_ATTR_FIELD_END = SAI_ACL_ENTRY_ATTR_FIELD_CSIG_D_BIT,
2867+
SAI_ACL_ENTRY_ATTR_FIELD_END = SAI_ACL_ENTRY_ATTR_FIELD_MIRROR_COPY_TYPE,
28322868

28332869
/*
28342870
* Actions [sai_acl_action_data_t]

0 commit comments

Comments
 (0)