All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] gro: fix truesize underestimation
@ 2012-02-13 14:09 Eric Dumazet
  2012-02-13 21:05 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2012-02-13 14:09 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Herbert Xu

skb_gro_receive() doesnt update truesize properly when adding one skb to
frag_list.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
---
 net/core/skbuff.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index da0c97f..f3a5307 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2906,7 +2906,7 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
 	nskb->prev = p;
 
 	nskb->data_len += p->len;
-	nskb->truesize += p->len;
+	nskb->truesize += p->truesize;
 	nskb->len += p->len;
 
 	*head = nskb;
@@ -2916,6 +2916,7 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
 	p = nskb;
 
 merge:
+	p->truesize += skb->truesize - len;
 	if (offset > headlen) {
 		unsigned int eat = offset - headlen;
 

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

* Re: [PATCH net-next] gro: fix truesize underestimation
  2012-02-13 14:09 [PATCH net-next] gro: fix truesize underestimation Eric Dumazet
@ 2012-02-13 21:05 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-02-13 21:05 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, herbert

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 13 Feb 2012 15:09:20 +0100

> skb_gro_receive() doesnt update truesize properly when adding one skb to
> frag_list.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Applied.

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

end of thread, other threads:[~2012-02-13 21:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-13 14:09 [PATCH net-next] gro: fix truesize underestimation Eric Dumazet
2012-02-13 21:05 ` David Miller

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.