From 05c7c050bdef129b6d1da178a1688f75d22315be Mon Sep 17 00:00:00 2001 From: Prince Sunny Date: Mon, 8 Nov 2021 17:49:07 -0800 Subject: [PATCH] [Mux orch] set default as standby, change mux orch priority (#2010) *Set default status for each mux port to standby state during init. *Change mux orch priority to process entries before neighbor orch --- orchagent/muxorch.cpp | 3 +++ orchagent/orchdaemon.cpp | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/orchagent/muxorch.cpp b/orchagent/muxorch.cpp index 4131b5a235..6c0f67ff83 100644 --- a/orchagent/muxorch.cpp +++ b/orchagent/muxorch.cpp @@ -326,6 +326,9 @@ MuxCable::MuxCable(string name, IpPrefix& srv_ip4, IpPrefix& srv_ip6, IpAddress state_machine_handlers_.insert(handler_pair(MUX_STATE_STANDBY_ACTIVE, &MuxCable::stateActive)); state_machine_handlers_.insert(handler_pair(MUX_STATE_INIT_STANDBY, &MuxCable::stateStandby)); state_machine_handlers_.insert(handler_pair(MUX_STATE_ACTIVE_STANDBY, &MuxCable::stateStandby)); + + /* Set initial state to "standby" */ + stateStandby(); } bool MuxCable::stateInitActive() diff --git a/orchagent/orchdaemon.cpp b/orchagent/orchdaemon.cpp index eebbaa720b..f4ef7b137c 100644 --- a/orchagent/orchdaemon.cpp +++ b/orchagent/orchdaemon.cpp @@ -298,7 +298,7 @@ bool OrchDaemon::init() * when iterating ConsumerMap. This is ensured implicitly by the order of keys in ordered map. * For cases when Orch has to process tables in specific order, like PortsOrch during warm start, it has to override Orch::doTask() */ - m_orchList = { gSwitchOrch, gCrmOrch, gPortsOrch, gBufferOrch, gIntfsOrch, gNeighOrch, gNhgOrch, gRouteOrch, copp_orch, qos_orch, wm_orch, policer_orch, tunnel_decap_orch, sflow_orch, debug_counter_orch, gMacsecOrch}; + m_orchList = { gSwitchOrch, gCrmOrch, gPortsOrch, gBufferOrch, mux_orch, mux_cb_orch, gIntfsOrch, gNeighOrch, gNhgOrch, gRouteOrch, copp_orch, qos_orch, wm_orch, policer_orch, tunnel_decap_orch, sflow_orch, debug_counter_orch, gMacsecOrch}; bool initialize_dtel = false; if (platform == BFN_PLATFORM_SUBSTRING || platform == VS_PLATFORM_SUBSTRING) @@ -394,8 +394,6 @@ bool OrchDaemon::init() m_orchList.push_back(gMlagOrch); m_orchList.push_back(gIsoGrpOrch); m_orchList.push_back(gFgNhgOrch); - m_orchList.push_back(mux_orch); - m_orchList.push_back(mux_cb_orch); m_orchList.push_back(mux_st_orch); if (m_fabricEnabled)