-
Notifications
You must be signed in to change notification settings - Fork 478
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
[meta][sai] Move extensions SAI and API to 0x20000000 range #2028
Conversation
To make this binary backward comparible for extension enums, instead of starting form _ATTR_END and prevent enum shift each time new attribute is added
Since we will move object type extensions to separate range we will need to update many shorcuts taken by sisanitych check when it was using obejct type as index to fast access arrays
@marian-pritsak please take a look |
This commit will be require to update sonic-sairedis repo with this commit: sonic-net/sonic-sairedis#1390 |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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 summary of the SAI discussion was :
- Custom range is to be used for attributes/enums/stats for vendor specific attrs
- The newly added extensions' base is to be used for attributes/enums/stats to be defined in experimental directory (for experimental features)
- Extensions base is added to switch and port since they are the only ones used in SAI extensions. Extensions based will be added to other objects when they are needed.
Update OID format to support new extensions range base More info in PR: opencomputeproject/SAI#2028
NOTE: sai backward compatibility for enums is not checked in experimental directory due the dash api are changing often, we could enable backward compatibility check for specific apis/types, let me know |
Update OID format to support new extensions range base More info in PR: opencomputeproject/SAI#2028
@@ -302,11 +302,7 @@ typedef enum _sai_object_type_t | |||
/** Must remain in last position */ | |||
SAI_OBJECT_TYPE_MAX, | |||
|
|||
/** Custom range base value */ | |||
SAI_OBJECT_TYPE_CUSTOM_RANGE_START = 256, |
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, just found that these attributes are removed. do we need to keep them but maybe with a different value?
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.
currenty those are not needed, and they were added to fix gcc error, do a git blame and find commit for that change, if we want to add those back, then they need to start as custom range for other enums 0x10000000
yea, I believe this is ok. maybe some day what we need to do it to move dash outside of the experiment folder but into another folder maybe called extension |
Ping |
…uteproject#2028) * [meta][sai] Move extensions SAI and API to 0x20000000 range To make this binary backward comparible for extension enums, instead of starting form _ATTR_END and prevent enum shift each time new attribute is added * [meta] Update saisanitycheck to not use object type as index Since we will move object type extensions to separate range we will need to update many shorcuts taken by sisanitych check when it was using obejct type as index to fast access arrays Signed-off-by: siqbal1986 <[email protected]>
Fixed the RPC build failure in sonic-net/sonic-buildimage#20322. The PR #2028 introduced some SAI header file changes and Since Vendor (ex BCM) SAI header files do not have these changes and also the sai-thrift includes the sai header files installed from Vendor SAI debian package, the saithrift build fails. This PR modifies the sai-thrift make to include the SAI header files from sai-redis SAI/inc folder instead of the SAI headers installed from Vendor SAI debian package. Signed-off-by: saksarav <[email protected]>
…uteproject#2028) * [meta][sai] Move extensions SAI and API to 0x20000000 range To make this binary backward comparible for extension enums, instead of starting form _ATTR_END and prevent enum shift each time new attribute is added * [meta] Update saisanitycheck to not use object type as index Since we will move object type extensions to separate range we will need to update many shorcuts taken by sisanitych check when it was using obejct type as index to fast access arrays
Fixed the RPC build failure in sonic-net/sonic-buildimage#20322. The PR opencomputeproject#2028 introduced some SAI header file changes and Since Vendor (ex BCM) SAI header files do not have these changes and also the sai-thrift includes the sai header files installed from Vendor SAI debian package, the saithrift build fails. This PR modifies the sai-thrift make to include the SAI header files from sai-redis SAI/inc folder instead of the SAI headers installed from Vendor SAI debian package. Signed-off-by: saksarav <[email protected]>
i decribed issue on the on the github comment: and yes, if if DASH is implemented in the SAI lib, on older version thatn v1.15.0 then it's before enums DASH shifted, so if we use v1.15.0 headers with v1.14.0 libsai, then new port attributes will overlay DASH extensions, and return output will not match the attribute type i proposed solution for that to update metadata for each attribute with specific attribute version when it was introduced, so comparing version with libsai will prevent that of course for dash attributes, currently syncd is not using that, but that enum shift to range 0x20000000 is not backward compatible, so there is no easy fix for that, also syncd is not doing discovery on experimental headers, and since they can change any time, then there is no point to assign version to those attributes |
Fixed the RPC build failure in sonic-net/sonic-buildimage#20322. The PR #2028 introduced some SAI header file changes and Since Vendor (ex BCM) SAI header files do not have these changes and also the sai-thrift includes the sai header files installed from Vendor SAI debian package, the saithrift build fails. This PR modifies the sai-thrift make to include the SAI header files from sai-redis SAI/inc folder instead of the SAI headers installed from Vendor SAI debian package. Signed-off-by: saksarav <[email protected]>
Fixed the RPC build failure in sonic-net/sonic-buildimage#20322. The PR opencomputeproject#2028 introduced some SAI header file changes and Since Vendor (ex BCM) SAI header files do not have these changes and also the sai-thrift includes the sai header files installed from Vendor SAI debian package, the saithrift build fails. This PR modifies the sai-thrift make to include the SAI header files from sai-redis SAI/inc folder instead of the SAI headers installed from Vendor SAI debian package. Signed-off-by: saksarav <[email protected]>
Fixed the RPC build failure in sonic-net/sonic-buildimage#20322. The PR opencomputeproject#2028 introduced some SAI header file changes and Since Vendor (ex BCM) SAI header files do not have these changes and also the sai-thrift includes the sai header files installed from Vendor SAI debian package, the saithrift build fails. This PR modifies the sai-thrift make to include the SAI header files from sai-redis SAI/inc folder instead of the SAI headers installed from Vendor SAI debian package. Signed-off-by: saksarav <[email protected]>
Fixed the RPC build failure in sonic-net/sonic-buildimage#20322. The PR #2028 introduced some SAI header file changes and Since Vendor (ex BCM) SAI header files do not have these changes and also the sai-thrift includes the sai header files installed from Vendor SAI debian package, the saithrift build fails. This PR modifies the sai-thrift make to include the SAI header files from sai-redis SAI/inc folder instead of the SAI headers installed from Vendor SAI debian package. Signed-off-by: saksarav <[email protected]> Co-authored-by: saksarav-nokia <[email protected]>
To make this binary backward compatible for extension enums, instead of starting form _ATTR_END and prevent enum shift each time new attribute is added
Update saisanitycheck to not use object type as index
Since we will move object type extensions to separate range we will need to update many shortcuts taken by saisanitycheck
when it was using object type as index to fast access arrays
NOTE: this will break current logic in sonic-saireids lib and vslib oid managers, also in https://github.com/sonic-net/DASH/blob/main/dash-pipeline/SAI/src/objectidmanager.cpp, since object type with extensions will not possible to encode on a single byte. Corresponding PR fixes will be made to mitigate this issue.