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: Tue, 03 May 2005 01:00:54 +0200 [thread overview]
Message-ID: <4276B126.6020704@tpack.net> (raw)
In-Reply-To: <20050501081140.GA20647@gondor.apana.org.au>
Herbert Xu wrote:
> On Sat, Apr 30, 2005 at 02:57:12PM +0200, Tommy Christensen wrote:
>>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).
>
> I don't see how those drivers are worse off without this check. When
> the carrier is off it doesn't really matter whether we're sending them
> packets or not. Besides, you didn't put this check in the link_watch
> code path which would affect them a lot more than this path.
My reasoning is reversed. You're saying:
"What could possibly happen, if we do this?",
whereas I'm saying:
"This has no benefit, so why risk it?".
I'm just not confident that some odd driver won't choke on this change.
As I'm probably just being too cautious (and your approach does seem
more consistent), I'm sending a new patch following your ideas.
And then Dave has something to choose from ;-)
>>Ideas, anyone?
>
> You mean how we can avoid the double call? Here is one way. Move
> the setting of IF_RUNNING out of dev_get_flags and into dev_activate.
> This would guarantee that IF_RUNNING is set iff the device has a qdisc.
> Assuming that you remove the aformentioned netif_queue_stopped check,
> the device has a qdisc iff the carrier is on. So this preserves the
> meaning of IF_RUNNING.
>
> Now you can avoid the double call by returning early in dev_activate if
> IF_RUNNING is set, and in dev_deactivate if IF_RUNNING is not set.
Implemented in the new patch, thanks.
-Tommy
prev parent reply other threads:[~2005-05-02 23:00 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
2005-05-01 8:11 ` Herbert Xu
2005-05-02 23:00 ` Tommy Christensen [this message]
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=4276B126.6020704@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).