diff options
author | Eric Dumazet <edumazet@google.com> | 2014-09-29 10:34:29 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-15 08:36:42 +0200 |
commit | 48a6420f1f9aebb64b83228c3185d0f8ec14a8fb (patch) | |
tree | eb1c38178be17633d713f93ccb42c9727b2fb6c1 /net | |
parent | e31689a696987eaea95c46f42e818000c880cbfb (diff) | |
download | kernel-common-48a6420f1f9aebb64b83228c3185d0f8ec14a8fb.tar.gz kernel-common-48a6420f1f9aebb64b83228c3185d0f8ec14a8fb.tar.bz2 kernel-common-48a6420f1f9aebb64b83228c3185d0f8ec14a8fb.zip |
gro: fix aggregation for skb using frag_list
[ Upstream commit 73d3fe6d1c6d840763ceafa9afae0aaafa18c4b5 ]
In commit 8a29111c7ca6 ("net: gro: allow to build full sized skb")
I added a regression for linear skb that traditionally force GRO
to use the frag_list fallback.
Erez Shitrit found that at most two segments were aggregated and
the "if (skb_gro_len(p) != pinfo->gso_size)" test was failing.
This is because pinfo at this spot still points to the last skb in the
chain, instead of the first one, where we find the correct gso_size
information.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Fixes: 8a29111c7ca6 ("net: gro: allow to build full sized skb")
Reported-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/skbuff.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index da1351ecb146..baf6fc457df9 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -3140,6 +3140,9 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) NAPI_GRO_CB(skb)->free = NAPI_GRO_FREE_STOLEN_HEAD; goto done; } + /* switch back to head shinfo */ + pinfo = skb_shinfo(p); + if (pinfo->frag_list) goto merge; if (skb_gro_len(p) != pinfo->gso_size) |