Re: [PATCH v2 2/6] can: slcan: remove legacy infrastructure

From: Marc Kleine-Budde
Date: Tue Jul 26 2022 - 07:59:22 EST


On 26.07.2022 12:11:33, Dario Binacchi wrote:
> Hello Marc,
>
> On Mon, Jul 25, 2022 at 2:38 PM Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:
> >
> > On 25.07.2022 08:54:15, Dario Binacchi wrote:
> > > Taking inspiration from the drivers/net/can/can327.c driver and at the
> > > suggestion of its author Max Staudt, I removed legacy stuff like
> > > `SLCAN_MAGIC' and `slcan_devs' resulting in simplification of the code
> > > and its maintainability.
> > >
> > > The use of slcan_devs is derived from a very old kernel, since slip.c
> > > is about 30 years old, so today's kernel allows us to remove it.
> > >
> > > The .hangup() ldisc function, which only called the ldisc .close(), has
> > > been removed since the ldisc layer calls .close() in a good place
> > > anyway.
> > >
> > > The old slcanX name has been dropped in order to use the standard canX
> > > interface naming. It has been assumed that this change does not break
> > > the user space as the slcan driver provides an ioctl to resolve from tty
> > > fd to netdev name.
> >
> > Is there a man page that documents this iotcl? Please add it and/or the
> > IOCTL name.
>
> I have not found documentation of the SIOCGIFNAME ioctl for the line discipline,
> but only for netdev (i. e.
> https://man7.org/linux/man-pages/man7/netdevice.7.html),

Ok - What about:

The old slcanX name has been dropped in order to use the standard canX
interface naming. The ioctl SIOCGIFNAME can be used to query the name of
the created interface. Further There are several ways to get stable
interfaces names in user space, e.g. udev or systemd-networkd.

Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature