Skip to content

Commit

Permalink
gro: fix truesize underestimation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Feb 13, 2012
1 parent c5665a5 commit de8261c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit de8261c

Please sign in to comment.