support to check SAI capability of ACL META_DATA fields #3274
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What I did
Added support to check if the platform supports the following SAI attributes.
This changes also gets the platform supported range for matadata value.
SAI_SWITCH_ATTR_ACL_USER_META_DATA_RANGE
SAI_ACL_ENTRY_ATTR_ACTION_SET_ACL_META_DATA
SAI_ACL_ENTRY_ATTR_FIELD_ACL_USER_META
Why I did it
For ACL outer DSCP change feature, these attributes are required.
How I verified it
Basic verification done in VS enviornment
Aug 23 23:13:37.191745 0066f13dd278 WARNING #orchagent: :- init: Could not get range for ACL_USER_META_DATA_RANGE -15
Aug 23 23:13:37.191756 0066f13dd278 NOTICE #orchagent: :- init: ACL_USER_META_DATA_RANGE capability 1
Aug 23 23:13:37.192269 0066f13dd278 NOTICE #orchagent: :- init: ACL_ENTRY_ATTR_FIELD_ACL_USER_META capability 1
Aug 23 23:13:37.192705 0066f13dd278 NOTICE #orchagent: :- init: ACL_ENTRY_ATTR_ACTION_SET_ACL_META_DATA capability 1
Mlnx 2700 T1
Details if related