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

[vlanmgr] Support Jumbo Frame By Default #1393

Merged

Conversation

tahmed-dev
Copy link
Contributor

@tahmed-dev tahmed-dev commented Aug 10, 2020

The bridge created for vlans has a a default MTU of 1500 which is
serving as default for vlans added to the bridge. This PR changes
the default MTU to 9100 to be inline with portchannels and other
interfaces.

signed-off-by: Tamer Ahmed [email protected]

What I did
Change the default mtu size of the host bridge interface

Why I did it
Adding support for jumbo frames

How I verified it
building an image with the change and could see Vlan100 having mtu set as 9100

admin@str-s6000-acs-14:~$ sudo ifconfig Vlan1000
Vlan1000: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet 192.168.0.1  netmask 255.255.248.0  broadcast 192.168.7.255
        inet6 fe80::f68e:38ff:fe16:bc8d  prefixlen 64  scopeid 0x20<link>
        ether f4:8e:38:16:bc:8d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 520 (520.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Adding/removal of different vlan members with mtu 1500 did not affect the Bridge MTU settings.

admin@str-s6000-acs-14:~$ sudo ifconfig Bridge
Bridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet6 fe80::8071:f9ff:fe1b:e8d1  prefixlen 64  scopeid 0x20<link>
        ether 06:b6:2e:24:76:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 1170 (1.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo brctl show
bridge name	bridge id		STP enabled	interfaces
Bridge		8000.06b62e247645	no		Ethernet12
							Ethernet16
							Ethernet20
							Ethernet24
							Ethernet28
							Ethernet32
							Ethernet36
							Ethernet4
							Ethernet40
							Ethernet44
							Ethernet48
							Ethernet52
							Ethernet56
							Ethernet60
							Ethernet64
							Ethernet68
							Ethernet72
							Ethernet76
							Ethernet8
							Ethernet80
							Ethernet84
							Ethernet88
							Ethernet92
							Ethernet96
							dummy
docker0		8000.0242f67040d3	no		
admin@str-s6000-acs-14:~$ sudo brctl delif Bridge dummy
admin@str-s6000-acs-14:~$ sudo brctl addif Bridge dummy
admin@str-s6000-acs-14:~$ sudo ifconfig Bridge
Bridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet6 fe80::8071:f9ff:fe1b:e8d1  prefixlen 64  scopeid 0x20<link>
        ether 06:b6:2e:24:76:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 1170 (1.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig dummy
dummy: flags=130<BROADCAST,NOARP>  mtu 1500
        ether 06:b6:2e:24:76:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig dummy up
admin@str-s6000-acs-14:~$ sudo ifconfig dummy
dummy: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 1500
        inet6 fe80::4b6:2eff:fe24:7645  prefixlen 64  scopeid 0x20<link>
        ether 06:b6:2e:24:76:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig Bridge
Bridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet6 fe80::8071:f9ff:fe1b:e8d1  prefixlen 64  scopeid 0x20<link>
        ether 06:b6:2e:24:76:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 1170 (1.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo brctl delif Bridge Ethernet12
admin@str-s6000-acs-14:~$ sudo ifconfig Ethernet12
Ethernet12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet6 fe80::f68e:38ff:fe16:bc8d  prefixlen 64  scopeid 0x20<link>
        ether f4:8e:38:16:bc:8d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 23  bytes 4535 (4.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ip link set Ethernet12 mtu 1500
admin@str-s6000-acs-14:~$ sudo ifconfig Ethernet12
Ethernet12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::f68e:38ff:fe16:bc8d  prefixlen 64  scopeid 0x20<link>
        ether f4:8e:38:16:bc:8d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 24  bytes 4765 (4.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo brctl addif Bridge Ethernet12
admin@str-s6000-acs-14:~$ sudo ifconfig Ethernet12
Ethernet12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::f68e:38ff:fe16:bc8d  prefixlen 64  scopeid 0x20<link>
        ether f4:8e:38:16:bc:8d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 25  bytes 4995 (4.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig Bridge
Bridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet6 fe80::8071:f9ff:fe1b:e8d1  prefixlen 64  scopeid 0x20<link>
        ether 06:b6:2e:24:76:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 1170 (1.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo brctl delif Bridge Ethernet12 Ethernet16
admin@str-s6000-acs-14:~$ sudo brctl delif Bridge Ethernet20 Ethernet24 Ethernet28 Ethernet32 Ethernet36 Ethernet4 Ethernet40 Ethernet44 Ethernet48 Ethernet52 Ethernet56 Ethernet60 Ethernet64 Ethernet68 Ethernet72 Ethernet76 Ethernet8 Ethernet80 Ethernet84 Ethernet88 Ethernet92 Ethernet96 
admin@str-s6000-acs-14:~$ sudo brctl show
bridge name	bridge id		STP enabled	interfaces
Bridge		8000.06b62e247645	no		dummy
docker0		8000.0242f67040d3	no		
admin@str-s6000-acs-14:~$ sudo ifconfig Bridge
Bridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet6 fe80::8071:f9ff:fe1b:e8d1  prefixlen 64  scopeid 0x20<link>
        ether 06:b6:2e:24:76:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 1170 (1.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig Ethernet12
Ethernet12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::f68e:38ff:fe16:bc8d  prefixlen 64  scopeid 0x20<link>
        ether f4:8e:38:16:bc:8d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 34  bytes 7065 (6.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig Ethernet4
Ethernet4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet6 fe80::f68e:38ff:fe16:bc8d  prefixlen 64  scopeid 0x20<link>
        ether f4:8e:38:16:bc:8d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 34  bytes 7022 (6.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo brctl addif Bridge Ethernet12
admin@str-s6000-acs-14:~$ sudo ifconfig Ethernet4
Ethernet4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet6 fe80::f68e:38ff:fe16:bc8d  prefixlen 64  scopeid 0x20<link>
        ether f4:8e:38:16:bc:8d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 35  bytes 7251 (7.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig Ethernet12
Ethernet12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::f68e:38ff:fe16:bc8d  prefixlen 64  scopeid 0x20<link>
        ether f4:8e:38:16:bc:8d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 35  bytes 7295 (7.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig Bridge
Bridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet6 fe80::8071:f9ff:fe1b:e8d1  prefixlen 64  scopeid 0x20<link>
        ether 06:b6:2e:24:76:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 1170 (1.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig Ethernet12 down
admin@str-s6000-acs-14:~$ sudo ifconfig Bridge
Bridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet6 fe80::8071:f9ff:fe1b:e8d1  prefixlen 64  scopeid 0x20<link>
        ether 06:b6:2e:24:76:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 1170 (1.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig dummy
dummy: flags=195<UP,BROADCAST,RUNNING,NOARP>  mtu 1500
        inet6 fe80::4b6:2eff:fe24:7645  prefixlen 64  scopeid 0x20<link>
        ether 06:b6:2e:24:76:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig dummy down
admin@str-s6000-acs-14:~$ sudo ifconfig Bridge
Bridge: flags=4099<UP,BROADCAST,MULTICAST>  mtu 9100
        inet6 fe80::8071:f9ff:fe1b:e8d1  prefixlen 64  scopeid 0x20<link>
        ether 06:b6:2e:24:76:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 1170 (1.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig Ethernet12 up
admin@str-s6000-acs-14:~$ sudo ifconfig Bridge
Bridge: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet6 fe80::8071:f9ff:fe1b:e8d1  prefixlen 64  scopeid 0x20<link>
        ether 06:b6:2e:24:76:45  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13  bytes 1690 (1.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig Ethernet12
Ethernet12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::f68e:38ff:fe16:bc8d  prefixlen 64  scopeid 0x20<link>
        ether f4:8e:38:16:bc:8d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 46  bytes 9441 (9.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

admin@str-s6000-acs-14:~$ sudo ifconfig Vlan1000
Vlan1000: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9100
        inet 192.168.0.1  netmask 255.255.248.0  broadcast 192.168.7.255
        inet6 fe80::f68e:38ff:fe16:bc8d  prefixlen 64  scopeid 0x20<link>
        ether f4:8e:38:16:bc:8d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 780 (780.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Details if related

The brdige created for vlans has a a default MTU of 1500 which is
serving as default for vlans added to the bridge. This PR changes
the default MTU to 9100 to be inline with portchannels and other
interfaces.

signed-off-by: Tamer Ahmed <[email protected]>
@tahmed-dev tahmed-dev marked this pull request as ready for review August 11, 2020 18:41
@daall
Copy link
Contributor

daall commented Aug 13, 2020

retest vs please

@tahmed-dev tahmed-dev merged commit 879f45b into sonic-net:master Aug 14, 2020
abdosi pushed a commit that referenced this pull request Aug 19, 2020
The bridge created for vlans has a a default MTU of 1500 which is
serving as default for vlans added to the bridge. This PR changes
the default MTU to 9100 to be inline with portchannels and other
interfaces.

signed-off-by: Tamer Ahmed <[email protected]>
@jleveque
Copy link
Contributor

@tahmed-dev, @prsunny: Should this PR have been cherry-picked to the 201911 branch? It appears the kernel did not add support for this until 4.18, yet the 201911 branch is still running 4.9.

@tahmed-dev
Copy link
Contributor Author

@tahmed-dev, @prsunny: Should this PR have been cherry-picked to the 201911 branch? It appears the kernel did not add support for this until 4.18, yet the 201911 branch is still running 4.9.

I am not aware of different Kernel behavior related to Bridge MTU size between versions 4.9 and 4.18. I can verify it with a 201911 image.

@prsunny
Copy link
Collaborator

prsunny commented Aug 24, 2020

@jleveque , yes, I think we cannot port it back to 201911. This explains why we haven't considered this fix before.

@jleveque
Copy link
Contributor

@abdosi: It appears you may need to remove this patch from the 201911 branch.

@abdosi
Copy link
Contributor

abdosi commented Aug 24, 2020

yes, ACK

@abdosi
Copy link
Contributor

abdosi commented Aug 25, 2020

Reverted from 201911.

jleveque added a commit to sonic-net/sonic-buildimage that referenced this pull request Sep 1, 2020
…nce again (#5242)

Remove radvd Makefile and patch, change docker-router-advertiser Dockerfile template to simply install the vanilla radvd package using apt-get.

- In PR #2795, we started building radvd from source and patching it to prevent it from erroring out when advertising an MTU of 9100 which was greater than the MTU size configured on the bridge interface (1500), which was due to a limitation in the 4.9 Linux kernel.
- Master branch is now using Linux kernel 4.19. As of 4.18, the kernel supports setting a bridge MTU to a value > 1500.
- PR sonic-net/sonic-swss#1393 modified vlanmgrd to take advantage of this and now configures the MTU of bridge interfaces in SONiC to the proper size of 9100. Therefore, we no longer need to patch radvd. Since we no longer need to patch radvd, we no longer need to build it from source, so we can save build time by going back to simply installing the vanilla radvd Debian package in the router-advertiser container.
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
…nce again (sonic-net#5242)

Remove radvd Makefile and patch, change docker-router-advertiser Dockerfile template to simply install the vanilla radvd package using apt-get.

- In PR sonic-net#2795, we started building radvd from source and patching it to prevent it from erroring out when advertising an MTU of 9100 which was greater than the MTU size configured on the bridge interface (1500), which was due to a limitation in the 4.9 Linux kernel.
- Master branch is now using Linux kernel 4.19. As of 4.18, the kernel supports setting a bridge MTU to a value > 1500.
- PR sonic-net/sonic-swss#1393 modified vlanmgrd to take advantage of this and now configures the MTU of bridge interfaces in SONiC to the proper size of 9100. Therefore, we no longer need to patch radvd. Since we no longer need to patch radvd, we no longer need to build it from source, so we can save build time by going back to simply installing the vanilla radvd Debian package in the router-advertiser container.
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…sonic-net#1393)

Add PortChannels to the list of interfaces (port_id_2_iface) to support FDB dump for PortChannel in a VLAN group.

Fix sonic-net/sonic-buildimage#4793

- How I did it

- Get LAG ID from the DB.
- Find the LAG name from APP DB.
- Add it to the list of 'port_id_2_iface' to be used.

- How to verify it
Reproduce the issue mentioned on this PR and try to run fast-reboot with this fix.

- Previous command output (if the output of a command-line utility has changed)
Traceback:
src_ifs = {map_mac_ip_per_vlan[vlan_name][dst_mac] for vlan_name, dst_mac, _ in arp_entries}
KeyError: 'b8:59:9f:a8:e2:00'

Signed-off-by: Shlomi Bitton <[email protected]>
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants