OpenCloudOS-Kernel/drivers/net
Nicolas Dichtel 9bb392f624 vrf: fix maximum MTU
My initial goal was to fix the default MTU, which is set to 65536, ie above
the maximum defined in the driver: 65535 (ETH_MAX_MTU).

In fact, it's seems more consistent, wrt min_mtu, to set the max_mtu to
IP6_MAX_MTU (65535 + sizeof(struct ipv6hdr)) and use it by default.

Let's also, for consistency, set the mtu in vrf_setup(). This function
calls ether_setup(), which set the mtu to 1500. Thus, the whole mtu config
is done in the same function.

Before the patch:
$ ip link add blue type vrf table 1234
$ ip link list blue
9: blue: <NOARP,MASTER> mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether fa:f5:27:70:24:2a brd ff:ff:ff:ff:ff:ff
$ ip link set dev blue mtu 65535
$ ip link set dev blue mtu 65536
Error: mtu greater than device maximum.

Fixes: 5055376a3b ("net: vrf: Fix ping failed when vrf mtu is set to 0")
CC: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-06-08 11:46:23 -07:00
..
appletalk net: appletalk: cops: Fix data race in cops_probe1 2021-05-24 14:00:32 -07:00
arcnet
bonding bonding: init notify_work earlier to avoid uninitialized use 2021-05-17 15:24:20 -07:00
caif net: caif: remove BUG_ON(dev == NULL) in caif_xmit 2021-05-13 17:30:41 +02:00
can can: m_can: m_can_tx_work_queue(): fix tx_skb race condition 2021-05-06 09:24:07 +02:00
dsa net: dsa: microchip: enable phy errata workaround on 9567 2021-05-24 14:27:18 -07:00
ethernet mlxsw: core: Set thermal zone polling delay argument to real value at init 2021-06-07 13:11:41 -07:00
fddi fddi/skfp: fix typo 2021-04-27 14:07:27 -07:00
fjes
hamradio
hippi
hyperv hv_netvsc: Make netvsc/VF binding check both MAC and serial number 2021-04-25 18:19:23 -07:00
ieee802154 Merge tag 'ieee802154-for-davem-2021-06-03' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan 2021-06-03 15:21:58 -07:00
ipa net: ipa: memory region array is variable size 2021-05-11 16:22:37 -07:00
ipvlan
mdio net: mdio: octeon: Fix some double free issues 2021-05-13 15:43:52 -07:00
mhi
netdevsim netdevsim: Only use sampling truncation length when valid 2021-04-22 13:23:56 -07:00
pcs
phy net: mdiobus: get rid of a BUG_ON() 2021-05-17 15:50:58 -07:00
plip
ppp Networking changes for 5.13. 2021-04-29 11:57:23 -07:00
slip
team
usb net: usb: fix memory leak in smsc75xx_bind 2021-05-24 14:26:25 -07:00
vmxnet3
wan Revert "drivers/net/wan/hdlc_fr: Fix a double free in pvc_xmit" 2021-05-03 13:37:58 -07:00
wireguard wireguard: allowedips: free empty intermediate nodes when removing single node 2021-06-04 14:25:14 -07:00
wireless wireless-drivers fixes for v5.13 2021-06-03 15:17:33 -07:00
wwan net: wwan: core: Return poll error in case of port removal 2021-04-22 13:26:02 -07:00
xen-netback
Kconfig net: Add a WWAN subsystem 2021-04-16 15:31:02 -07:00
LICENSE.SRC
Makefile net: Add a WWAN subsystem 2021-04-16 15:31:02 -07:00
Space.c
bareudp.c
dummy.c
eql.c
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-04-26 12:00:00 -07:00
gtp.c
ifb.c
loopback.c
macsec.c
macvlan.c macvlan: Use 'hash' iterators to simplify code 2021-04-27 14:03:11 -07:00
macvtap.c
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c net: tun: Remove redundant assignment to ret 2021-04-28 13:58:58 -07:00
veth.c veth: check for NAPI instead of xdp_prog before xmit of XDP frame 2021-04-16 15:42:07 -07:00
virtio_net.c virtio-net: fix for skb_over_panic inside big mode 2021-06-03 15:29:04 -07:00
vrf.c vrf: fix maximum MTU 2021-06-08 11:46:23 -07:00
vsockmon.c
vxlan.c
xen-netfront.c