opencomputeproject / SAI

Switch Abstraction Interface
Other
480 stars 475 forks source link

[meta][sai] Move extensions SAI and API to 0x20000000 range #2028

Closed kcudnik closed 3 months ago

kcudnik commented 4 months ago

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.

kcudnik commented 4 months ago

@marian-pritsak please take a look

kcudnik commented 4 months ago

This commit will be require to update sonic-sairedis repo with this commit: https://github.com/sonic-net/sonic-sairedis/pull/1390

kcudnik commented 4 months ago

/azp run

azure-pipelines[bot] commented 4 months ago
Azure Pipelines successfully started running 1 pipeline(s).
kcudnik commented 4 months ago

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

r12f commented 4 months ago

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

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

kcudnik commented 3 months ago

Please check in this change if there is no conflicts and approved @rlhui @lguohan

kcudnik commented 3 months ago

Ping