* [PATCH] erspan: remove the incorrect mtu limit for erspan
@ 2019-09-27 6:58 Haishuang Yan
2019-09-30 18:11 ` David Miller
2019-10-03 18:29 ` William Tu
0 siblings, 2 replies; 3+ messages in thread
From: Haishuang Yan @ 2019-09-27 6:58 UTC (permalink / raw)
To: David S. Miller; +Cc: William Tu, netdev, linux-kernel, Haishuang Yan
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>
---
net/ipv4/ip_gre.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index a53a543..52690bb 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -1446,6 +1446,7 @@ static void erspan_setup(struct net_device *dev)
struct ip_tunnel *t = netdev_priv(dev);
ether_setup(dev);
+ dev->max_mtu = 0;
dev->netdev_ops = &erspan_netdev_ops;
dev->priv_flags &= ~IFF_TX_SKB_SHARING;
dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] erspan: remove the incorrect mtu limit for erspan
2019-09-27 6:58 [PATCH] erspan: remove the incorrect mtu limit for erspan Haishuang Yan
@ 2019-09-30 18:11 ` David Miller
2019-10-03 18:29 ` William Tu
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-09-30 18:11 UTC (permalink / raw)
To: yanhaishuang; +Cc: u9012063, netdev, linux-kernel
From: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Date: Fri, 27 Sep 2019 14:58:20 +0800
> 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>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] erspan: remove the incorrect mtu limit for erspan
2019-09-27 6:58 [PATCH] erspan: remove the incorrect mtu limit for erspan Haishuang Yan
2019-09-30 18:11 ` David Miller
@ 2019-10-03 18:29 ` William Tu
1 sibling, 0 replies; 3+ messages in thread
From: William Tu @ 2019-10-03 18:29 UTC (permalink / raw)
To: Haishuang Yan; +Cc: David S. Miller, Linux Kernel Network Developers, LKML
On Thu, Sep 26, 2019 at 11:59 PM Haishuang Yan
<yanhaishuang@cmss.chinamobile.com> wrote:
>
> 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>
> ---
Thanks for the patch!
Acked-by: William Tu <u9012063@gmail.com>
> net/ipv4/ip_gre.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
> index a53a543..52690bb 100644
> --- a/net/ipv4/ip_gre.c
> +++ b/net/ipv4/ip_gre.c
> @@ -1446,6 +1446,7 @@ static void erspan_setup(struct net_device *dev)
> struct ip_tunnel *t = netdev_priv(dev);
>
> ether_setup(dev);
> + dev->max_mtu = 0;
> dev->netdev_ops = &erspan_netdev_ops;
> dev->priv_flags &= ~IFF_TX_SKB_SHARING;
> dev->priv_flags |= IFF_LIVE_ADDR_CHANGE;
> --
> 1.8.3.1
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-03 18:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-27 6:58 [PATCH] erspan: remove the incorrect mtu limit for erspan Haishuang Yan
2019-09-30 18:11 ` David Miller
2019-10-03 18:29 ` William Tu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.