Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757395AbXLLPNQ (ORCPT ); Wed, 12 Dec 2007 10:13:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756227AbXLLPM7 (ORCPT ); Wed, 12 Dec 2007 10:12:59 -0500 Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net ([74.93.104.97]:59999 "EHLO sunset.davemloft.net" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753071AbXLLPM6 (ORCPT ); Wed, 12 Dec 2007 10:12:58 -0500 Date: Wed, 12 Dec 2007 07:12:54 -0800 (PST) Message-Id: <20071212.071254.180816076.davem@davemloft.net> To: jesse.brandeburg@intel.com Cc: joonwpark81@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, herbert@gondor.apana.org.au, auke-jan.h.kok@intel.com Subject: Re: [PATCH] [NET]: Fix Ooops of napi net_rx_action. From: David Miller In-Reply-To: <36D9DB17C6DE9E40B059440DB8D95F5203FBAF94@orsmsx418.amr.corp.intel.com> References: <36D9DB17C6DE9E40B059440DB8D95F5203F82FC3@orsmsx418.amr.corp.intel.com> <36D9DB17C6DE9E40B059440DB8D95F5203FBAF94@orsmsx418.amr.corp.intel.com> X-Mailer: Mew version 5.2 on Emacs 22.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 864 Lines: 24 From: "Brandeburg, Jesse" Date: Tue, 11 Dec 2007 16:38:37 -0800 > @@ -3933,6 +3933,10 @@ quit_polling: > e1000_set_itr(adapter); > netif_rx_complete(poll_dev, napi); > e1000_irq_enable(adapter); > + if (work_done == weight) > + return work_done - 1; > + else > + return work_done; Don't do this. If you processed "weight" worth of packets, return that exact value and do not netif_rx_complete() and do not re-enable interrupts. That is the only correct fix. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/