]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: fix skb truesize underestimation
authorEric Dumazet <eric.dumazet@gmail.com>
Thu, 13 Oct 2011 07:59:41 +0000 (07:59 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 14:19:22 +0000 (22:19 +0800)
ixgbe 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 98130646770db42cd14c44ba0d7f2d0eb8078820)
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/ixgbe/ixgbe_main.c

index a6d602e66feba392491bdcda46213200b19d9b20..bc0a2d11df31f0c636457d98faa3084ab52a51c3 100644 (file)
@@ -1325,7 +1325,7 @@ static bool ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,
 
                        skb->len += upper_len;
                        skb->data_len += upper_len;
-                       skb->truesize += upper_len;
+                       skb->truesize += PAGE_SIZE / 2;
                }
 
                i++;