Skip to content
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

[sub intf] Inherit parent port mtu changes #1479

Merged
merged 3 commits into from
Nov 1, 2020

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>
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