Skip to content

[sub intf] Inherit parent port mtu changes#1479

Merged
lguohan merged 3 commits intosonic-net:masterfrom
wendani:sub_intf_mtu
Nov 1, 2020
Merged

[sub intf] Inherit parent port mtu changes#1479
lguohan merged 3 commits intosonic-net:masterfrom
wendani:sub_intf_mtu

Conversation

@wendani
Copy link
Contributor

@wendani wendani commented Oct 24, 2020

What I did

Why I did it
Sub interface inherits mtu from parent physical port or port channel according to https://github.com/Azure/SONiC/blob/master/doc/subport/sonic-sub-port-intf-hld.md#1-requirements

This inheritance should include the scenario of mtu changes on parent physical port or port channel.

How I verified it
In newly added vs unit test on both master and 201911 branches:
Before the change:

E           AssertionError: Expected field/value pairs not found: expected={'SAI_ROUTER_INTERFACE_ATTR_MTU': '8888'},                 received={'SAI_ROUTER_INTERFACE_ATTR_VIRTUAL_ROUTER_ID': 'oid:0x3000000000022', 'SAI_ROUTER_INTERFACE_ATTR_SRC_MAC_ADDRESS': '02:42:AC:11:00:05', 'SAI_ROUTER_INTERFACE_ATTR_TYPE': 'SAI_ROUTER_INTERFACE_TYPE_SUB_PORT', 'SAI_ROUTER_INTERFACE_ATTR_PORT_ID': 'oid:0x1000000000012', 'SAI_ROUTER_INTERFACE_ATTR_OUTER_VLAN_ID': '10', 'SAI_ROUTER_INTERFACE_ATTR_ADMIN_V4_STATE': 'true', 'SAI_ROUTER_INTERFACE_ATTR_ADMIN_V6_STATE': 'true', 'SAI_ROUTER_INTERFACE_ATTR_MTU': '9100', 'SAI_ROUTER_INTERFACE_ATTR_NAT_ZONE_ID': '0'}, key="oid:0x60000000005c6", table="ASIC_STATE:SAI_OBJECT_TYPE_ROUTER_INTERFACE"

After the change:

test_sub_port_intf.py::TestSubPortIntf::test_sub_port_intf_mtu remove extra link dummy
PASSED

Details if related

wendani and others added 3 commits September 29, 2020 19:40
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
@lguohan lguohan merged commit a89b8ed into sonic-net:master Nov 1, 2020
@wendani wendani deleted the sub_intf_mtu branch November 1, 2020 22:00
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
Signed-off-by: Danny Allen <daall@microsoft.com>
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
Sub interface inherits mtu from parent physical port or port channel according to https://github.com/Azure/SONiC/blob/master/doc/subport/sonic-sub-port-intf-hld.md#1-requirements

This inheritance should include the scenario of mtu changes on parent physical port or port channel.

Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants