-
Notifications
You must be signed in to change notification settings - Fork 477
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
Extension Range for SAI Hash #1939
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Jai Kumar <[email protected]>
@@ -208,6 +208,11 @@ typedef enum _sai_hash_algorithm_t | |||
/** Combination of CRC and XOR based hash algorithm */ | |||
SAI_HASH_ALGORITHM_CRC_XOR = 6, | |||
|
|||
/** Custom range base value */ | |||
SAI_HASH_ALGORITHM_CUSTOM_RANGE_START = 0x00000100, |
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.
The enums are uint32 values, and it is unlikely that the custom hash algorithms or going to be tens of thousands more than standard hash algorithms.
So, we should make this 0x10000000 instead of 0x100 like every other custom range start.
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 you need to have custom range here? this is not an atteibute, current logic will not allow such range at enums
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.
Hi Kamil, We need to add vendor specific hash algorithms either because they are confidential or proprietary. But you are right, currently the tool chain allows it but if we add extensions then start throwing errors. There is another place such custom range is added and will have same problem https://github.com/JaiOCP/SAI/blob/85e106e8661d49403bf4f368913e44437d10a644/inc/saisrv6.h#L106 https://github.com/JaiOCP/SAI/blob/85e106e8661d49403bf4f368913e44437d10a644/inc/saisrv6.h#L54 Please help how this can be done. Regards, -Jai
…
On Thu, Jan 11, 2024 at 12:07 PM Kamil Cudnik @.> wrote: @.* commented on this pull request. ------------------------------ In inc/saiswitch.h <#1939 (comment)> : > @@ -208,6 +208,11 @@ typedef enum _sai_hash_algorithm_t /** Combination of CRC and XOR based hash algorithm / SAI_HASH_ALGORITHM_CRC_XOR = 6, + /* Custom range base value / + SAI_HASH_ALGORITHM_CUSTOM_RANGE_START = 0x00000100, why you need to have custom range here? this is not an atteibute, current logic will not allow such range at enums — Reply to this email directly, view it on GitHub <#1939 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKCSHLPQZ7D7HZLRTMMONIDYOBA65AVCNFSM6AAAAABAT4NRPSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQMJWGUZDOMBVGE\> . You are receiving this because you authored the thread.Message ID: @.**>
-- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.
Agree with Jai. We need to support custom ranges for such enums.
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.
Hi Kamil, We need to add vendor specific hash algorithms either because they are confidential or proprietary. But you are right, currently the tool chain allows it but if we add extensions then start throwing errors. There is another place such custom range is added and will have same problem https://github.com/JaiOCP/SAI/blob/85e106e8661d49403bf4f368913e44437d10a644/inc/saisrv6.h#L106 https://github.com/JaiOCP/SAI/blob/85e106e8661d49403bf4f368913e44437d10a644/inc/saisrv6.h#L54 Please help how this can be done. Regards, -Jai
…
On Thu, Jan 11, 2024 at 12:07 PM Kamil Cudnik @.> wrote: @.* commented on this pull request. ------------------------------ In inc/saiswitch.h <#1939 (comment)> : > @@ -208,6 +208,11 @@ typedef enum _sai_hash_algorithm_t /** Combination of CRC and XOR based hash algorithm / SAI_HASH_ALGORITHM_CRC_XOR = 6, + /* Custom range base value / + SAI_HASH_ALGORITHM_CUSTOM_RANGE_START = 0x00000100, why you need to have custom range here? this is not an atteibute, current logic will not allow such range at enums — Reply to this email directly, view it on GitHub <#1939 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKCSHLPQZ7D7HZLRTMMONIDYOBA65AVCNFSM6AAAAABAT4NRPSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQMJWGUZDOMBVGE\> . You are receiving this because you authored the thread.Message ID: @.**>
-- This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.
Agree with Jai. We need to support custom ranges for such enums.
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 updated check that custom ranges needs to start from 0x1000000
Hi Kamil,
We need to add vendor specific hash algorithms either because they are
confidential or proprietary.
But you are right, currently the tool chain allows it but if we add
extensions then start throwing errors.
There is another place such custom range is added and will have same problem
https://github.com/JaiOCP/SAI/blob/85e106e8661d49403bf4f368913e44437d10a644/inc/saisrv6.h#L106
https://github.com/JaiOCP/SAI/blob/85e106e8661d49403bf4f368913e44437d10a644/inc/saisrv6.h#L54
Please help how this can be done.
Regards,
-Jai
…On Thu, Jan 11, 2024 at 12:07 PM Kamil Cudnik ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In inc/saiswitch.h
<#1939 (comment)>
:
> @@ -208,6 +208,11 @@ typedef enum _sai_hash_algorithm_t
/** Combination of CRC and XOR based hash algorithm */
SAI_HASH_ALGORITHM_CRC_XOR = 6,
+ /** Custom range base value */
+ SAI_HASH_ALGORITHM_CUSTOM_RANGE_START = 0x00000100,
why you need to have custom range here? this is not an atteibute, current
logic will not allow such range at enums
—
Reply to this email directly, view it on GitHub
<#1939 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKCSHLPQZ7D7HZLRTMMONIDYOBA65AVCNFSM6AAAAABAT4NRPSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQMJWGUZDOMBVGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
This electronic communication and the information and any files transmitted
with it, or attached to it, are confidential and are intended solely for
the use of the individual or entity to whom it is addressed and may contain
information that is confidential, legally privileged, protected by privacy
laws, or otherwise restricted from disclosure to anyone else. If you are
not the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, you are hereby notified that any use,
copying, distributing, dissemination, forwarding, printing, or copying of
this e-mail is strictly prohibited. If you received this e-mail in error,
please return the e-mail to the sender, delete it from your computer, and
destroy any printed copy of it.
|
Will work on this to support in parser then you can add |
i just check that locally, and actually current validator allows such entries, and since this is enum extension not attribute extension, then this enum is not actually checked, we have custom ranges in enum in this commit: eaf2812, but they are pure workaround, and will be removed once workaround will be met, this should normally not be a apractice to add custom ranges to non attr enums, question here whether we should use extension start value as 0x100 or 0x10000000, i would suggest to use 0x10000000, since in some enums we have "ranges" which are in value slike 0x1000..0x1fff, 0x2000..0x2fff and so one, so everything that is outside possible valid extensions, should be allowed, and vendor specific extenstions should be in 0x10000000, i will add a check for that in the future to follow this rule |
i made check for that #1945, but we need to fix pipeline first on github to pass all runchecks |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Added extension range for sai_hash_algorithm_t