All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Staudt <max@enpas.org>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	linux-kernel@vger.kernel.org,
	Jeroen Hofstee <jhofstee@victronenergy.com>,
	michael@amarulasolutions.com,
	Amarula patchwork <linux-amarula@amarulasolutions.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Vincent Mailhol <mailhol.vincent@wanadoo.fr>,
	Wolfgang Grandegger <wg@grandegger.com>,
	linux-can@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [RFC PATCH 2/5] can: slcan: remove legacy infrastructure
Date: Tue, 19 Jul 2022 03:03:26 +0200	[thread overview]
Message-ID: <20220719030326.49f204f6.max@enpas.org> (raw)
In-Reply-To: <1dbd95e8-e6d7-a611-32d0-ea974787ff5a@hartkopp.net>

On Mon, 18 Jul 2022 12:23:05 +0200
Oliver Hartkopp <socketcan@hartkopp.net> wrote:

> IMO it does not break user space when slcan gets the common naming 
> schema for CAN interface names.

For what it's worth, slcan provides a specific ioctl to resolve from
(tty fd) to (netdev name). As far as I can see, any sane program should
use this API to find whatever device it has created, irrespective of
the netdev name.


@ Marc: slcand and slcan_attach in can-utils do not depend on the
slcanX name, as far as I can see. They are the main interfaces to
slcan, and apart from that I can only think of scripts doing netlink
stuff and scanning for slcanX. Does this change your opinion, or is
breaking such scripts already a step too far?

I'm thinking that in other circumstances, I've had cases where devices
were numbered differently just because they enumerated faster or slower
at different boots, or with other kernel versions, or because of media
inserted, etc. - though renumbering is of course one step less than
changing the prefix.


> We had the same thing with 'eth0' which is now named enblablabla or 
> 'wlan0' now named wlp2s0.

Actually, the kernel still calls them ethX and wlanX. It's systemd+udev
that renames them to the "unique" names afterwards. It's an extra step
that happens in userspace.

udev is immensely useful, but also great stuff for race conditions :)



Max

  reply	other threads:[~2022-07-19  1:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-16 17:00 [RFC PATCH 0/5] can: slcan: extend supported features (step 2) Dario Binacchi
2022-07-16 17:00 ` [RFC PATCH 1/5] can: slcan: remove useless header inclusions Dario Binacchi
2022-07-16 17:00 ` [RFC PATCH 2/5] can: slcan: remove legacy infrastructure Dario Binacchi
2022-07-17 21:38   ` Max Staudt
2022-07-18  6:57     ` Oliver Hartkopp
2022-07-18 10:15       ` Marc Kleine-Budde
2022-07-18 10:23         ` Oliver Hartkopp
2022-07-19  1:03           ` Max Staudt [this message]
2022-07-19 19:59             ` Marc Kleine-Budde
2022-07-25  6:40     ` Dario Binacchi
2022-07-25 13:09       ` Max Staudt
2022-07-26 14:59         ` Dario Binacchi
2022-07-16 17:00 ` [RFC PATCH 3/5] can: slcan: change every `slc' occurrence in `slcan' Dario Binacchi
2022-07-16 17:00 ` [RFC PATCH 4/5] can: slcan: use the generic can_change_mtu() Dario Binacchi
2022-07-16 17:00 ` [RFC PATCH 5/5] can: slcan: send the listen-only command to the adapter Dario Binacchi
2022-07-18 10:22   ` Marc Kleine-Budde
2022-07-21  8:17     ` Dario Binacchi
2022-07-17 14:12 ` [RFC PATCH 0/5] can: slcan: extend supported features (step 2) Oliver Hartkopp
2022-07-18  6:59   ` Dario Binacchi
2022-07-18  7:15     ` Oliver Hartkopp

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=20220719030326.49f204f6.max@enpas.org \
    --to=max@enpas.org \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jhofstee@victronenergy.com \
    --cc=jirislaby@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol.vincent@wanadoo.fr \
    --cc=michael@amarulasolutions.com \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=socketcan@hartkopp.net \
    --cc=wg@grandegger.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 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.