-
Notifications
You must be signed in to change notification settings - Fork 489
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
Separate XPN configuration attribute from read-only attribute #1169
Conversation
Signed-off-by: dipankar-ba <dipankar@arista.com>
Signed-off-by: dipankar-ba <dipankar@arista.com>
957501b
to
38cee49
Compare
I think it makes sense to have a separate operational vs configuration attribute to avoid multiple writers (SAI and MKA) to the same attribute. |
inc/saimacsec.h
Outdated
@@ -758,18 +758,27 @@ typedef enum _sai_macsec_sa_attr_t | |||
* @default 0 | |||
* @validonly SAI_MACSEC_SA_ATTR_MACSEC_DIRECTION == SAI_MACSEC_DIRECTION_EGRESS | |||
*/ | |||
SAI_MACSEC_SA_ATTR_XPN, | |||
SAI_MACSEC_SA_ATTR_INITIAL_EGRESS_XPN, |
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 think we can do alias here so that we can maintain backward compatible here.
Signed-off-by: dipankar-ba <dipankar@arista.com>
Signed-off-by: dipankar-ba <dipankar@arista.com>
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.
Changes looks good to me.
SAI_MACSEC_SA_ATTR_CURRENT_XPN, | ||
|
||
/** @ignore - for backward compatibility */ | ||
SAI_MACSEC_SA_ATTR_XPN = SAI_MACSEC_SA_ATTR_CURRENT_XPN, |
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.
@dipankar-ba this does not look correct. SAI_MACSEC_SA_ATTR_XPN should be alias SAI_MACSEC_SA_ATTR_CONFIGURED_EGRESS_XPN ? This has broken backward compatibility as SAI_MACSEC_SA_ATTR_XPN was Create and Set and now it became Read only.
Here is the error when we are moving v1.8.0
https://dev.azure.com/mssonic/build/_build/results?buildId=9116&view=logs&jobId=83516c17-6666-5250-abde-63983ce72a49&j=83516c17-6666-5250-abde-63983ce72a49&t=6177235f-d4f1-5f72-835a-90ebb93a1784
can you please check again
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 underlying hardware has a counter whose value has to be periodically read by NOS to run MKA protocol through SAI_MACSEC_SA_ATTR_CURRENT_XPN. Since this read is mandatory for MACsec operation, I tried to keep this backward compatible.
For counter should be initialized to 0 by the driver and normally never be modified by NOS for normal operation. So I do not expect SAI_MACSEC_SA_ATTR_CONFIGURED_EGRESS_XPN to be read or written except perhaps for synthetic tests for testing counter saturation.
What I did Rename XPN attributes from SAI_MACSEC_SA_ATTR_MINIMUM_XPN and SAI_MACSEC_SA_ATTR_XPN to SAI_MACSEC_SA_ATTR_CURRENT_XPN Why I did it Due to opencomputeproject/SAI#1169 that refactors the attributes about XPN, a new attributes SAI_MACSEC_SA_ATTR_CURRENT_XPN for both ingress and egress was introduced for reading the Packet number. So move the original attributes to the new one. Signed-off-by: Ze Gan <ganze718@gmail.com>
What I did Rename XPN attributes from SAI_MACSEC_SA_ATTR_MINIMUM_XPN and SAI_MACSEC_SA_ATTR_XPN to SAI_MACSEC_SA_ATTR_CURRENT_XPN Why I did it Due to opencomputeproject/SAI#1169 that refactors the attributes about XPN, a new attributes SAI_MACSEC_SA_ATTR_CURRENT_XPN for both ingress and egress was introduced for reading the Packet number. So move the original attributes to the new one. Signed-off-by: Ze Gan <ganze718@gmail.com>
Added a new read-only current XPN (available for both ingress and egress) and separate from the egress attribute for setting initial XPN value.
Renamed ingress set-and-clear attribute MINIMUM_XPN to MINIMUM_INGRESS_XPN.