netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Meelis Roos <mroos@linux.ee>, netdev@vger.kernel.org
Subject: Re: Badness at net/core/dev.c:2199
Date: Sun, 16 Dec 2007 10:33:40 -0800	[thread overview]
Message-ID: <20071216103340.07479359@deepthought> (raw)
In-Reply-To: <20071216182057.GB31380@2ka.mipt.ru>

On Sun, 16 Dec 2007 21:20:57 +0300
Evgeniy Polyakov <johnpol@2ka.mipt.ru> wrote:

> On Sun, Dec 16, 2007 at 07:55:55PM +0200, Meelis Roos (mroos@linux.ee) wrote:
> > Just got this trace from current 2.6.24-rc5+git running on 32-bit ppc 
> > (PReP subarch, tulip NIC's) during apt-get update (logged in via ssh so 
> > also ssh traffic):
> > 
> > ------------[ cut here ]------------
> > Badness at net/core/dev.c:2199
> 
> Please test attached patch.
> If I understood ltulip correctly, it is posible, that number of entries
> can be higher than requested budget. When work_done is equal to
> budget-1, the last skb has to be processed, after 154'th line
> work_done will become equal to budget and thus loop has to break,
> check on the same 154 line will become false, but work_done will be
> increased nevertheless, which will make work_done being equal to
> budget+1 at exit, which will fire warning you saw.
> 
> Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
> 
> diff --git a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c
> index 3653314..9e0e97a 100644
> --- a/drivers/net/tulip/interrupt.c
> +++ b/drivers/net/tulip/interrupt.c
> @@ -151,8 +151,9 @@ int tulip_poll(struct napi_struct *napi, int budget)
>                         if (tulip_debug > 5)
>                                 printk(KERN_DEBUG "%s: In tulip_rx(), entry %d %8.8x.\n",
>                                        dev->name, entry, status);
> -		       if (work_done++ >= budget)
> +		       if (work_done >= budget)
>                                 goto not_done;
> +		       work_done++;
>  
>                         if ((status & 0x38008300) != 0x0300) {
>                                 if ((status & 0x38000300) != 0x0300) {
> 
> 

I already sendout a correct patch last week. It should pre-increment.

-- 
Stephen Hemminger <shemminger@linux-foundation.org>

  reply	other threads:[~2007-12-16 18:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-16 17:55 Badness at net/core/dev.c:2199 Meelis Roos
2007-12-16 18:20 ` Evgeniy Polyakov
2007-12-16 18:33   ` Stephen Hemminger [this message]
2007-12-16 18:46     ` Evgeniy Polyakov
2007-12-20 10:57     ` Meelis Roos

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=20071216103340.07479359@deepthought \
    --to=shemminger@linux-foundation.org \
    --cc=johnpol@2ka.mipt.ru \
    --cc=mroos@linux.ee \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).