gro: fix truesize underestimation

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Eric Dumazet 2012-02-13 04:09:20 +00:00 committed by David S. Miller
parent c5665a538d
commit de8261c2fa

View File

@ -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;