From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: "Amit S. Kale" <amitkale@linsyssoft.com>
Cc: kgdb-bugreport@lists.sourceforge.net,
Herbert Xu <herbert@gondor.apana.org.au>,
netdev@vger.kernel.org, jgarzik@pobox.com, mhuth@mvista.com
Subject: Re: [Kgdb-bugreport] [PATCH] 8139too: harden against TX ring overflow
Date: Fri, 06 Apr 2007 18:40:23 +0400 [thread overview]
Message-ID: <46165BD7.2090605@ru.mvista.com> (raw)
In-Reply-To: <200704060901.28628.amitkale@linsyssoft.com>
Hello.
Amit S. Kale wrote:
>>>This driver's 4-packet deep TX queue is too sensible to the "careless"
>>>callers ignoring its state (like netpoll in trapped mode), so add "queue
>>>full" check at the start of the hard_start_xmit() method (only under
>>>#ifndef RTL8139_NDEBUG, otherwise the queue will get stuck once dirty
>>>pointer gets out of sync); switch to using appropriate mnemonics for the
>>>return values while at it.
>>Could you please describe this netpoll scenario in more detail?
>>More importantly, why wouldn't we fix netpoll instead?
> We're trying to figure out a way of fixing netpoll. Don't know what the
> solution is yet.
> Here is what happens: in KGDB we set netpoll trapped flag. This prevents
> stopping and starting of a netdev queue. Interfaces that have a small ring
> (8139) run into a problem because of this. When the ring goes full, it can't
> stop the queue. This doesn't make sense since in absence of ring descriptors,
> the device can't transmit any more packets. Sergie had posted one more patch
> last week that lets us start and stop queues in trapped state.
>
> This patch fixes the 8139 side behavior in this context.
Not really -- the patch doesn't seem necessary in this context. It's just
an attempt to make the driver more robust against out-of-sync dirty pointer
and posting packets to already stopped queue -- that check constituting the
second part is still necessary in certain out-of-sync pointer situation where
the queue may erroneously be woken up, i.e. with the difference between the
dirty_tx and cur_tx is multiple of 4 by the end of loop (well, I guess that
has happened only with netpoll in trapped mode so far). Remember that all
these checks are done only when the driver debugging is enabled (it *is*
enabled by default though).
> -Amit
MBR, Sergei
next prev parent reply other threads:[~2007-04-06 14:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-05 19:50 [PATCH] 8139too: harden against TX ring overflow Sergei Shtylyov
2007-04-06 1:48 ` Herbert Xu
2007-04-06 3:31 ` Amit S. Kale
2007-04-06 14:40 ` Sergei Shtylyov [this message]
2007-05-24 21:29 ` [Kgdb-bugreport] " Sergei Shtylyov
2007-05-24 21:39 ` Jeff Garzik
2007-05-24 21:44 ` Sergei Shtylyov
2007-05-24 21:44 ` 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=46165BD7.2090605@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=amitkale@linsyssoft.com \
--cc=herbert@gondor.apana.org.au \
--cc=jgarzik@pobox.com \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=mhuth@mvista.com \
--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).