-
Couldn't load subscription status.
- Fork 546
Fix bug of creating metadata for custom attribute SAI_ACL_ENTRY/TABLE_ATTR_(FIELD/ACTION) #2201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
iamjustadd
commented
Aug 29, 2025
|
@kcudnik , it's a new commit.
|
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
| for (; meta_acl_entry[index] != NULL; index++) | ||
| { | ||
| if (meta_acl_entry[index]->attrid == SAI_ACL_ENTRY_ATTR_ACTION_CUSTOM_RANGE_BASE) | ||
| { | ||
| break; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is pointless, nothing happens here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? I think here is to move the index to the first custom attribute of SAI_ACL_ENTRY_ATTR_ACTION_*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment then whats happening, and check if index gets at the last element then log error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added comment for this loop.
This function is to check whether the number of attributes acl_entry_action_* is matched with sai_acl_action_type , in another word, assert that user defined attribute acl_entry_action which must have a correspond acl_action_tyoe.
At line 5136 have this assertion:
META_ASSERT_TRUE(enum_index == sai_metadata_enum_sai_acl_action_type_t.valuescount,
"number of acl entry action mismatch vs number of enums in sai_acl_action_type_t");
If User not create custom attribute of ACL_ENTRY_ACTION, then here will loop till the
meta_acl_entry[index] == NULL(hit the last).
This is not an ERROR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tjchadaga @kcudnik Hi gentlemen, Any other comments?
4f2ae9a to
b9ab173
Compare
SAI_ACL_ENTRY_ATTR(/_FIELD/_ACTION)_CUSTOM_RANGE_START to
SAI_ACL_ENTRY_ATTR(/_FIELD/_ACTION)_CUSTOM_RANGE_END
2. Remove all SAI_*_CUSTOM_RANGE_START/END, using SAI_*_CUSTOM_RANGE_BASE instead.
3. Adjust metadata generator to compitable with above changes.
Signed-off-by: Martin Liao <[email protected]>