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

[Link Event Damping] Add per port link event damper class. #1334

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions syncd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ libSyncd_a_SOURCES = \
NotificationHandler.cpp \
NotificationProcessor.cpp \
NotificationQueue.cpp \
PortLinkEventDamper.cpp \
PortMap.cpp \
PortMapParser.cpp \
PortStateChangeHandler.cpp \
Expand Down
11 changes: 11 additions & 0 deletions syncd/NotificationHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@ void NotificationHandler::updateNotificationsPointers(
}
}

void NotificationHandler::onPortStateChangePostLinkEventDamping(
_In_ uint32_t count,
_In_ const sai_port_oper_status_notification_t *data)
{
SWSS_LOG_ENTER();

auto s = sai_serialize_port_oper_status_ntf(count, data);

enqueueNotification(SAI_SWITCH_NOTIFICATION_NAME_PORT_STATE_CHANGE, s);
}

// TODO use same Notification class from sairedis lib
// then this will handle deserialize free

Expand Down
6 changes: 6 additions & 0 deletions syncd/NotificationHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ namespace syncd
_In_ uint32_t attr_count,
_In_ sai_attribute_t *attr_list) const;

// Handling of port state change event when received after being
// processed in link event damping logic.
virtual void onPortStateChangePostLinkEventDamping(
_In_ uint32_t count,
_In_ const sai_port_oper_status_notification_t *data);

public: // members reflecting SAI callbacks

void onFdbEvent(
Expand Down
Loading
Loading