Separate XPN configuration attribute from read-only attribute#1169
Separate XPN configuration attribute from read-only attribute#1169lguohan merged 4 commits intoopencomputeproject:masterfrom
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
| * @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.
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>
prafull-brcm
left a comment
There was a problem hiding this comment.
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.
@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.
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>
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.