Netdev List
 help / color / mirror / Atom feed
From: "Michael Chan" <mchan@broadcom.com>
To: "David Miller" <davem@davemloft.net>
Cc: shemminger@linux-foundation.org, takano@axe-inc.co.jp,
	"netdev" <netdev@vger.kernel.org>,
	ilpo.jarvinen@helsinki.fi
Subject: Re: Regression in net-2.6.24?
Date: Thu, 11 Oct 2007 20:17:16 -0700	[thread overview]
Message-ID: <1192159036.6889.6.camel@dell> (raw)
In-Reply-To: <20071011.181449.130846976.davem@davemloft.net>

On Thu, 2007-10-11 at 18:14 -0700, David Miller wrote:
> +       while (1) {
> +               work_done = tg3_poll_work(tp, work_done, budget);
> +
> +               if (unlikely(tp->tg3_flags & TG3_FLAG_TX_RECOVERY_PENDING))
> +                       goto tx_recovery;
> +
> +               if (unlikely(work_done >= budget))
> +                       break;
> +
> +               if (likely(!tg3_has_work(tp))) {
> +                       struct tg3_hw_status *sblk = tp->hw_status;
> +

--> new status block DMA

> +                       if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS) {
> +                               tp->last_tag = sblk->status_tag;
> +                               rmb();
> +                       } else
> +                               sblk->status &= ~SD_STATUS_UPDATED;

We need to read the sblk->status_tag before calling tg3_has_work().  If
a new status block DMA happens in between (shown above), tp->last_tag
will get the new tag and we will end up acknowledging work that we
haven't processed.

I'll go over this some more tonight and will send a patch to refine it.
Thanks.

> +
> +                       netif_rx_complete(tp->dev, napi);
> +                       tg3_restart_ints(tp);
> +                       break;
> +               }


  parent reply	other threads:[~2007-10-12  2:21 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09 12:19 [RFC PATCH net-2.6.24 0/3]: Attempt to fix lost_retrans brokeness Ilpo Järvinen
2007-10-09 12:20 ` [PATCH] [TCP]: Separate lost_retrans loop into own function Ilpo Järvinen
2007-10-09 12:20   ` [RFC PATCH] [TCP]: Fix lost_retrans loop vs fastpath problems Ilpo Järvinen
2007-10-09 12:20     ` [RFC PATCH] [TCP]: Limit processing lost_retrans loop to work-to-do cases Ilpo Järvinen
2007-10-10  9:44       ` David Miller
2007-10-10  9:44         ` David Miller
2007-10-11  1:55     ` [RFC PATCH] [TCP]: Fix lost_retrans loop vs fastpath problems TAKANO Ryousei
2007-10-11 10:12       ` Ilpo Järvinen
2007-10-11 13:51         ` Regression in net-2.6.24? TAKANO Ryousei
2007-10-11 23:48           ` David Miller
2007-10-11 23:55             ` Stephen Hemminger
2007-10-12  0:17               ` David Miller
2007-10-12  0:31                 ` Stephen Hemminger
2007-10-12  0:40                   ` David Miller
2007-10-12  0:50                     ` Stephen Hemminger
2007-10-12  1:00                       ` David Miller
2007-10-12  1:03                         ` David Miller
2007-10-12  1:14                 ` David Miller
2007-10-12  1:22                   ` Stephen Hemminger
2007-10-12  1:25                     ` David Miller
2007-10-12  3:17                   ` Michael Chan [this message]
2007-10-12  2:40                     ` David Miller
2007-10-12  8:54                       ` Michael Chan
2007-10-12  8:39                         ` David Miller
2007-10-12 10:22                   ` TAKANO Ryousei
2007-10-12 10:56                     ` David Miller
2007-10-10  9:45   ` [PATCH] [TCP]: Separate lost_retrans loop into own function David Miller
2007-10-09 13:03 ` [RFC PATCH net-2.6.24 0/3]: Attempt to fix lost_retrans brokeness Ilpo Järvinen
2007-10-10  9:48   ` David Miller

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=1192159036.6889.6.camel@dell \
    --to=mchan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=ilpo.jarvinen@helsinki.fi \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.org \
    --cc=takano@axe-inc.co.jp \
    /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