Skip to content

Commit

Permalink
Fix: ERR swss#orchagent: :- setPortPvid: pvid setting for tunnel Port…
Browse files Browse the repository at this point in the history
…_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.

Signed-off-by: Brad House (@bradh352)
  • Loading branch information
bradh352 committed Nov 30, 2024
1 parent f97fdf7 commit c190c3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions orchagent/portsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5098,7 +5098,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))
{
Expand All @@ -5121,7 +5121,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
Expand Down
4 changes: 2 additions & 2 deletions orchagent/vxlanorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ",
Expand Down Expand Up @@ -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 ",
Expand Down

0 comments on commit c190c3d

Please sign in to comment.