Change default value of ACL Counter attribute#2247
Change default value of ACL Counter attribute#2247Shaigai21 wants to merge 1 commit intoopencomputeproject:masterfrom
Conversation
According to notes above, Byte Counter should be created by default. Signed-off-by: Mastah <blackmastah21@gmail.com>
| * @type bool | ||
| * @flags CREATE_ONLY | ||
| * @default false | ||
| * @default true |
There was a problem hiding this comment.
I think it makes more sense to change default to true on packet count (or both), and fix the comment.
What does this comment mean? "Only Byte count used which is set to disable". I think it should be changed to "Only Byte count used". Meaning it is illegal to create a counter which counts only bytes and not packets.
There was a problem hiding this comment.
You should read the whole paragraph. "By default, Byte Counter would be created and following use of the below attributes would result in an error." So the cases below are ones that lead to an error: disabling byte count and not enabling packet count means that counter does not count anything. Only configurations with at least one enabled counter are allowed, but the Byte Counter is enabled by default.
There was a problem hiding this comment.
OK. Understood. I agree that your change aligns with the comment
From inc/saiacl.h:
According to the comment above, default value for enabling byte count is true.
But for SAI_ACL_COUNTER_ATTR_ENABLE_BYTE_COUNT it is set to false: