diff --git a/orchagent/fdborch.cpp b/orchagent/fdborch.cpp index daab3ad52e..28e335b9c8 100644 --- a/orchagent/fdborch.cpp +++ b/orchagent/fdborch.cpp @@ -65,7 +65,6 @@ bool FdbOrch::bake() return true; } - bool FdbOrch::storeFdbEntryState(const FdbUpdate& update) { const FdbEntry& entry = update.entry; diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index ada1f4bb92..1c8b9111e2 100755 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -5347,7 +5347,10 @@ bool PortsOrch::addTunnel(string tunnel_alias, sai_object_id_t tunnel_id, bool h { tunnel.m_learn_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); @@ -5358,6 +5361,7 @@ bool PortsOrch::removeTunnel(Port tunnel) { SWSS_LOG_ENTER(); + saiOidToAlias.erase(tunnel.m_tunnel_id); m_portList.erase(tunnel.m_alias); return true; @@ -5631,7 +5635,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); } diff --git a/orchagent/vxlanorch.cpp b/orchagent/vxlanorch.cpp index fc6a505a1f..fa6ebcdce0 100644 --- a/orchagent/vxlanorch.cpp +++ b/orchagent/vxlanorch.cpp @@ -299,7 +299,7 @@ create_tunnel( num_map++; } } - + attr.id = SAI_TUNNEL_ATTR_DECAP_MAPPERS; attr.value.objlist.count = num_map; attr.value.objlist.list = map_list; @@ -1536,7 +1536,7 @@ bool VxlanTunnelOrch::removeVxlanTunnelMap(string tunnelName, uint32_t vni) return false; } - // Update the map count and if this is the last mapping entry + // Update the map count and if this is the last mapping entry // make SAI calls to delete the tunnel and tunnel termination objects. tunnel_obj->vlan_vrf_vni_count--; @@ -1730,6 +1730,7 @@ bool VxlanTunnelOrch::delTunnelUser(const std::string remote_vtep, uint32_t vni port_tunnel_name = getTunnelPortName(remote_vtep); gPortsOrch->getPort(port_tunnel_name,tunnelPort); + if ((vtep_ptr->getRemoteEndPointRefCnt(remote_vtep) == 1) && tunnelPort.m_fdb_count == 0) {