diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2012-02-12 23:09:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-13 16:04:39 -0500 |
commit | de8261c2fa364397ed872fad1244d75364689168 (patch) | |
tree | 742b5723530cf485361c90af76518fc6ea33ade1 /net/core | |
parent | c5665a538da6b887a5096358a12527785506e5ac (diff) |
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>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/skbuff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index da0c97f2fab4..f3a530780753 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) | |||
2906 | nskb->prev = p; | 2906 | nskb->prev = p; |
2907 | 2907 | ||
2908 | nskb->data_len += p->len; | 2908 | nskb->data_len += p->len; |
2909 | nskb->truesize += p->len; | 2909 | nskb->truesize += p->truesize; |
2910 | nskb->len += p->len; | 2910 | nskb->len += p->len; |
2911 | 2911 | ||
2912 | *head = nskb; | 2912 | *head = nskb; |
@@ -2916,6 +2916,7 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) | |||
2916 | p = nskb; | 2916 | p = nskb; |
2917 | 2917 | ||
2918 | merge: | 2918 | merge: |
2919 | p->truesize += skb->truesize - len; | ||
2919 | if (offset > headlen) { | 2920 | if (offset > headlen) { |
2920 | unsigned int eat = offset - headlen; | 2921 | unsigned int eat = offset - headlen; |
2921 | 2922 | ||