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

Modifying Vlan MTU is not reflected in the linux host interfaces #7134

Open
dgsudharsan opened this issue Mar 24, 2021 · 4 comments
Open

Modifying Vlan MTU is not reflected in the linux host interfaces #7134

dgsudharsan opened this issue Mar 24, 2021 · 4 comments

Comments

@dgsudharsan
Copy link
Collaborator

dgsudharsan commented Mar 24, 2021

Description

Modifying Vlan MTU is not reflected in the linux host interfaces. However it is programmed in the hardware.

Steps to reproduce the issue:

  1. Add the following configuration
    {
    "VLAN": {
    "Vlan2": {
    "vlanid": "2",
    "mtu": "3000"
    }
    }
    }
  2. Check ifconfig
    ifconfig Vlan2
    Vlan2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9100
    inet6 fe80::268a:7ff:fe7e:4f80 prefixlen 64 scopeid 0x20
    ether 24:8a:07:7e:4f:80 txqueuelen 1000 (Ethernet)
    RX packets 0 bytes 0 (0.0 B)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 38 bytes 4940 (4.8 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Describe the results you received:

MTU doesn't change in linux host interface

Describe the results you expected:

MTU must be updated in the linux host interface

Output of show version:

show version

SONiC Software Version: SONiC.SONIC.202012.52-50e4cc15_Internal
Distribution: Debian 10.8
Kernel: 4.19.0-12-2-amd64
Build commit: 50e4cc15
Build date: Tue Mar 23 10:25:18 UTC 2021
Built by: sw-r2d2-bot@r-build-sonic-ci03

Platform: x86_64-mlnx_msn3800-r0
HwSKU: ACS-MSN3800
ASIC: mellanox
ASIC Count: 1
Serial Number: MT1937X00537
Uptime: 05:12:35 up 11 min,  2 users,  load average: 0.58, 0.77, 0.60

Docker images:
REPOSITORY                    TAG                                 IMAGE ID            SIZE
docker-teamd                  SONIC.202012.52-50e4cc15_Internal   e404a957f154        412MB
docker-teamd                  latest                              e404a957f154        412MB
docker-nat                    SONIC.202012.52-50e4cc15_Internal   060b170d465d        415MB
docker-nat                    latest                              060b170d465d        415MB
docker-platform-monitor       SONIC.202012.52-50e4cc15_Internal   866984132b08        693MB
docker-platform-monitor       latest                              866984132b08        693MB
docker-orchagent              SONIC.202012.52-50e4cc15_Internal   2da47edc09a5        431MB
docker-orchagent              latest                              2da47edc09a5        431MB
docker-fpm-frr                SONIC.202012.52-50e4cc15_Internal   12a1712803da        431MB
docker-fpm-frr                latest                              12a1712803da        431MB
docker-sflow                  SONIC.202012.52-50e4cc15_Internal   6205a14bb9df        413MB
docker-sflow                  latest                              6205a14bb9df        413MB
docker-wjh                    202012.202012.0-e663b63             bbf69da66de2        441MB
docker-wjh                    latest                              bbf69da66de2        441MB
docker-syncd-mlnx             SONIC.202012.52-50e4cc15_Internal   f5386fd640ba        666MB
docker-syncd-mlnx             latest                              f5386fd640ba        666MB
docker-dhcp-relay             SONIC.202012.52-50e4cc15_Internal   cb5a7323aeb9        409MB
docker-dhcp-relay             latest                              cb5a7323aeb9        409MB
docker-snmp                   SONIC.202012.52-50e4cc15_Internal   8df6c0d14af7        438MB
docker-snmp                   latest                              8df6c0d14af7        438MB
docker-sonic-mgmt-framework   SONIC.202012.52-50e4cc15_Internal   4881ef3e8dc7        616MB
docker-sonic-mgmt-framework   latest                              4881ef3e8dc7        616MB
docker-router-advertiser      SONIC.202012.52-50e4cc15_Internal   7e59764069ca        398MB
docker-router-advertiser      latest                              7e59764069ca        398MB
docker-lldp                   SONIC.202012.52-50e4cc15_Internal   33da46fe8a7f        438MB
docker-lldp                   latest                              33da46fe8a7f        438MB
docker-database               SONIC.202012.52-50e4cc15_Internal   e65ccc177592        398MB
docker-database               latest                              e65ccc177592        398MB
docker-sonic-telemetry        SONIC.202012.52-50e4cc15_Internal   5e079afb02ab        487MB
docker-sonic-telemetry        latest                              5e079afb02ab        487MB

Additional information you deem important (e.g. issue happens only occasionally):

@prsunny
Copy link
Contributor

prsunny commented Mar 25, 2021

This is currently a limitation. Reference - https://github.com/Azure/sonic-swss/blob/master/cfgmgr/vlanmgr.cpp#L351.

@anshuv-mfst
Copy link

Known limitation, to be treated as enhancement request.

@ghost
Copy link

ghost commented Apr 14, 2021

Working on the issue.

@ghost
Copy link

ghost commented Apr 15, 2021

@prsunny, @dgsudharsan I have prepared draft PR with raw code, which represents idea of the fix I would like to propose: sonic-net/sonic-swss#1709

Could I ask you to check that I goes in a wright direction? Maybe, there will be some suggestions regarding implementation of the functionality.

The idea of the fix is the next.
During update of mtu for the vlan, we will read the mtu value from CONFIG_DB and compare it with the lowest value of mtu received from members of the vlan. If the desired value of mtu is higher than the other one, the mtu of the vlan member will be set, because there is a requirement that the mtu value of a vlan should be lower or equal to mtu of its member.
The members could be added/deleted or their mtus could be changed, due to this, mtu of the vlan should be checked and updated in the next cases:

  1. mtu field has set/changed in config table of the vlan;
  2. a member of the vlan has added/removed;
  3. mtu of a member of the vlan has changed.

For more detailed information you could check the draft PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants