From 33daacf1c1f82f9b62eff2939459e5e98d35a2e1 Mon Sep 17 00:00:00 2001 From: Brad House Date: Thu, 28 Nov 2024 10:09:48 -0500 Subject: [PATCH] [orchagent] Fix: ERR swss#orchagent: :- setPortPvid: pvid setting for tunnel Port_EVPN_XXX is not allowed (PR #3402) Tunnel ports are always tagged and can't be created as untagged. But the code currently tries to set a pvid on a tunnel which is disallowed leading to an error in the logs. This is a simple fix to get rid of the error in the logs. It does not actually change behavior in any way other than getting rid of an error thus helping debugability. Signed-off-by: Brad House (@bradh352) --- orchagent/portsorch.cpp | 3 +-- orchagent/vxlanorch.cpp | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index ac3524d006..abe9b7fb55 100644 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -5097,7 +5097,7 @@ void PortsOrch::doVlanMemberTask(Consumer &consumer) if (op == SET_COMMAND) { - string tagging_mode = "untagged"; + string tagging_mode = (port.m_type == Port::TUNNEL)?"tagged":"untagged"; for (auto i : kfvFieldsValues(t)) { @@ -5120,7 +5120,6 @@ void PortsOrch::doVlanMemberTask(Consumer &consumer) it = consumer.m_toSync.erase(it); continue; } - if (addBridgePort(port) && addVlanMember(vlan, port, tagging_mode)) it = consumer.m_toSync.erase(it); else diff --git a/orchagent/vxlanorch.cpp b/orchagent/vxlanorch.cpp index 05a2d3e603..3dadc2caa0 100644 --- a/orchagent/vxlanorch.cpp +++ b/orchagent/vxlanorch.cpp @@ -2410,7 +2410,7 @@ bool EvpnRemoteVnip2pOrch::addOperation(const Request& request) // SAI Call to add tunnel to the VLAN flood domain - string tagging_mode = "untagged"; + string tagging_mode = "tagged"; gPortsOrch->addVlanMember(vlanPort, tunnelPort, tagging_mode); SWSS_LOG_INFO("remote_vtep=%s vni=%d vlanid=%d ", @@ -2570,7 +2570,7 @@ bool EvpnRemoteVnip2mpOrch::addOperation(const Request& request) // SAI Call to add tunnel to the VLAN flood domain - string tagging_mode = "untagged"; + string tagging_mode = "tagged"; gPortsOrch->addVlanMember(vlanPort, tunnelPort, tagging_mode, end_point_ip); SWSS_LOG_INFO("end_point_ip=%s vni=%d vlanid=%d ",