Closed
Conversation
Problem: Consider a scenario where an application (adapter host) using SAI spec X (say) warmboots to an application using new SAI spec Y (say). If an enum is extended between X and Y with fields inserted "in between" rather than "at the end" of the enum, the old fields can get "renumbered". However, the SAI implementation (adapter) continues to return old enums for previously returned objects thereby breaking the warmboot. Fix this by moving the newly inserted fields "to the end" (this could mean at the end of _END block) to keep the enum field values the same. Specifically, below patch was first introduced in v1.7.0 and inserted enum fields 'in betweeen': opencomputeproject@1aeb1c8 Thus, - In 1.6.5: SAI_ACL_ENTRY_ATTR_FIELD_DSCP is 4126, SAI_ACL_ENTRY_ATTR_ACTION_SET_DSCP is 8214 etc. - In 1.8.1: SAI_ACL_ENTRY_ATTR_FIELD_DSCP is 4134, SAI_ACL_ENTRY_ATTR_ACTION_SET_DSCP is 8216 etc. If the application created ACL entry with SAI_ACL_ENTRY_ATTR_FIELD_DSCP (4126) prior to warmboot, even after warmboot, a get query on that ACL entry returns 4126 which no longer means SAI_ACL_ENTRY_ATTR_FIELD_DSCP. This patch fixes it by moving all the newly introduced ACL fields to the end. Signed-off-by: [email protected] Signed-off-by: Shrikrishna Khare <[email protected]>
Problem: Consider a scenario where an application (adapter host) using SAI spec X (say) warmboots to an application using new SAI spec Y (say). If an enum is extended between X and Y with fields inserted "in between" rather than "at the end" of the enum, the old fields can get "renumbered". However, the SAI implementation (adapter) continues to return old enums for previously returned objects thereby breaking the warmboot. Fix this by moving the newly inserted fields "to the end" (this could mean at the end of _END block) to keep the enum field values the same. Specifically, below patch was first introduced in v1.7.0 and inserted enum fields 'in betweeen': opencomputeproject@21bdb48 - In 1.6.5: SAI_NATIVE_HASH_FIELD_L4_SRC_PORT is 7, SAI_NATIVE_HASH_FIELD_L4_DST_PORT is 8. - In 1.8.1: SAI_NATIVE_HASH_FIELD_L4_SRC_PORT is 15, SAI_NATIVE_HASH_FIELD_L4_DST_PORT is 16. If the application configured SAI_NATIVE_HASH_FIELD_L4_SRC_PORT (7) prior to warmboot, even after warmboot, a query returns 7 which no longer means SAI_NATIVE_HASH_FIELD_L4_SRC_PORT in 1.8.1. This patch fixes it by moving all the newly introduced ACL fields to the end. Signed-off-by: [email protected] Signed-off-by: Shrikrishna Khare <[email protected]>
Closed
kcudnik
requested changes
Jun 30, 2021
Collaborator
kcudnik
left a comment
There was a problem hiding this comment.
you need to discuss this on weekly SAI meeting, this seems like a lot of shuffling and seems not binary backward compatible
Collaborator
|
Closing since #1259 was merged |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consider a scenario where an application (adapter host) using SAI spec X
(say) warmboots to an application using new SAI spec Y (say).
If an enum is extended between X and Y with fields inserted "in between"
rather than "at the end" of the enum, the old fields can get "renumbered".
However, the SAI implementation (adapter) continues to return old enums
for previously returned objects thereby breaking the warmboot.
Fix this by moving the newly inserted fields "to the end"
(this could mean at the end of _END block) to keep the enum field values
the same.