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

Support TWAMP Light notification in syncd #1306

Conversation

AlanYoush
Copy link
Contributor

For supporting TWAMP Light, it requires vendor-sai to report TWAMP Light mearsurement data from silicon.

And, so it defines the notification event and getting statistics function in SAI and invokes them in syncd.

SWSS_LOG_ERROR("data.twamp_session_id %s has unexpected type: %s, expected TWAMP_SESSION",
sai_serialize_object_id(data.twamp_session_id).c_str(),
sai_serialize_object_type(ot).c_str());
break;
Copy link
Collaborator

Choose a reason for hiding this comment

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

just return here ? and valid variable is not needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for comments.
It should check the object type of session_id whether it is TWAMP session. So we add valid variable and set as true when the object type is TWAMP session, otherwise use default value as false. If the valid variable is false, it would just return the error log.

meta/Meta.cpp Show resolved Hide resolved
syncd/NotificationProcessor.cpp Outdated Show resolved Hide resolved
@AlanYoush AlanYoush force-pushed the devpr_yoush_support_twamp_light_in_sairedis branch 4 times, most recently from f16be56 to 1178a2c Compare October 13, 2023 05:36
kcudnik
kcudnik previously approved these changes Oct 13, 2023
@kcudnik
Copy link
Collaborator

kcudnik commented Oct 23, 2023

please resolve merge conflicts

syncd/Syncd.cpp Outdated
@@ -4395,7 +4396,8 @@ void Syncd::performWarmRestartSingleSwitch(
SAI_SWITCH_ATTR_NAT_EVENT_NOTIFY,
SAI_SWITCH_ATTR_PORT_STATE_CHANGE_NOTIFY,
SAI_SWITCH_ATTR_QUEUE_PFC_DEADLOCK_NOTIFY,
SAI_SWITCH_ATTR_BFD_SESSION_STATE_CHANGE_NOTIFY
SAI_SWITCH_ATTR_BFD_SESSION_STATE_CHANGE_NOTIFY,
SAI_SWITCH_ATTR_TWAMP_SESSION_EVENT_NOTIFY
Copy link
Collaborator

Choose a reason for hiding this comment

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

this entire list could be obtained from sai_metadata_switch_notify_attr, and there will be no need in the future to update that, i will make PR for this after your will merge

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. Whether I would do nothing before you make PR.

Copy link
Collaborator

Choose a reason for hiding this comment

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

go on proceeded with yours, i will add my on top of it

@AlanYoush AlanYoush force-pushed the devpr_yoush_support_twamp_light_in_sairedis branch from 78d2ac0 to 2380cee Compare November 9, 2023 00:46
AlanYoush added a commit to CentecNetworks/sonic-sairedis that referenced this pull request Nov 9, 2023
Signed-off-by: yoush <yoush@centec.com>
@AlanYoush AlanYoush force-pushed the devpr_yoush_support_twamp_light_in_sairedis branch from 2380cee to dbf8408 Compare November 9, 2023 01:01
@huseratgithub
Copy link

/azpw run

AlanYoush added a commit to CentecNetworks/sonic-sairedis that referenced this pull request Dec 2, 2023
Signed-off-by: yoush <yoush@centec.com>
@AlanYoush AlanYoush force-pushed the devpr_yoush_support_twamp_light_in_sairedis branch from dbf8408 to a392676 Compare December 2, 2023 02:10
AlanYoush added a commit to CentecNetworks/sonic-sairedis that referenced this pull request Dec 2, 2023
Signed-off-by: yoush <yoush@centec.com>
@AlanYoush AlanYoush force-pushed the devpr_yoush_support_twamp_light_in_sairedis branch from a392676 to fb17397 Compare December 2, 2023 02:24
Signed-off-by: yoush <yoush@centec.com>
@AlanYoush AlanYoush force-pushed the devpr_yoush_support_twamp_light_in_sairedis branch from fb17397 to f0b80b7 Compare December 14, 2023 06:46
@AlanYoush
Copy link
Contributor Author

AlanYoush commented Dec 15, 2023

@kcudnik Thank you very much for approving it. I am wondering if you are able to merge it ? If you can, please help to merge it, because PR (sonic-net/sonic-swss#2927) depends on it.

@kcudnik kcudnik merged commit 92c050a into sonic-net:master Dec 15, 2023
14 checks passed
@AlanYoush
Copy link
Contributor Author

@kcudnik Thanks very much

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