Skip to content

Commit c592731

Browse files
author
Shuotian Cheng
authored
[portsorch]: Set port bind mode after adding VLAN member (sonic-net#251)
1 parent cf92ed9 commit c592731

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

orchagent/portsorch.cpp

+6-9
Original file line numberDiff line numberDiff line change
@@ -1180,19 +1180,16 @@ bool PortsOrch::addVlanMember(Port vlan, Port port, string& tagging_mode)
11801180
SWSS_LOG_NOTICE("Set untagged port %s VLAN ID to %hu", port.m_alias.c_str(), vlan.m_vlan_id);
11811181
}
11821182

1183-
#if 0
1184-
// Set port bind mode
1185-
sai_attribute_t port_attr;
1186-
port_attr.id = SAI_PORT_ATTR_BIND_MODE;
1187-
port_attr.value.s32 = SAI_PORT_BIND_MODE_PORT;
1188-
status = sai_port_api->set_port_attribute(port.m_port_id, &port_attr);
1183+
attr.id = SAI_PORT_ATTR_BIND_MODE;
1184+
attr.value.s32 = SAI_PORT_BIND_MODE_PORT;
1185+
1186+
status = sai_port_api->set_port_attribute(port.m_port_id, &attr);
11891187
if (status != SAI_STATUS_SUCCESS)
11901188
{
1191-
SWSS_LOG_ERROR("Failed to set port pid:%lx bind mode to port: %d",
1192-
port.m_port_id, status);
1189+
SWSS_LOG_ERROR("Failed to set port %s bind mode, rv:%d",
1190+
port.m_alias.c_str(), status);
11931191
return false;
11941192
}
1195-
#endif
11961193

11971194
port.m_vlan_id = vlan.m_vlan_id;
11981195
port.m_port_vlan_id = vlan.m_vlan_id;

0 commit comments

Comments
 (0)