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
22 changes: 20 additions & 2 deletions inc/saiacl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1647,10 +1647,19 @@ typedef enum _sai_acl_table_attr_t
*/
SAI_ACL_TABLE_ATTR_FIELD_CSIG_D_BIT = SAI_ACL_TABLE_ATTR_FIELD_START + 0x166,

/**
* @brief Match on a mirror copy packet
*
* @type bool
* @flags CREATE_ONLY
* @default false
*/
SAI_ACL_TABLE_ATTR_FIELD_MIRROR_COPY = SAI_ACL_TABLE_ATTR_FIELD_START + 0x167,

/**
* @brief End of ACL Table Match Field
*/
SAI_ACL_TABLE_ATTR_FIELD_END = SAI_ACL_TABLE_ATTR_FIELD_CSIG_D_BIT,
SAI_ACL_TABLE_ATTR_FIELD_END = SAI_ACL_TABLE_ATTR_FIELD_MIRROR_COPY,

/**
* @brief ACL table entries associated with this table.
Expand Down Expand Up @@ -2825,10 +2834,19 @@ typedef enum _sai_acl_entry_attr_t
*/
SAI_ACL_ENTRY_ATTR_FIELD_CSIG_D_BIT = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x166,

/**
* @brief Match on a mirror copy packet
*
* @type sai_acl_field_data_t bool
* @flags CREATE_AND_SET
* @default disabled
*/
SAI_ACL_ENTRY_ATTR_FIELD_MIRROR_COPY = SAI_ACL_ENTRY_ATTR_FIELD_START + 0x167,

/**
* @brief End of Rule Match Fields
*/
SAI_ACL_ENTRY_ATTR_FIELD_END = SAI_ACL_ENTRY_ATTR_FIELD_CSIG_D_BIT,
SAI_ACL_ENTRY_ATTR_FIELD_END = SAI_ACL_ENTRY_ATTR_FIELD_MIRROR_COPY,
Copy link
Copy Markdown
Collaborator

@kcudnik kcudnik Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm wondering whether we should make those as last item, not equal to last valid item, all _END attributes in all SAI are defined after last valid enum item, except those 4:

saiacl.h:    SAI_ACL_TABLE_ATTR_FIELD_END = SAI_ACL_TABLE_ATTR_FIELD_CSIG_D_BIT,
saiacl.h:    SAI_ACL_TABLE_ATTR_FIELD_VALID_BITS_END = SAI_ACL_TABLE_ATTR_FIELD_VALID_BITS_DST_IPV6,
saiacl.h:    SAI_ACL_ENTRY_ATTR_FIELD_END = SAI_ACL_ENTRY_ATTR_FIELD_CSIG_D_BIT,
saiacl.h:    SAI_ACL_ENTRY_ATTR_ACTION_END = SAI_ACL_ENTRY_ATTR_ACTION_TAM_OBJECT,

which requires alywas to set change those after adding new values

we could redefine those 4 and not have to touch them every time, then we could have consistency across all SAI

proble could be for

1753     SAI_ACL_TABLE_ATTR_FIELD_VALID_BITS_END = SAI_ACL_TABLE_ATTR_FIELD_VALID_BITS_DST_IPV6,
1754 
1755     /**
1756      * @brief End of ACL Table attributes
1757      */
1758     SAI_ACL_TABLE_ATTR_END,
1759 

3480     SAI_ACL_ENTRY_ATTR_ACTION_END = SAI_ACL_ENTRY_ATTR_ACTION_TAM_OBJECT,
3481 
3482     /**
3483      * @brief End of ACL Entry attributes
3484      */
3485     SAI_ACL_ENTRY_ATTR_END,
3486 

since if we made it like this:

SAI_ACL_TABLE_ATTR_FIELD_VALID_BITS_END,
SAI_ACL_TABLE_ATTR_END


SAI_ACL_ENTRY_ATTR_ACTION_END,
SAI_ACL_ENTRY_ATTR_END

then SAI_ACL_TABLE_ATTR_END and SAI_ACL_ENTRY_ATTR_END will not point to last valid attribute but rather SAI_ACL_TABLE_ATTR_FIELD_VALID_BITS_END and SAI_ACL_ENTRY_ATTR_ACTION_END which are just markers


/*
* Actions [sai_acl_action_data_t]
Expand Down
Loading