forked from sonic-net/sonic-sairedis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SAI Notification support for host_tx_ready (sonic-net#1307)
New PORT_HOST_TX_READY notification logic was added to sonic-sairedis and syncd in order to support host_tx_ready synchronization enhancements. HLD: sonic-net/SONiC#1453
- Loading branch information
Showing
24 changed files
with
457 additions
and
11 deletions.
There are no files selected for viewing
Submodule SAI
updated
4 files
+26 −0 | doc/SAI-Proposal-CMIS-Module-Management.md | |
+27 −0 | experimental/saiexperimentaldasheni.h | |
+69 −4 | experimental/saiexperimentaldashoutboundcatopa.h | |
+26 −0 | inc/saiport.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#include "NotificationPortHostTxReadyEvent.h" | ||
|
||
#include "swss/logger.h" | ||
|
||
#include "sai_serialize.h" | ||
|
||
using namespace sairedis; | ||
|
||
NotificationPortHostTxReady::NotificationPortHostTxReady( | ||
_In_ const std::string& serializedNotification): | ||
Notification( | ||
SAI_SWITCH_NOTIFICATION_TYPE_PORT_HOST_TX_READY, | ||
serializedNotification) | ||
{ | ||
SWSS_LOG_ENTER(); | ||
|
||
sai_deserialize_port_host_tx_ready_ntf( | ||
serializedNotification, | ||
m_switchId, | ||
m_portId, | ||
m_portHostTxReadyStatus); | ||
} | ||
|
||
NotificationPortHostTxReady::~NotificationPortHostTxReady() | ||
{ | ||
SWSS_LOG_ENTER(); | ||
} | ||
|
||
sai_object_id_t NotificationPortHostTxReady::getSwitchId() const | ||
{ | ||
SWSS_LOG_ENTER(); | ||
|
||
return m_switchId; | ||
} | ||
|
||
sai_object_id_t NotificationPortHostTxReady::getAnyObjectId() const | ||
{ | ||
SWSS_LOG_ENTER(); | ||
|
||
return m_portId; | ||
} | ||
|
||
void NotificationPortHostTxReady::processMetadata( | ||
_In_ std::shared_ptr<saimeta::Meta> meta) const | ||
{ | ||
SWSS_LOG_ENTER(); | ||
|
||
meta->meta_sai_on_port_host_tx_ready_change(m_portId, m_switchId, m_portHostTxReadyStatus); | ||
} | ||
|
||
void NotificationPortHostTxReady::executeCallback( | ||
_In_ const sai_switch_notifications_t& switchNotifications) const | ||
{ | ||
SWSS_LOG_ENTER(); | ||
|
||
if (switchNotifications.on_port_host_tx_ready) | ||
{ | ||
switchNotifications.on_port_host_tx_ready(m_switchId, m_portId, m_portHostTxReadyStatus); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#pragma once | ||
|
||
#include "Notification.h" | ||
|
||
namespace sairedis | ||
{ | ||
class NotificationPortHostTxReady: | ||
public Notification | ||
{ | ||
public: | ||
|
||
NotificationPortHostTxReady( | ||
_In_ const std::string& serializedNotification); | ||
|
||
virtual ~NotificationPortHostTxReady(); | ||
|
||
public: | ||
|
||
virtual sai_object_id_t getSwitchId() const override; | ||
|
||
virtual sai_object_id_t getAnyObjectId() const override; | ||
|
||
virtual void processMetadata( | ||
_In_ std::shared_ptr<saimeta::Meta> meta) const override; | ||
|
||
virtual void executeCallback( | ||
_In_ const sai_switch_notifications_t& switchNotifications) const override; | ||
|
||
private: | ||
|
||
sai_object_id_t m_portId; | ||
|
||
sai_object_id_t m_switchId; | ||
|
||
sai_port_host_tx_ready_status_t m_portHostTxReadyStatus; | ||
|
||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.