You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
are not binary backward compatible from sai version to version, because those are sorted when generated, but this mean if new global api will be added or new switch pointer/notification will be added, then it can end up in the middle of the struct/enum
This can cause potential issues, if we for example compile sonic syncd with one version of metadata headers, and then update only metadata library with other version, then shift in enums and pointers will cause unexpected behavior and lead to process crash
If we only update vendor libsai, we are fine since enums and structs are now backward binary compatible
Currently libsaimetadata is compiled with syncd together so this issue will not show up
For switch notification/pointer types, solution is pretty easy, just order enums/pointers in order they show up in SAI_SWITCH_ATTR_* and this will cause order to be backward compatible.
For global apis, the task is more complicated, since there is no easy way to figure out which api should be at the beginning and at the end. This would require to scrape git history each time, which is not optimal. Other solution would be to add extra TAG in doxyge comment for each global api (which could be enforced by sanity check) and this tag would be index number of each global api, and it would need to increase on each new api.
The text was updated successfully, but these errors were encountered:
Those items:
are not binary backward compatible from sai version to version, because those are sorted when generated, but this mean if new global api will be added or new switch pointer/notification will be added, then it can end up in the middle of the struct/enum
This can cause potential issues, if we for example compile sonic syncd with one version of metadata headers, and then update only metadata library with other version, then shift in enums and pointers will cause unexpected behavior and lead to process crash
If we only update vendor libsai, we are fine since enums and structs are now backward binary compatible
Currently libsaimetadata is compiled with syncd together so this issue will not show up
For switch notification/pointer types, solution is pretty easy, just order enums/pointers in order they show up in SAI_SWITCH_ATTR_* and this will cause order to be backward compatible.
For global apis, the task is more complicated, since there is no easy way to figure out which api should be at the beginning and at the end. This would require to scrape git history each time, which is not optimal. Other solution would be to add extra TAG in doxyge comment for each global api (which could be enforced by sanity check) and this tag would be index number of each global api, and it would need to increase on each new api.
The text was updated successfully, but these errors were encountered: