Skip to content

Commit

Permalink
[orchagent] Fix: ERR swss#orchagent: :- setPortPvid: pvid setting for…
Browse files Browse the repository at this point in the history
… tunnel Port_EVPN_XXX is not allowed (#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.
  • Loading branch information
bradh352 authored Jan 13, 2025
1 parent 4ff8153 commit 4eb74f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6500,7 +6500,8 @@ bool PortsOrch::addVlanMember(Port &vlan, Port &port, string &tagging_mode, stri
port.m_alias.c_str(), vlan.m_alias.c_str(), vlan.m_vlan_info.vlan_id, port.m_port_id);

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

/* Restore to default pvid if this port joined this VLAN in untagged mode previously */
if (sai_tagging_mode == SAI_VLAN_TAGGING_MODE_UNTAGGED)
if (sai_tagging_mode == SAI_VLAN_TAGGING_MODE_UNTAGGED &&
port.m_type != Port::TUNNEL)
{
if (!setPortPvid(port, DEFAULT_PORT_VLAN_ID))
{
Expand Down
6 changes: 3 additions & 3 deletions orchagent/vxlanorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2409,8 +2409,8 @@ bool EvpnRemoteVnip2pOrch::addOperation(const Request& request)
}

// SAI Call to add tunnel to the VLAN flood domain

string tagging_mode = "untagged";
// NOTE: does 'untagged' make the most sense here?
string tagging_mode = "untagged";
gPortsOrch->addVlanMember(vlanPort, tunnelPort, tagging_mode);

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

// SAI Call to add tunnel to the VLAN flood domain

// NOTE: does 'untagged' make the most sense here?
string tagging_mode = "untagged";
gPortsOrch->addVlanMember(vlanPort, tunnelPort, tagging_mode, end_point_ip);

Expand Down

0 comments on commit 4eb74f0

Please sign in to comment.