[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131103171846.GB4151@cpaasch-mac>
Date: Sun, 3 Nov 2013 18:18:46 +0100
From: Christoph Paasch <christoph.paasch@...ouvain.be>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: Ben Hutchings <bhutchings@...arflare.com>,
David Miller <davem@...emloft.net>,
herbert@...dor.apana.org.au, netdev@...r.kernel.org,
hkchu@...gle.com, mwdalton@...gle.com
Subject: Re: [PATCH v4 net-next] net: introduce dev_set_forwarding()
On 02/11/13 - 12:58:50, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> Christoph Paasch and Jerry Chu reported crashes in skb_segment() caused
> by commit 8a29111c7ca6 ("net: gro: allow to build full sized skb")
>
> skb_segment() only deals with a frag_list chain containing MSS sized
> fragments. Even if we fix this problem, its better if GRO layer
> doesn't build skb with a frag_list in the first place, to let TSO
> packets reaching output devices.
>
> David Miller and Ben Hutchings suggested we keep track of number of
> forwarding users to be able to :
>
> - Disable LRO
> - Make sure GRO layer do not use skb frag_list to extend skb capacity
>
> Note that after this patch, LRO is automatically re-enabled if
> forwarding is disabled on the device, or if a device is removed
> from a bridge.
>
> Tested:
>
> lpq84:~# ethtool -k eth0 | grep "large-receive"
> large-receive-offload: on
> lpq84:~# echo 1 >/proc/sys/net/ipv4/conf/eth0/forwarding
> lpq84:~# ethtool -k eth0 | grep "large-receive"
> large-receive-offload: off [requested on]
> lpq84:~# echo 0 >/proc/sys/net/ipv4/conf/eth0/forwarding
> lpq84:~# ethtool -k eth0 | grep "large-receive"
> large-receive-offload: on
>
>
> lpq84:~# ethtool -K eth0 lro off
> lpq84:~# ethtool -k eth0 | grep "large-receive"
> large-receive-offload: off
> lpq84:~# echo 1 >/proc/sys/net/ipv4/conf/eth0/forwarding
> lpq84:~# ethtool -k eth0 | grep "large-receive"
> large-receive-offload: off
> lpq84:~# echo 0 >/proc/sys/net/ipv4/conf/eth0/forwarding
> lpq84:~# ethtool -k eth0 | grep "large-receive"
> large-receive-offload: off
> lpq84:~# ethtool -K eth0 lro on
>
>
> lpq84:~# cat /proc/sys/net/ipv4/ip_forward
> 0
> lpq84:~# echo 1 >/proc/sys/net/ipv4/ip_forward
> lpq84:~# ethtool -k eth0 | grep "large-receive"
> large-receive-offload: off [requested on]
> lpq84:~# echo 0 >/proc/sys/net/ipv4/ip_forward
> lpq84:~# ethtool -k eth0 | grep "large-receive"
> large-receive-offload: on
>
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: Christoph Paasch <christoph.paasch@...ouvain.be>
> Reported-by: Jerry Chu <hkchu@...gle.com>
> Cc: Michael Dalton <mwdalton@...gle.com>
> Fixes: 8a29111c7ca6 ("net: gro: allow to build full sized skb")
> ---
> v4: drop LRO in netdev_fix_features(), ase Ben pointed out.
>
> include/linux/netdevice.h | 3 ++-
> net/bridge/br_if.c | 4 +++-
> net/core/dev.c | 31 ++++++++++++++++++++-----------
> net/core/skbuff.c | 11 ++++++++---
> net/ipv4/devinet.c | 14 ++++++++------
> net/ipv6/addrconf.c | 5 ++---
> net/ipv6/addrconf_core.c | 2 ++
> 7 files changed, 45 insertions(+), 25 deletions(-)
Good, this fixes the crash I experienced on my workload.
Tested-by: Christoph Paasch <christoph.paasch@...ouvain.be>
Thanks, Eric!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists