Skip to content
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

[vslib]: adapt macsec sai 1.7.1 #755

Merged
merged 3 commits into from
Jan 10, 2021

Conversation

Pterosaur
Copy link
Contributor

Partial attributes were moved from MACsec SA to MACsec SC, Read these attributes from MACsec SC.

Signed-off-by: Ze Gan ganze718@gmail.com

Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur
Copy link
Contributor Author

retest this please

lguohan
lguohan previously approved these changes Dec 29, 2020
@lguohan
Copy link
Contributor

lguohan commented Jan 1, 2021

retest this please


CHECK_STATUS(get(SAI_OBJECT_TYPE_MACSEC_SC, attr->value.oid, static_cast<uint32_t>(attrs.size()), attrs.data()));

auto flow_id = attrs[0].value.oid;
auto sci = attrs[1].value.u64;
std::stringstream sciHexStr;
macsecAttr.m_encryptionEnable = attrs[2].value.booldata;
bool is_sak_128_bit = (attrs[3].value.s32 == SAI_MACSEC_CIPHER_SUITE_GCM_AES_128 || attrs[3].value.s32 == SAI_MACSEC_CIPHER_SUITE_GCM_AES_XPN_128) ? true : false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bool is_sak_128_bit = (attrs[3].value.s32 == SAI_MACSEC_CIPHER_SUITE_GCM_AES_128 || attrs[3].value.s32 == SAI_MACSEC_CIPHER_SUITE_GCM_AES_XPN_128)
no need for explicit true/false at the end

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, Fixed it.

@kcudnik
Copy link
Collaborator

kcudnik commented Jan 3, 2021

It would be helpful if you would add unittests recordings for this, and configuration to help prevent such issues in the future. How are you testing this right now ?

kcudnik
kcudnik previously approved these changes Jan 3, 2021
Copy link
Collaborator

@kcudnik kcudnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix build if related

@Pterosaur Pterosaur dismissed stale reviews from kcudnik and lguohan via c1eefd0 January 4, 2021 04:15
@Pterosaur
Copy link
Contributor Author

please fix build if related

It looks like that other components are causing this failure.

@Pterosaur
Copy link
Contributor Author

Pterosaur commented Jan 4, 2021

It would be helpful if you would add unittests recordings for this, and configuration to help prevent such issues in the future. How are you testing this right now ?

Yes, There should be some unitests to test this feature.
Right now, I have a test script to test macsec orchagent. That will call sairedis indirectly. So I guess I can write a script for sairedis by leveraging the interactions between orchagent and sairedis.
Could I submit the unitests on another PR?

@kcudnik
Copy link
Collaborator

kcudnik commented Jan 4, 2021

sure, you can add PR with UT next

@kcudnik
Copy link
Collaborator

kcudnik commented Jan 4, 2021

retest vs please

Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur
Copy link
Contributor Author

retest vs please

@lguohan
Copy link
Contributor

lguohan commented Jan 8, 2021

retest this please

1 similar comment
@lguohan
Copy link
Contributor

lguohan commented Jan 9, 2021

retest this please

@lguohan lguohan merged commit 41801ff into sonic-net:master Jan 10, 2021
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
Partial attributes were moved from MACsec SA to MACsec SC, Read these attributes from MACsec SC.

Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur Pterosaur deleted the adapt_macsec_sai_171 branch January 12, 2023 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants