[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210727183213.73f34141@thinkpad>
Date: Tue, 27 Jul 2021 18:32:13 +0200
From: Marek BehĂșn <kabel@...nel.org>
To: Michael Walle <michael@...le.cc>
Cc: andrew@...n.ch, anthony.l.nguyen@...el.com, bigeasy@...utronix.de,
davem@...emloft.net, dvorax.fuxbrumer@...ux.intel.com,
f.fainelli@...il.com, hkallweit1@...il.com,
jacek.anaszewski@...il.com, kuba@...nel.org, kurt@...utronix.de,
linux-leds@...r.kernel.org, netdev@...r.kernel.org, pavel@....cz,
sasha.neftin@...el.com, vinicius.gomes@...el.com,
vitaly.lifshits@...el.com
Subject: Re: [PATCH net-next 5/5] igc: Export LEDs
Hi,
On Tue, 27 Jul 2021 17:53:58 +0200
Michael Walle <michael@...le.cc> wrote:
> > If we used the devicename as you are suggesting, then for the two LEDs
> > the devicename part would be the same:
> > ledA -> macA -> ethernet0
> > ledB -> phyB -> ethernet0
> > although they are clearly on different MACs.
>
> Why is that the case? Why can't both the MAC and the PHY request a
> unique name from the same namespace?
So all the network related devices should request a unique network
relate device ID? Should also wireless PHY devices do this? WWAN modems?
And all these should have the same template for devicename part withing
/sys/class/leds? What should be the template for the devicename, if
wireless PHYs and WWAN modems could also be part of this? It cannot be
"ethernet" anymore.
It seems a better idea to me to just some nice identifier for the LED
controller.
> As Andrew pointed out, the names in
> /sys/class/leds don't really matter. Ok, it will still depend on the
> probe order which might not be the case if you split it between ethmac
> and ethphy.
Yes, the LED name does not matter. But the LED subsystem requires names
in a specific format, this is already decided and documented, we are
not going to be changing this. The only reasonable thing we can do now
is to choose a sane devicename.
> Sorry, if I may ask stupid questions here. I don't want to cause much
> trouble, here. I was just wondering why we have to make up two different
> (totally unrelated names to the network interface names) instead of just
> one (again totally unrelated to the interface name and index).
It seems more logical to me from kernel's point of view.
> But I was actually referring to your "you see the leds in /sys/ of all
> the network adapters". That problem still persists, right?
Yes, this still persists. But we really do not want to start
introducing namespaces to the LED subsystem.
Marek
Powered by blists - more mailing lists