From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dennis Chen Subject: Re: [PATCH] net: Prevent multiple NAPI instances co-existing in the list Date: Fri, 9 Jan 2015 10:32:13 +0800 Message-ID: References: <20150108111554.GA8720@gondor.apana.org.au> <20150109022752.GA15785@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: netdev , Miller , Eric Dumazet To: Herbert Xu Return-path: Received: from mail-pd0-f177.google.com ([209.85.192.177]:47982 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752536AbbAICcf (ORCPT ); Thu, 8 Jan 2015 21:32:35 -0500 Received: by mail-pd0-f177.google.com with SMTP id ft15so14653347pdb.8 for ; Thu, 08 Jan 2015 18:32:34 -0800 (PST) In-Reply-To: <20150109022752.GA15785@gondor.apana.org.au> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Jan 9, 2015 at 10:27 AM, Herbert Xu wrote: > On Fri, Jan 09, 2015 at 10:24:18AM +0800, Dennis Chen wrote: >> >> Hi Herbert, please see this code piece in napi_poll: >> >> /* Some drivers may have called napi_schedule >> * prior to exhausting their budget. >> */ >> if (unlikely(!list_empty(&n->poll_list))) { >> pr_warn_once("%s: Budget exhausted after napi rescheduled\n", >> n->dev ? n->dev->name : "backlog"); >> goto out_unlock; >> } >> >> Here "Some drivers" may have called napi_schedule to make >> n->poll_list is not empty, does that mean "Some drivers" will clear >> NAPI_STATE_SCHED bit, otherwise the napi_schedule() will do nothing, >> does that make sense for you question? ;-) > > No it tells me that you don't understand the problem at all. > Those drivers will end up resetting the NAPI_STATE_SCHED bit > after clearing it. > > Cheers, > -- > Email: Herbert Xu > Home Page: http://gondor.apana.org.au/~herbert/ > PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt Thanks, would you pls give me an example of those drivers? I'll study it further... -- Den