From patchwork Thu Oct 13 17:56:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 119581 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 99944B71CD for ; Fri, 14 Oct 2011 04:56:36 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756782Ab1JMR40 (ORCPT ); Thu, 13 Oct 2011 13:56:26 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:49531 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756641Ab1JMR4Y (ORCPT ); Thu, 13 Oct 2011 13:56:24 -0400 Received: by wyg34 with SMTP id 34so2145042wyg.19 for ; Thu, 13 Oct 2011 10:56:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:subject:from:to:cc:date:content-type:x-mailer :content-transfer-encoding:mime-version; bh=LIgobfsvruW0dRuuHBXJTPF0i9VCeZT7sKAVFVXXSyI=; b=gZTfrqYz3LjJ/rM43CCUf989phhYqN23JKx+TqpT1g7xTGuOoY+sspvkVXgmGZtfwp 6deYgNNuWaftBHNQJUxt8duikU2kimT+2OXRk0irvKLSEiRrsLT00VVFH9TDoMfz1Ed4 FRVx/bU/MrZpwiJZhJ04sTnSAJnsvd9E8IcEQ= Received: by 10.216.195.134 with SMTP id p6mr284642wen.6.1318528583123; Thu, 13 Oct 2011 10:56:23 -0700 (PDT) Received: from [10.150.51.214] (gw0.net.jmsp.net. [212.23.165.14]) by mx.google.com with ESMTPS id ek13sm7763286wbb.3.2011.10.13.10.56.21 (version=SSLv3 cipher=OTHER); Thu, 13 Oct 2011 10:56:22 -0700 (PDT) Message-ID: <1318528601.2393.57.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> Subject: [PATCH net-next] igb: fix skb truesize underestimation From: Eric Dumazet To: David Miller Cc: netdev , Jeff Kirsher Date: Thu, 13 Oct 2011 19:56:41 +0200 X-Mailer: Evolution 3.2.0- Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org e1000 allocates half a page per skb fragment. We must account PAGE_SIZE/2 increments on skb->truesize, not the actual frag length. Signed-off-by: Eric Dumazet --- drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 10670f9..1adcdf8 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c @@ -5946,7 +5946,7 @@ static bool igb_clean_rx_irq(struct igb_q_vector *q_vector, int budget) skb->len += length; skb->data_len += length; - skb->truesize += length; + skb->truesize += PAGE_SIZE / 2; if ((page_count(buffer_info->page) != 1) || (page_to_nid(buffer_info->page) != current_node))