-
Notifications
You must be signed in to change notification settings - Fork 531
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[portsorch] Configure hostif tagging for subports #1573
[portsorch] Configure hostif tagging for subports #1573
Conversation
Signed-off-by: Vitaliy Senchyshyn <vsenchyshyn@barefootnetworks.com>
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it port or parentPort?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the thought for WARN
instead of ERROR
as above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
== SAI_NULL_OBJECT_ID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
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 <vsenchyshyn@barefootnetworks.com>
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 <vsenchyshyn@barefootnetworks.com>
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 <vsenchyshyn@barefootnetworks.com>
Signed-off-by: Vitaliy Senchyshyn vsenchyshyn@barefootnetworks.com
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