From 48ab5099cbd57f7ecf1e463f90f5d9cd24100623 Mon Sep 17 00:00:00 2001 From: iris Date: Thu, 17 Mar 2022 16:33:24 +0100 Subject: [PATCH] Backport fix for VXLAN tunnel status update (#2080) --- orchagent/portsorch.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index 8c0f0132ce..6e5e63ea75 100755 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -6270,7 +6270,9 @@ bool PortsOrch::addTunnel(string tunnel_alias, sai_object_id_t tunnel_id, bool h { tunnel.m_learn_mode = SAI_BRIDGE_PORT_FDB_LEARNING_MODE_DISABLE; } + tunnel.m_oper_status = SAI_PORT_OPER_STATUS_DOWN; m_portList[tunnel_alias] = tunnel; + saiOidToAlias[tunnel_id] = tunnel_alias; SWSS_LOG_INFO("addTunnel:: %" PRIx64, tunnel_id); @@ -6281,6 +6283,7 @@ bool PortsOrch::removeTunnel(Port tunnel) { SWSS_LOG_ENTER(); + saiOidToAlias.erase(tunnel.m_tunnel_id); m_portList.erase(tunnel.m_alias); return true; @@ -7047,7 +7050,7 @@ void PortsOrch::updatePortOperStatus(Port &port, sai_port_oper_status_t status) return; } - if (port.m_type == Port::PHY) + if (port.m_type == Port::PHY || port.m_type == Port::TUNNEL) { updateDbPortOperStatus(port, status); updateGearboxPortOperStatus(port);