From: Eric Dumazet Date: Thu, 13 Oct 2011 07:53:42 +0000 (+0000) Subject: e1000: fix skb truesize underestimation X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~398 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=925d039aa0bff9e6fe89e1f147a554180ba48528;p=users%2Fjedix%2Flinux-maple.git e1000: fix skb truesize underestimation 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 Signed-off-by: David S. Miller Signed-off-by: Joe Jin --- diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 5faa609740c2a..fb7f82b94c5d8 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c @@ -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; } /**