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 Dec 24, 2024
1 parent 5ab3a14 commit f1d1309
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 @@ -5097,7 +5097,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 @@ -5120,7 +5120,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 @@ -2410,7 +2410,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 @@ -2570,7 +2570,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 f1d1309

Please sign in to comment.