sky2: fix skb truesize underestimation
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 13 Oct 2011 21:12:46 +0000 (17:12 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Oct 2011 21:12:46 +0000 (17:12 -0400)
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 <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/sky2.c

index 6895e3b..9263490 100644 (file)
@@ -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;
                }