mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	shemminger@linux-foundation.org, jgarzik@pobox.com
Subject: Re: WARNING: at net/core/dev.c:2161 net_rx_action()
Date: Mon, 15 Oct 2007 15:18:49 -0700 (PDT)	[thread overview]
Message-ID: <20071015.151849.21595903.davem@davemloft.net> (raw)
In-Reply-To: <20071015220357.GA7174@elte.hu>

From: Ingo Molnar <mingo@elte.hu>
Date: Tue, 16 Oct 2007 00:03:57 +0200

> * David Miller <davem@davemloft.net> wrote:
> 
> > From: Ingo Molnar <mingo@elte.hu>
> > Date: Mon, 15 Oct 2007 13:24:30 +0200
> > 
> > > got this warning with Linus' latest -git tree:
> > > 
> > >   WARNING: at net/core/dev.c:2161 net_rx_action()
> > >    [<80564db4>] net_rx_action+0xce/0x186
> > >    [<8011ba98>] __do_softirq+0x6c/0xcf
> > >    [<8011bb2d>] do_softirq+0x32/0x36
> > >    [<8011bcae>] irq_exit+0x35/0x40
> > >    [<80104fdb>] do_IRQ+0x5c/0x71
> > >    [<801048cd>] do_nmi+0x8f/0x238
> > >    [<801033a3>] common_interrupt+0x23/0x30
> > >    =======================
> > 
> > This is a driver bug, the work "budget" passed into a driver's 
> > ->poll() handler should never be exceeded.  That's what this warning 
> > assertion is checking.
> > 
> > What ethernet card is in your system and what driver is being used to 
> > drive it?
> 
> it's forcedeth.
> 
> i've checked nv_napi_poll(), and i dont see how it could return larger 
> than 'limit' number of packets.
> 
> it could return packets == limit though:
> 
>                 pkts = nv_rx_process_optimized(dev, budget);
> ...
> 
>         if (pkts < budget) {
>                 /* re-enable receive interrupts */
>                 spin_lock_irqsave(&np->lock, flags);
> 
>                 __netif_rx_complete(dev, napi);
> 
> ...
>         return pkts;
> 
> shouldnt that be "pkts <= budget"? But even that shouldnt cause a larger 
> than limit return. Weird.

No, not in this case.  The driver must only netif_rx_complete()
if it consumed strictly less than "budget" worth of work.

> there are two networking cards in the system, the other one is a:
> 
>   eth1: RealTek RTL8139 at 0xf080e000, 00:c0:df:03:68:5d, IRQ 11
>   eth1:  Identified 8139 chip type 'RTL-8139B'
> 
> but this one should be inactive (not plugged into the network). Should i 
> try to get a debug print out of the actual 'weight' and 'work' integers, 
> and of the n->poll function address?

That might help.

I don't see any possible nv_rx_process{,_optimized}() can return "work
> budget" either.  But I do notice these loops unconditionally execute
at least once, perhaps budget is being passed erroneously in as zero?

  parent reply	other threads:[~2007-10-15 22:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-15 11:24 Ingo Molnar
2007-10-15 11:27 ` Ingo Molnar
2007-10-15 16:18   ` Ingo Molnar
2007-10-15 19:57 ` David Miller
2007-10-15 22:03   ` Ingo Molnar
2007-10-15 22:07     ` Ingo Molnar
2007-10-15 22:21       ` David Miller
2007-10-15 22:30       ` [patch] forcedeth: fix the NAPI poll function Ingo Molnar
2007-10-15 22:39         ` David Miller
2007-10-15 22:40         ` Jeff Garzik
2007-10-15 22:41           ` Jeff Garzik
2007-10-16  5:42           ` Ingo Molnar
2007-10-16  5:47             ` Jeff Garzik
2007-10-16  6:40               ` Ingo Molnar
2007-10-16  7:17                 ` Jeff Garzik
2007-10-16  7:49                   ` Ingo Molnar
2007-10-16 16:52                     ` Jeff Garzik
2007-10-16 21:20         ` Jeff Garzik
2007-10-17  7:25           ` Ingo Molnar
2007-10-17 10:18             ` [patch] forcedeth: fix the NAPI poll function, take #2 Ingo Molnar
2007-10-18  0:21               ` Jeff Garzik
2007-10-15 22:18     ` David Miller [this message]
2007-10-15 22:20     ` WARNING: at net/core/dev.c:2161 net_rx_action() Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071015.151849.21595903.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=shemminger@linux-foundation.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome