]> git.ipfire.org Git - people/ms/linux.git/commit
net: gso: use feature flag argument in all protocol gso handlers
authorFlorian Westphal <fw@strlen.de>
Thu, 27 Aug 2015 05:17:39 +0000 (22:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2015 09:36:25 +0000 (11:36 +0200)
commitbbd7b7ff10f4d49ffdc2f9fa8310c8d380039739
treea1faf4659171b109bdee5f4d504190f8b8547ea9
parentf7600bc155c49ec97830743b4b91288858d01d2d
net: gso: use feature flag argument in all protocol gso handlers

[ Upstream commit 1e16aa3ddf863c6b9f37eddf52503230a62dedb3 ]

skb_gso_segment() has a 'features' argument representing offload features
available to the output path.

A few handlers, e.g. GRE, instead re-fetch the features of skb->dev and use
those instead of the provided ones when handing encapsulation/tunnels.

Depending on dev->hw_enc_features of the output device skb_gso_segment() can
then return NULL even when the caller has disabled all GSO feature bits,
as segmentation of inner header thinks device will take care of segmentation.

This e.g. affects the tbf scheduler, which will silently drop GRE-encap GSO skbs
that did not fit the remaining token quota as the segmentation does not work
when device supports corresponding hw offload capabilities.

Cc: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
[jay.vosburgh: backported to 3.14. ]
Signed-off-by: Jay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/af_inet.c
net/ipv4/gre_offload.c
net/ipv4/udp.c
net/ipv6/ip6_offload.c
net/mpls/mpls_gso.c