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 (PR sonic-net#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)
  • Loading branch information
bradh352 committed Jan 7, 2025
1 parent 0b8c600 commit 4b63d86
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 @@ -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))
{
Expand All @@ -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
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 4b63d86

Please sign in to comment.