Add SAI_ACL_TABLE_ATTR_FIELD_MIRROR_COPY#2274
Add SAI_ACL_TABLE_ATTR_FIELD_MIRROR_COPY#2274mobinmohan wants to merge 1 commit intoopencomputeproject:masterfrom
Conversation
b9f44cd to
cd28e05
Compare
This change introduces a new ACL match field `MIRROR_COPY` to allow ACLs to match based on whether the packet is a mirror copy. Signed-off-by: Mobin Mohan <mobinmohan@google.com>
cd28e05 to
0ae367c
Compare
Pleas provide description of the PR |
|
@mobinmohan Is it an ingress mirror or egress mirror copy match condition. |
The attribute was to match both ingress and egress mirror copies. However, I can change the type from |
I don't think we need to have type_t. Typically there is no case where ingress mirror copy needs an egress ACL rule for match action as the mirror copy is taken out to the mirror port directly but I am not very sure about it. Is that a use case for you? |
| * @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, |
There was a problem hiding this comment.
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_ENDthen 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
No description provided.