diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2011-10-13 07:38:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-13 22:25:21 -0400 |
commit | 5e6c355c47e75314fd2282d087616069d4093ecf (patch) | |
tree | 3d7942a388e8493b1dc5aaa685add4bb09f6b97e /drivers/net/vmxnet3 | |
parent | 5935f81c595897d213afcf756e3e41af7c704f0e (diff) |
vmxnet3: fix skb truesize underestimation
vmxnet3 allocates a page per skb fragment. We must account
PAGE_SIZE increments on skb->truesize, not the actual frag length.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Shreyas Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 1694038192e0..902f284fd054 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c | |||
@@ -658,6 +658,7 @@ vmxnet3_append_frag(struct sk_buff *skb, struct Vmxnet3_RxCompDesc *rcd, | |||
658 | frag->page_offset = 0; | 658 | frag->page_offset = 0; |
659 | frag->size = rcd->len; | 659 | frag->size = rcd->len; |
660 | skb->data_len += frag->size; | 660 | skb->data_len += frag->size; |
661 | skb->truesize += PAGE_SIZE; | ||
661 | skb_shinfo(skb)->nr_frags++; | 662 | skb_shinfo(skb)->nr_frags++; |
662 | } | 663 | } |
663 | 664 | ||
@@ -1277,7 +1278,6 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq, | |||
1277 | skb = ctx->skb; | 1278 | skb = ctx->skb; |
1278 | if (rcd->eop) { | 1279 | if (rcd->eop) { |
1279 | skb->len += skb->data_len; | 1280 | skb->len += skb->data_len; |
1280 | skb->truesize += skb->data_len; | ||
1281 | 1281 | ||
1282 | vmxnet3_rx_csum(adapter, skb, | 1282 | vmxnet3_rx_csum(adapter, skb, |
1283 | (union Vmxnet3_GenericDesc *)rcd); | 1283 | (union Vmxnet3_GenericDesc *)rcd); |