summaryrefslogtreecommitdiff
path: root/datapath
diff options
context:
space:
mode:
authorHaishuang Yan <yanhaishuang@cmss.chinamobile.com>2019-10-09 14:22:12 -0700
committerSimon Horman <simon.horman@netronome.com>2019-10-18 16:22:12 +0200
commit5bc09abc714c82b5d2c7757f517f5ba987f2aed5 (patch)
tree49cf4c5245b17a5a3bea1e3dc4a09f4cd4bdbe13 /datapath
parent8fc8986d0ad9d2f6819a837adfe436fb75883e72 (diff)
downloadopenvswitch-5bc09abc714c82b5d2c7757f517f5ba987f2aed5.tar.gz
compat: remove the incorrect mtu limit for erspan
Upstream commit: commit 0e141f757b2c78c983df893e9993313e2dc21e38 Author: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Date: Fri Sep 27 14:58:20 2019 +0800 erspan: remove the incorrect mtu limit for erspan erspan driver calls ether_setup(), after commit 61e84623ace3 ("net: centralize net_device min/max MTU checking"), the range of mtu is [min_mtu, max_mtu], which is [68, 1500] by default. It causes the dev mtu of the erspan device to not be greater than 1500, this limit value is not correct for ipgre tap device. Tested: Before patch: # ip link set erspan0 mtu 1600 Error: mtu greater than device maximum. After patch: # ip link set erspan0 mtu 1600 # ip -d link show erspan0 21: erspan0@NONE: <BROADCAST,MULTICAST> mtu 1600 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 68 maxmtu 0 Fixes: 61e84623ace3 ("net: centralize net_device min/max MTU checking") Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net> Cc: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Signed-off-by: Greg Rose <gvrose8192@gmail.com> Acked-by: Yi-Hung Wei <yihung.wei@gmail.com> Signed-off-by: Simon Horman <simon.horman@netronome.com>
Diffstat (limited to 'datapath')
-rw-r--r--datapath/linux/compat/ip_gre.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/datapath/linux/compat/ip_gre.c b/datapath/linux/compat/ip_gre.c
index 2015d597c..2852dad76 100644
--- a/datapath/linux/compat/ip_gre.c
+++ b/datapath/linux/compat/ip_gre.c
@@ -1099,6 +1099,9 @@ static void erspan_setup(struct net_device *dev)
eth_hw_addr_random(dev);
ether_setup(dev);
+#ifdef HAVE_NET_DEVICE_MAX_MTU
+ dev->max_mtu = 0;
+#endif
dev->netdev_ops = &erspan_netdev_ops;
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;