]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
e1000: fix skb truesize underestimation
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 13 Oct 2011 07:53:42 +0000 (07:53 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 03:13:14 +0000 (11:13 +0800)
e1000 allocates a full page per skb fragment. We must account PAGE_SIZE
increments on skb->truesize, not the actual frag length.

(cherry picked from commit ed64b3cc11502f50e1401f12e33d021592800bca)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/e1000/e1000_main.c

index 5faa609740c2ae506e2fa4660688a2c8ac880c39..fb7f82b94c5d8a8138b2eaf8c2d18320a1132c47 100644 (file)
@@ -3733,7 +3733,7 @@ static void e1000_consume_page(struct e1000_buffer *bi, struct sk_buff *skb,
        bi->page = NULL;
        skb->len += length;
        skb->data_len += length;
-       skb->truesize += length;
+       skb->truesize += PAGE_SIZE;
 }
 
 /**