From de85bc129df8081e9c442cd951d7b05afce1e4c7 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 b4981bb682b..35f2c830f48 100644 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -5103,7 +5103,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)) { @@ -5126,7 +5126,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 c96b3cb3c7b..85fd09a457c 100644 --- a/orchagent/vxlanorch.cpp +++ b/orchagent/vxlanorch.cpp @@ -2407,7 +2407,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 ", @@ -2567,7 +2567,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 ",