From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Mark Huth <mhuth@mvista.com>,
"Amit S. Kale" <amitkale@linsyssoft.com>,
netdev@vger.kernel.org,
Mithlesh Thukral <mithlesh@linsyssoft.com>,
Vitaly Wool <vwool@ru.mvista.com>
Subject: Re: [Kgdb-bugreport] [PATCH 2.6.20-rc7] 8139too KGDBoE fix
Date: Fri, 23 Feb 2007 11:22:46 -0800 [thread overview]
Message-ID: <20070223112246.0712e7de@freekitty> (raw)
In-Reply-To: <45DF3DAB.3010902@ru.mvista.com>
On Fri, 23 Feb 2007 22:16:59 +0300
Sergei Shtylyov <sshtylyov@ru.mvista.com> wrote:
> Hello.
>
> Stephen Hemminger wrote:
>
> >>>>>This thread came up on kgdb-bugreport mailing list. Could you please suggest
> >>>>>us what's the correct way of fixing this problem?
>
> >>>>>1. When running a kgdb on RTL8139 ethernet interface: 8139too driver prints
> >>>>>too many "Out-of-sync dirty pointer" messages on console and gdb can't
> >>>>>connect to kgdb stub. These messages can be suppressed, though it still
> >>>>>results in connection failures frequently.
>
> >>>>We think this comes from calling the driver while the queue is stopped.
> >>>>Drivers should not do horrible things when hard start is called with the
> >>>>queue stopped, but unfortunately, at this time, at least some drivers
> >>>>do explode or complain under that condition.
>
> >>>The kernel is built on a set of assumptions about calling context. Your
> >>>out of tree code is violating one of them. Why not check for stopped queue
> >>>and do some action to try and clear it, that is what netconsole does.
>
> >> The queue can't be stopped when the netpoll traffic trapping is enabled
> >>(cause this effectively bypasses queue control), So, the stopped queue
> >>indoication doesn't work also -- *that* is the problem. It's not at all
> >>specific to KGBoE -- only to traffic trapping.
>
> > You can't ask a device to send a packet when it has no resources.
>
> When traffic trapping is enabled, and driver stops the queue, the
> __LINK_STATE_XOFF flag does *not* get set, so netif_queue_stopped() resturns
> *zero*. What may be done in this situation?
Read netpoll_send_skb()
int status = NETDEV_TX_BUSY;
...
if (netif_tx_trylock(dev)) {
/* try until next clock tick */
for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
tries > 0; --tries) {
if (!netif_queue_stopped(dev))
status = dev->hard_start_xmit(skb, dev);
if (status == NETDEV_TX_OK)
break;
/* tickle device maybe there is some cleanup */
netpoll_poll(np);
udelay(USEC_PER_POLL);
}
netif_tx_unlock(dev);
netpoll_poll() allows device to try and cleanup transmit resources.
--
Stephen Hemminger <shemminger@linux-foundation.org>
next prev parent reply other threads:[~2007-02-23 19:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200701312144.56497.sshtylyov@ru.mvista.com>
[not found] ` <45DDBD96.10000@ru.mvista.com>
[not found] ` <45DDC7C0.8050100@ru.mvista.com>
2007-02-23 7:08 ` [Kgdb-bugreport] [PATCH 2.6.20-rc7] 8139too KGDBoE fix Amit S. Kale
2007-02-23 18:10 ` Mark Huth
2007-02-23 19:04 ` Stephen Hemminger
2007-02-23 19:09 ` Sergei Shtylyov
2007-02-23 19:13 ` Stephen Hemminger
2007-02-23 19:16 ` Sergei Shtylyov
2007-02-23 19:22 ` Stephen Hemminger [this message]
2007-02-23 19:27 ` Sergei Shtylyov
2007-02-23 20:34 ` Mark Huth
2007-03-14 13:42 ` Sergei Shtylyov
2007-03-14 14:04 ` Sergei Shtylyov
2007-03-14 21:40 ` Sergei Shtylyov
[not found] <1172746367.2515.31.camel@xenon>
2007-03-01 16:22 ` Sergei Shtylyov
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=20070223112246.0712e7de@freekitty \
--to=shemminger@linux-foundation.org \
--cc=amitkale@linsyssoft.com \
--cc=mhuth@mvista.com \
--cc=mithlesh@linsyssoft.com \
--cc=netdev@vger.kernel.org \
--cc=sshtylyov@ru.mvista.com \
--cc=vwool@ru.mvista.com \
/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).