]> git.baikalelectronics.ru Git - kernel.git/commit
net: gso: use feature flag argument in all protocol gso handlers
authorFlorian Westphal <fw@strlen.de>
Mon, 20 Oct 2014 11:49:16 +0000 (13:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Oct 2014 16:38:12 +0000 (12:38 -0400)
commit841261f64f4f41a27e034d43b4304e4d37ba3b0c
tree7e62dc2a614a315a05c3e182c29108d0ec0a029f
parent333a0fe57732f4b02580aa51212c0c202e7ad887
net: gso: use feature flag argument in all protocol gso handlers

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>
net/ipv4/af_inet.c
net/ipv4/gre_offload.c
net/ipv4/udp_offload.c
net/ipv6/ip6_offload.c
net/mpls/mpls_gso.c