summaryrefslogtreecommitdiffstats
path: root/net/mpls/mpls_gso.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2014-10-20 13:49:16 +0200
committerDavid S. Miller <davem@davemloft.net>2014-10-20 12:38:12 -0400
commit1e16aa3ddf863c6b9f37eddf52503230a62dedb3 (patch)
tree7e62dc2a614a315a05c3e182c29108d0ec0a029f /net/mpls/mpls_gso.c
parentce8ec4896749783bd6cdc457e6012cfc18e09c8b (diff)
downloadblackbird-op-linux-1e16aa3ddf863c6b9f37eddf52503230a62dedb3.tar.gz
blackbird-op-linux-1e16aa3ddf863c6b9f37eddf52503230a62dedb3.zip
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>
Diffstat (limited to 'net/mpls/mpls_gso.c')
-rw-r--r--net/mpls/mpls_gso.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mpls/mpls_gso.c b/net/mpls/mpls_gso.c
index e28ed2ef5b06..f0f5309a2d72 100644
--- a/net/mpls/mpls_gso.c
+++ b/net/mpls/mpls_gso.c
@@ -48,7 +48,7 @@ static struct sk_buff *mpls_gso_segment(struct sk_buff *skb,
__skb_push(skb, skb->mac_len);
/* Segment inner packet. */
- mpls_features = skb->dev->mpls_features & netif_skb_features(skb);
+ mpls_features = skb->dev->mpls_features & features;
segs = skb_mac_gso_segment(skb, mpls_features);
OpenPOWER on IntegriCloud