* [PATCH net-next] vmxnet3: fix skb truesize underestimation
@ 2011-10-13 21:38 Eric Dumazet
2011-10-14 2:26 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2011-10-13 21:38 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Shreyas Bhatewara
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>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 1694038..902f284 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,
frag->page_offset = 0;
frag->size = rcd->len;
skb->data_len += frag->size;
+ skb->truesize += PAGE_SIZE;
skb_shinfo(skb)->nr_frags++;
}
@@ -1277,7 +1278,6 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
skb = ctx->skb;
if (rcd->eop) {
skb->len += skb->data_len;
- skb->truesize += skb->data_len;
vmxnet3_rx_csum(adapter, skb,
(union Vmxnet3_GenericDesc *)rcd);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] vmxnet3: fix skb truesize underestimation
2011-10-13 21:38 [PATCH net-next] vmxnet3: fix skb truesize underestimation Eric Dumazet
@ 2011-10-14 2:26 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-10-14 2:26 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, sbhatewara
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 13 Oct 2011 23:38:17 +0200
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-14 2:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13 21:38 [PATCH net-next] vmxnet3: fix skb truesize underestimation Eric Dumazet
2011-10-14 2:26 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).