From: "David S. Miller" <davem@davemloft.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: netdev@oss.sgi.com
Subject: Re: netdev ioctl & dev_base_lock : bad idea ?
Date: Wed, 8 Dec 2004 23:13:31 -0800 [thread overview]
Message-ID: <20041208231331.40cd98ad.davem@davemloft.net> (raw)
In-Reply-To: <1102573333.16495.2.camel@gaston>
On Thu, 09 Dec 2004 17:22:13 +1100
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> Right, and I missed the fact that we did indeed take the semaphore and
> not the lock in the _set_ functions which is just fine, we can actually
> schedule.... except in set_multicast...
>
> Is there any reason we actually _need_ to get the xmit lock in this one
> specifically ?
Since we implement NETIF_F_LLTX, the core packet transmit routines do
no locking, the driver does it all.
So if we don't hold the tx lock in the set multicast routine, any other
cpu can come into our hard_start_xmit function and poke at the hardware.
Upon further consideration, it seems that it may be OK to drop that tx
lock right after we do the netif_stop_queue(). But we should regrab
the tx lock when we do the subsequent netif_wake_queue().
next prev parent reply other threads:[~2004-12-09 7:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-26 8:48 netdev ioctl & dev_base_lock : bad idea ? Benjamin Herrenschmidt
2004-12-09 6:06 ` David S. Miller
2004-12-09 6:22 ` Benjamin Herrenschmidt
2004-12-09 7:13 ` David S. Miller [this message]
2004-12-09 22:14 ` Benjamin Herrenschmidt
2004-12-09 23:19 ` David S. 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=20041208231331.40cd98ad.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=benh@kernel.crashing.org \
--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).