From a9813f76ece5f645d3a673938dbb434445c6e311 Mon Sep 17 00:00:00 2001 From: noaOrMlnx Date: Mon, 4 Mar 2024 09:18:51 +0000 Subject: [PATCH] Change HOST_TX_READY_NOTIFY attr to be set only if CMIS mgmt feature is enabled --- orchagent/main.cpp | 4 ---- orchagent/portsorch.cpp | 12 ++++++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/orchagent/main.cpp b/orchagent/main.cpp index df702e7c3f..0add517a05 100644 --- a/orchagent/main.cpp +++ b/orchagent/main.cpp @@ -505,10 +505,6 @@ int main(int argc, char **argv) attr.value.ptr = (void *)on_switch_shutdown_request; attrs.push_back(attr); - attr.id = SAI_SWITCH_ATTR_PORT_HOST_TX_READY_NOTIFY; - attr.value.ptr = (void *)on_port_host_tx_ready; - attrs.push_back(attr); - if (gMySwitchType != "fabric" && gMacAddress) { attr.id = SAI_SWITCH_ATTR_SRC_MAC_ADDRESS; diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index 8823d6be23..ff333f1e83 100755 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -6,6 +6,7 @@ #include "vxlanorch.h" #include "directory.h" #include "subintf.h" +#include "notifications.h" #include #include @@ -581,6 +582,17 @@ PortsOrch::PortsOrch(DBConnector *db, DBConnector *stateDb, vectorset_switch_attribute(gSwitchId, &attr) != SAI_STATUS_SUCCESS) + { + SWSS_LOG_ERROR("PortsOrch failed to set SAI_SWITCH_ATTR_PORT_HOST_TX_READY_NOTIFY attribute"); + } + Orch::addExecutor(new Consumer(new SubscriberStateTable(stateDb, STATE_TRANSCEIVER_INFO_TABLE_NAME, TableConsumable::DEFAULT_POP_BATCH_SIZE, 0), this, STATE_TRANSCEIVER_INFO_TABLE_NAME)); }