diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2016-09-19 12:58:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-19 20:59:34 -0400 |
commit | 07b26c9454a2a19fff86d6fcf2aba6bc801eb8d8 (patch) | |
tree | 45cf751adb10dabaf383eaa07238c3427e3fe3f0 /net/ipv4/gre_offload.c | |
parent | e867e87ae88c54f741d1cabd1de536b4497a0504 (diff) | |
download | op-kernel-dev-07b26c9454a2a19fff86d6fcf2aba6bc801eb8d8.zip op-kernel-dev-07b26c9454a2a19fff86d6fcf2aba6bc801eb8d8.tar.gz |
gso: Support partial splitting at the frag_list pointer
Since commit 8a29111c7 ("net: gro: allow to build full sized skb")
gro may build buffers with a frag_list. This can hurt forwarding
because most NICs can't offload such packets, they need to be
segmented in software. This patch splits buffers with a frag_list
at the frag_list pointer into buffers that can be TSO offloaded.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/gre_offload.c')
-rw-r--r-- | net/ipv4/gre_offload.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/gre_offload.c b/net/ipv4/gre_offload.c index ecd1e09..96e0efe 100644 --- a/net/ipv4/gre_offload.c +++ b/net/ipv4/gre_offload.c @@ -24,7 +24,7 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb, __be16 protocol = skb->protocol; u16 mac_len = skb->mac_len; int gre_offset, outer_hlen; - bool need_csum, ufo; + bool need_csum, ufo, gso_partial; if (!skb->encapsulation) goto out; @@ -69,6 +69,8 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb, goto out; } + gso_partial = !!(skb_shinfo(segs)->gso_type & SKB_GSO_PARTIAL); + outer_hlen = skb_tnl_header_len(skb); gre_offset = outer_hlen - tnl_hlen; skb = segs; @@ -96,7 +98,7 @@ static struct sk_buff *gre_gso_segment(struct sk_buff *skb, greh = (struct gre_base_hdr *)skb_transport_header(skb); pcsum = (__sum16 *)(greh + 1); - if (skb_is_gso(skb)) { + if (gso_partial) { unsigned int partial_adj; /* Adjust checksum to account for the fact that |