[portsorch] Configure hostif tagging for subports#1573
[portsorch] Configure hostif tagging for subports#1573prsunny merged 3 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Vitaliy Senchyshyn <[email protected]>
|
retest vs please |
|
@lguohan could you please review? |
|
retest vs please |
orchagent/portsorch.cpp
Outdated
| { | ||
| if (!parentPort.m_bridge_port_id) | ||
| { | ||
| if (!setHostIntfsStripTag(port, SAI_HOSTIF_VLAN_TAG_STRIP)) |
There was a problem hiding this comment.
Is it port or parentPort?
There was a problem hiding this comment.
Good catch! Fixed.
|
request @wendani to review |
orchagent/portsorch.cpp
Outdated
| { | ||
| if (!setHostIntfsStripTag(parentPort, SAI_HOSTIF_VLAN_TAG_STRIP)) | ||
| { | ||
| SWSS_LOG_WARN("Failed to set %s for hostif of port %s", |
There was a problem hiding this comment.
What is the thought for WARN instead of ERROR as above?
There was a problem hiding this comment.
Copy & paste from the log right above in the function. Didn't notice that there is no return false.
orchagent/portsorch.cpp
Outdated
| // Restore hostif vlan tag for the parent port when the last subport is removed | ||
| if (parentPort.m_child_ports.empty()) | ||
| { | ||
| if (!parentPort.m_bridge_port_id) |
|
Can you also validate on the lag parent port case? |
|
Looks relevant to sonic-net/sonic-buildimage#3943 |
I'm not sure I can do this. I've applied the following config on a switch running t0 topo config: But this didn't have any effect - no subinterface PortChannel0001.10 created in linux. The config present in config db only. |
Keep port channel name within 15 characters. Rename to |
@wendani I've validated this case.
Validation results |
Configure SAI_HOSTIF_VLAN_TAG_KEEP for the parent port hostif when a first subport is added and restore it to SAI_HOSTIF_VLAN_TAG_STRIP when the last subport is removed. Signed-off-by: Vitaliy Senchyshyn <[email protected]>
Configure SAI_HOSTIF_VLAN_TAG_KEEP for the parent port hostif when a first subport is added and restore it to SAI_HOSTIF_VLAN_TAG_STRIP when the last subport is removed. Signed-off-by: Vitaliy Senchyshyn <[email protected]>
Configure SAI_HOSTIF_VLAN_TAG_KEEP for the parent port hostif when a first subport is added and restore it to SAI_HOSTIF_VLAN_TAG_STRIP when the last subport is removed. Signed-off-by: Vitaliy Senchyshyn <[email protected]>
Configure SAI_HOSTIF_VLAN_TAG_KEEP for the parent port hostif when a first subport is added and restore it to SAI_HOSTIF_VLAN_TAG_STRIP when the last subport is removed. Signed-off-by: Vitaliy Senchyshyn <[email protected]>
Signed-off-by: Vitaliy Senchyshyn [email protected]
What I did
Configure SAI_HOSTIF_VLAN_TAG_KEEP for the parent port hostif when a first subport is added and restore it to SAI_HOSTIF_VLAN_TAG_STRIP when the last subport is removed.
Why I did it
As the parent port hostif tagging is not modified during subports creation the packets destined to the subport interfaces are forwarded as untagged by the packet driver and therefore never reaching the subport netdevs.
How I verified it
Created two subports using the config below and pinged their IPs with vlan 10 and 20 tagged packets respectively. The ping was successful.
Details if related