From: Tommy Christensen <tommy.christensen@tpack.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: davem@davemloft.net, netdev@oss.sgi.com
Subject: Re: [PATCH] net: Disable queueing when carrier is lost
Date: Sat, 30 Apr 2005 14:57:12 +0200 [thread overview]
Message-ID: <427380A8.2070006@tpack.net> (raw)
In-Reply-To: <20050429234512.GA22699@gondor.apana.org.au>
Herbert Xu wrote:
> You're right. However, the netif_queue_stopped check doesn't make sense.
> If the queue isn't stopped, you'd be leaving the qdisc open which means
> that it can fill up later on. Remember the problem is not just with NIC
> drivers stopping the queue explicitly, some NICs simply won't process the
> TX rings when the carrier is off.
I know. I've given this a lot of thought already - and failed to come
up with a solution for everything.
Regarding the sort of NICs you mention, I came to the conclusion that
we shouldn't try to fix this in the stack. They indicate that they can
take more packets (by NOT calling netif_stop_queue), so we should obey
this and leave it to the drivers to handle things, e.g. by dropping the
packets if needed. Otherwise we deprive the drivers the option of
maintaining their tx_carrier_errors statistics, for instance. And,
theoretically, a driver could even depend on having its hard_start_xmit
invoked in order to kickstart its TX engine.
As stated earlier: if a driver holds on to packets "indefinitely", it
is buggy. This should be fixed, rather than the core having to jump
through loops trying to remedy things.
So, I am reluctant to drop this check for netif_queue_stopped. Doing so
would needlessly impact the drivers that work fine already (or at least
should be handling this situation).
> The other concern I have is that this code can call dev_activate
> or dev_deactivate twice in a row. As far as I can tell this is
> harmless for the moment but it would be nice if we can avoid it.
Agreed, this isn't ideal. However, if this is the only downside, it
is something that I'd be happy to live with. I don't see any easy
way to avoid it.
Ideas, anyone?
-Tommy
next prev parent reply other threads:[~2005-04-30 12:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-26 21:53 [PATCH] net: Disable queueing when carrier is lost Tommy Christensen
2005-04-27 12:43 ` Herbert Xu
[not found] ` <426FDF8B.1030808@tpack.net>
2005-04-27 21:42 ` Herbert Xu
2005-04-27 23:27 ` Tommy Christensen
2005-04-27 23:43 ` Herbert Xu
2005-04-29 9:51 ` Tommy Christensen
2005-04-29 10:18 ` Herbert Xu
2005-04-29 12:22 ` Tommy Christensen
2005-04-29 23:45 ` Herbert Xu
2005-04-30 0:46 ` Herbert Xu
2005-04-30 12:59 ` Tommy Christensen
2005-04-30 12:57 ` Tommy Christensen [this message]
2005-05-01 8:11 ` Herbert Xu
2005-05-02 23:00 ` Tommy Christensen
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=427380A8.2070006@tpack.net \
--to=tommy.christensen@tpack.net \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@oss.sgi.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).