Skip to content

Commit 4eb74f0

Browse files
authored
[orchagent] Fix: ERR swss#orchagent: :- setPortPvid: pvid setting for tunnel Port_EVPN_XXX is not allowed (sonic-net#3402)
* Fix: ERR swss#orchagent: :- setPortPvid: pvid setting for tunnel Port_EVPN_XXX is not allowed 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.
1 parent 4ff8153 commit 4eb74f0

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

orchagent/portsorch.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -6500,7 +6500,8 @@ bool PortsOrch::addVlanMember(Port &vlan, Port &port, string &tagging_mode, stri
65006500
port.m_alias.c_str(), vlan.m_alias.c_str(), vlan.m_vlan_info.vlan_id, port.m_port_id);
65016501

65026502
/* Use untagged VLAN as pvid of the member port */
6503-
if (sai_tagging_mode == SAI_VLAN_TAGGING_MODE_UNTAGGED)
6503+
if (sai_tagging_mode == SAI_VLAN_TAGGING_MODE_UNTAGGED &&
6504+
port.m_type != Port::TUNNEL)
65046505
{
65056506
if(!setPortPvid(port, vlan.m_vlan_info.vlan_id))
65066507
{
@@ -6835,7 +6836,8 @@ bool PortsOrch::removeVlanMember(Port &vlan, Port &port, string end_point_ip)
68356836
port.m_alias.c_str(), vlan.m_alias.c_str(), vlan.m_vlan_info.vlan_id, vlan_member_id);
68366837

68376838
/* Restore to default pvid if this port joined this VLAN in untagged mode previously */
6838-
if (sai_tagging_mode == SAI_VLAN_TAGGING_MODE_UNTAGGED)
6839+
if (sai_tagging_mode == SAI_VLAN_TAGGING_MODE_UNTAGGED &&
6840+
port.m_type != Port::TUNNEL)
68396841
{
68406842
if (!setPortPvid(port, DEFAULT_PORT_VLAN_ID))
68416843
{

orchagent/vxlanorch.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -2409,8 +2409,8 @@ bool EvpnRemoteVnip2pOrch::addOperation(const Request& request)
24092409
}
24102410

24112411
// SAI Call to add tunnel to the VLAN flood domain
2412-
2413-
string tagging_mode = "untagged";
2412+
// NOTE: does 'untagged' make the most sense here?
2413+
string tagging_mode = "untagged";
24142414
gPortsOrch->addVlanMember(vlanPort, tunnelPort, tagging_mode);
24152415

24162416
SWSS_LOG_INFO("remote_vtep=%s vni=%d vlanid=%d ",
@@ -2569,7 +2569,7 @@ bool EvpnRemoteVnip2mpOrch::addOperation(const Request& request)
25692569
}
25702570

25712571
// SAI Call to add tunnel to the VLAN flood domain
2572-
2572+
// NOTE: does 'untagged' make the most sense here?
25732573
string tagging_mode = "untagged";
25742574
gPortsOrch->addVlanMember(vlanPort, tunnelPort, tagging_mode, end_point_ip);
25752575

0 commit comments

Comments
 (0)