All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: "Michał Mirosław" <mirqus@gmail.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: ethtool physical identify vs netlink locking?
Date: Tue, 29 Mar 2011 23:29:27 -0700	[thread overview]
Message-ID: <20110329232927.56fb07d6@s6510> (raw)
In-Reply-To: <AANLkTi=um5CecqdXeqBNKHv4nWk7-bZ27aL5=bXFi0SE@mail.gmail.com>

On Wed, 30 Mar 2011 03:35:40 +0200
Michał Mirosław <mirqus@gmail.com> wrote:

> 2011/3/30 Ben Hutchings <bhutchings@solarflare.com>:
> > On Tue, 2011-03-29 at 13:52 -0700, Stephen Hemminger wrote:
> >> Right now if an administrator uses the ethtool function to identify network
> >> interface, the netlink lock can be held indefinitely. In other words, doing
> >> "ethtool -p eth1" will stop all other netlink activity. This is bad, imagine
> >> the case of an operator doing that to find a NIC in a rack, and because of
> >> the netlink lockout all routing daemon activity stops.
> [...]
> >> There are several possible solutions but most involve fixing all the device
> >> drivers (24). Options:
> >>
> >> 1. Have device driver drop and reacquire rtnl() while blinking
> >> 2. Have ethtool core drop rtnl before calling device driver
> >> 3. Add per-device ethtool rtnl lock
> > 4. Define a ethtool operation 'set_id_state' with an argument that sets
> > identification on/off/inactive/active (the last optional, for any driver
> > that really wants to do this differently).  When this is defined, the
> > ethtool core runs the loop and acquires the lock each time it calls this
> > operation.
> 
> 5. Have a driver register a LED class device instead of implementing
> an ethtool op.
> 
> Hmm. This would require changes to userspace ethtool command. I wonder
> if anything else uses this call?

Full LED support is overkill for this I think. Especially if it means creating
24 unique LED drivers.

Ben's idea seams the best so far. 

      reply	other threads:[~2011-03-30  6:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29 20:52 ethtool physical identify vs netlink locking? Stephen Hemminger
2011-03-30  0:07 ` Ben Hutchings
2011-03-30  0:13   ` David Miller
2011-03-30  0:23   ` Stephen Hemminger
2011-03-30  1:35   ` Michał Mirosław
2011-03-30  6:29     ` Stephen Hemminger [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=20110329232927.56fb07d6@s6510 \
    --to=shemminger@vyatta.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=mirqus@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.