From 0704f7832cd6df236965089934e332fb9c850b6f Mon Sep 17 00:00:00 2001 From: jcaiMR <111116206+jcaiMR@users.noreply.github.com> Date: Tue, 14 Feb 2023 00:34:02 +0800 Subject: [PATCH] [Workaround] EvpnRemoteVnip2pOrch warmboot check failure (#2626) * fix p2p vxlan warmboot check failure --- orchagent/vxlanorch.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/orchagent/vxlanorch.cpp b/orchagent/vxlanorch.cpp index 34ff30812594..ab8e10c51237 100644 --- a/orchagent/vxlanorch.cpp +++ b/orchagent/vxlanorch.cpp @@ -2347,6 +2347,15 @@ bool EvpnRemoteVnip2pOrch::addOperation(const Request& request) return true; } + EvpnNvoOrch* evpn_orch = gDirectory.get(); + auto vtep_ptr = evpn_orch->getEVPNVtep(); + if (!vtep_ptr) + { + SWSS_LOG_WARN("Remote VNI add: Source VTEP not found. remote=%s vid=%d", + remote_vtep.c_str(), vlan_id); + return true; + } + VxlanTunnelOrch* tunnel_orch = gDirectory.get(); Port tunnelPort, vlanPort; VxlanTunnelMapOrch* vxlan_tun_map_orch = gDirectory.get(); @@ -2373,16 +2382,8 @@ bool EvpnRemoteVnip2pOrch::addOperation(const Request& request) if (gPortsOrch->isVlanMember(vlanPort, tunnelPort)) { - EvpnNvoOrch* evpn_orch = gDirectory.get(); - auto vtep_ptr = evpn_orch->getEVPNVtep(); - if (!vtep_ptr) - { - SWSS_LOG_WARN("Remote VNI add: VTEP not found. remote=%s vid=%d", - remote_vtep.c_str(),vlan_id); - return true; - } SWSS_LOG_WARN("tunnelPort %s already member of vid %d", - remote_vtep.c_str(),vlan_id); + remote_vtep.c_str(),vlan_id); vtep_ptr->increment_spurious_imr_add(remote_vtep); return true; }