All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net] gro: fix aggregation for skb using frag_list
@ 2014-09-29 17:34 Eric Dumazet
  2014-09-29 19:19 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2014-09-29 17:34 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Erez Shitrit

From: Eric Dumazet <edumazet@google.com>

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>
---
 net/core/skbuff.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index da1378a3e2c7..8d289697cc7a 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -3152,6 +3152,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)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] gro: fix aggregation for skb using frag_list
  2014-09-29 17:34 [PATCH net] gro: fix aggregation for skb using frag_list Eric Dumazet
@ 2014-09-29 19:19 ` David Miller
       [not found]   ` <07015a18f26f49518ceeabb35f2539ee@DB3PR05MB441.eurprd05.prod.outlook.com>
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2014-09-29 19:19 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, erezsh

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 29 Sep 2014 10:34:29 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> 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>

Applied and queued up for -stable, thanks Eric.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re: [PATCH net] gro: fix aggregation for skb using frag_list
       [not found]   ` <07015a18f26f49518ceeabb35f2539ee@DB3PR05MB441.eurprd05.prod.outlook.com>
@ 2014-09-30 11:51     ` Erez Shitrit
  0 siblings, 0 replies; 3+ messages in thread
From: Erez Shitrit @ 2014-09-30 11:51 UTC (permalink / raw)
  To: erezsh, davem, eric.dumazet; +Cc: netdev

> From: David Miller [mailto:davem@davemloft.net]
> Sent: Monday, September 29, 2014 10:19 PM
> To: eric.dumazet@gmail.com
> Cc: netdev@vger.kernel.org; Erez Shitrit
> Subject: Re: [PATCH net] gro: fix aggregation for skb using frag_list
>
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Mon, 29 Sep 2014 10:34:29 -0700
>
>> From: Eric Dumazet <edumazet@google.com>
>>
>> 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>
> Applied and queued up for -stable, thanks Eric.
>
Tested. and it works for IPoIB driver. Thanks Eric.

Erez

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-30 11:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-29 17:34 [PATCH net] gro: fix aggregation for skb using frag_list Eric Dumazet
2014-09-29 19:19 ` David Miller
     [not found]   ` <07015a18f26f49518ceeabb35f2539ee@DB3PR05MB441.eurprd05.prod.outlook.com>
2014-09-30 11:51     ` Erez Shitrit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.