From 0f8be85fa87ad89a7b84c90a0972c3ca9e14207e Mon Sep 17 00:00:00 2001 From: peter_yu Date: Wed, 3 Mar 2021 10:58:11 +0000 Subject: [PATCH] [subinterface] Keep VLAN tag when adding member port into a portchannel with a subinterface When adding member port into portchannel, if the portchannel has a subinterface, the port should keep the VLAN tag. And the VLAN tag should be stripped while removing a port from portchannel with subinterface. --- orchagent/portsorch.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index ba5336b063..b2f09c2fbc 100644 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -7038,7 +7038,7 @@ bool PortsOrch::addLagMember(Port &lag, Port &port, string member_status) m_portList[lag.m_alias] = lag; - if (lag.m_bridge_port_id > 0) + if ((lag.m_bridge_port_id > 0) || !lag.m_child_ports.empty()) { if (!setHostIntfsStripTag(port, SAI_HOSTIF_VLAN_TAG_KEEP)) { @@ -7086,7 +7086,7 @@ bool PortsOrch::removeLagMember(Port &lag, Port &port) lag.m_members.erase(port.m_alias); m_portList[lag.m_alias] = lag; - if (lag.m_bridge_port_id > 0) + if ((lag.m_bridge_port_id > 0) || !lag.m_child_ports.empty()) { if (!setHostIntfsStripTag(port, SAI_HOSTIF_VLAN_TAG_STRIP)) {