]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
igbvf: fix truesize underestimation
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 20 Oct 2011 09:22:18 +0000 (09:22 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 13:21:18 +0000 (21:21 +0800)
igbvf allocates half a page per skb fragment. We must account
PAGE_SIZE/2 increments on skb->truesize, not the actual frag length.

(cherry picked from commit 7b8b59617ead5acc6ff041a9ad2ea1fe7a58094f)
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/igbvf/netdev.c

index e404209204cd3d0cb0ab9697abf1d5617ad8d635..57c72dd7ab520591a2f6b56849030d3ee109db8d 100644 (file)
@@ -312,7 +312,7 @@ static bool igbvf_clean_rx_irq(struct igbvf_adapter *adapter,
 
                        skb->len += length;
                        skb->data_len += length;
-                       skb->truesize += length;
+                       skb->truesize += PAGE_SIZE / 2;
                }
 send_up:
                i++;