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] Add StateBase function for MACsec #717

Merged
merged 5 commits into from
Nov 30, 2020

Conversation

Pterosaur
Copy link
Contributor

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

Signed-off-by: Ze Gan <ganze718@gmail.com>
@kcudnik
Copy link
Collaborator

kcudnik commented Nov 21, 2020

retest vs please

1 similar comment
@kcudnik
Copy link
Collaborator

kcudnik commented Nov 22, 2020

retest vs please

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

retest vs please

vslib/src/SwitchStateBaseMACsec.cpp Outdated Show resolved Hide resolved
vslib/src/SwitchStateBaseMACsec.cpp Outdated Show resolved Hide resolved
vslib/src/SwitchStateBaseMACsec.cpp Outdated Show resolved Hide resolved
vslib/src/SwitchStateBaseMACsec.cpp Outdated Show resolved Hide resolved
vslib/src/SwitchStateBaseMACsec.cpp Outdated Show resolved Hide resolved
vslib/src/SwitchStateBaseMACsec.cpp Outdated Show resolved Hide resolved
vslib/src/SwitchStateBaseMACsec.cpp Show resolved Hide resolved
vslib/src/SwitchStateBaseMACsec.cpp Outdated Show resolved Hide resolved
vslib/src/SwitchStateBaseMACsec.cpp Outdated Show resolved Hide resolved
vslib/src/SwitchStateBaseMACsec.cpp Outdated Show resolved Hide resolved
Signed-off-by: Ze Gan <ganze718@gmail.com>

if (macsecAttr.m_info == nullptr)
{
// The fail log has been recordedin findHostInterfaceInfoByPort
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think this message should be here insted of line 383, since this functions expects info to be not null, but findHostInterfaceInfoByPort just searches for it, and whether it found or not should not be error, please move that message here and remove from findHostInterfaceInfoByPort,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree


macsecAttr.m_sci = sciHexStr.str();

if (macsecAttr.m_sci.length() < MACSEC_SCI_LENGTH)
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this be "==" ?


if (macsecAttr.m_info == nullptr)
{
// The fail log has been recordedin findHostInterfaceInfoByPort
Copy link
Collaborator

Choose a reason for hiding this comment

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

also this message should be here


if (macsecAttr.m_info == nullptr)
{
// The fail log has been recordedin findHostInterfaceInfoByPort
Copy link
Collaborator

Choose a reason for hiding this comment

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

also message here

// The fail log has been recorded at loadMACsecAttr
macsecAttrs.pop_back();
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

remove empty line


auto ret = get_internal(SAI_OBJECT_TYPE_MACSEC_SA, serializedObjectId, attrCount, attrList);

if (ret != SAI_STATUS_SUCCESS)
Copy link
Collaborator

Choose a reason for hiding this comment

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

CHECK_STATUS ?

Signed-off-by: Ze Gan <ganze718@gmail.com>
@kcudnik kcudnik merged commit 2fb5230 into sonic-net:master Nov 30, 2020
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
[vslib] Add StateBase function for MACsec
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.

2 participants