From: "Marek Behún" <kabel@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Andrew Lunn <andrew@lunn.ch>, Pavel Machek <pavel@ucw.cz>,
"linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
netdev@vger.kernel.org,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
linux-kernel@vger.kernel.org
Subject: are device names part of sysfs ABI? (was Re: devicename part of LEDs under ethernet MAC / PHY)
Date: Sun, 3 Oct 2021 22:53:38 +0200 [thread overview]
Message-ID: <20211003225338.76092ec3@thinkpad> (raw)
In-Reply-To: <20211001144053.3952474a@thinkpad>
Hello Greg,
could you give your opinion on this discussion?
Are device names (as returned by dev_name() function) also part of
sysfs ABI? Should these names be stable across reboots / kernel
upgrades?
Marek
On Fri, 1 Oct 2021 14:40:53 +0200
Marek Behún <kabel@kernel.org> wrote:
> On Fri, 1 Oct 2021 14:29:17 +0200
> Andrew Lunn <andrew@lunn.ch> wrote:
>
> > > - Andrew proposed that the numbering should start at non-zero number,
> > > for example at 42, to prevent people from thinking that the numbers
> > > are related to numbers in network interface names (ethN).
> > > A system with interfaces
> > > eth0
> > > eth1
> > > and LEDs
> > > ethphy0:green:link
> > > ethphy1:green:link
> > > may make user think that the ethphy0 LED does correspond to eth0
> > > interface, which is not necessarily true.
> > > Instead if LEDs are
> > > ethphy42:green:link
> > > ethphy43:green:link
> > > the probability of confusing the user into relating them to network
> > > interfaces by these numbers is lower.
> > >
> > > Anyway, the issue with these naming is that it is not stable. Upgrading
> > > the kernel, enabling drivers and so on can change these names between
> > > reboots.
> >
> > Sure, eth0 can become eth1, eth1 can become eth0. That is why we have
> > udev rules, systemd interface names etc. Interface names have never
> > been guaranteed to be stable. Also, you can have multiple interfaces
> > named eth0, so long as they are in different network name spaces.
> >
> > > Also for LEDs on USB ethernet adapters, removing the USB and
> > > plugging it again would change the name, although the device path does
> > > not change if the adapter is re-plugged into the same port.
> > >
> > > To finally settle this then, I would like to ask your opinion on
> > > whether this naming of LEDs should be stable.
> >
> > No. They should be unstable like everything else.
>
> LED classdev names are something different.
> For etherent interfaces, the interface name is different from name of
> the underlying struct device. But LED classdev names are also
> corresponding struct device names, and thus part of sysfs ABI, which,
> as far as I understand, should be stable.
next prev parent reply other threads:[~2021-10-03 20:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 11:30 devicename part of LEDs under ethernet MAC / PHY Marek Behún
2021-10-01 12:29 ` Andrew Lunn
2021-10-01 12:40 ` Marek Behún
2021-10-03 20:53 ` Marek Behún [this message]
2021-10-04 6:37 ` are device names part of sysfs ABI? (was Re: devicename part of LEDs under ethernet MAC / PHY) Greg Kroah-Hartman
2021-10-04 7:04 ` Marek Behún
2021-10-04 7:10 ` Greg Kroah-Hartman
2021-10-04 7:25 ` Marek Behún
2021-10-04 7:38 ` Pavel Machek
2021-10-04 8:30 ` Greg Kroah-Hartman
2021-10-04 12:14 ` Andrew Lunn
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=20211003225338.76092ec3@thinkpad \
--to=kabel@kernel.org \
--cc=andrew@lunn.ch \
--cc=gregkh@linuxfoundation.org \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pavel@ucw.cz \
/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).