[PATCH net-next] sky2: fix skb truesize underestimation

Subsystems: marvell gigabit ethernet drivers (skge/sky2), networking drivers, the rest

STALE5445d

2 messages, 2 authors, 2011-10-13 · open the first message on its own page

[PATCH net-next] sky2: fix skb truesize underestimation

From: Eric Dumazet <hidden>
Date: 2011-10-13 21:11:34

sky2 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 <redacted>
CC: Stephen Hemminger <redacted>
---
 drivers/net/ethernet/marvell/sky2.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c
index 6895e3b..9263490 100644
--- a/drivers/net/ethernet/marvell/sky2.c
+++ b/drivers/net/ethernet/marvell/sky2.c
@@ -2486,7 +2486,7 @@ static void skb_put_frags(struct sk_buff *skb, unsigned int hdr_space,
 
 			frag->size = size;
 			skb->data_len += size;
-			skb->truesize += size;
+			skb->truesize += PAGE_SIZE;
 			skb->len += size;
 			length -= size;
 		}

Re: [PATCH net-next] sky2: fix skb truesize underestimation

From: David Miller <davem@davemloft.net>
Date: 2011-10-13 21:13:36

From: Eric Dumazet <redacted>
Date: Thu, 13 Oct 2011 23:11:30 +0200
sky2 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 <redacted>
Applied, thanks Eric.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help