Re: [PATCH] net: usbnet: allow overriding of default USB interface naming

Oliver Neukum
2021-06-14T12:40:48Z

Am Montag, den 14.06.2021, 10:32 +0100 schrieb Jonathan Davies:
> On 11/06/2021 18:16, Andrew Lunn wrote:
> > On Fri, Jun 11, 2021 at 03:23:39PM +0000, Jonathan Davies wrote:

Hi,

> > > Hence it is useful to be able to override the default name. A new
> > > usbnet
> > > module parameter allows this to be configured.

1. This issue exists with all hotpluggable interfaces
2. It exists for all USB devices so it does not belong in usbnet,
leaving out drivers like kaweth.

> > >
> > Module parameter are not liked in the network stack.
>
> Thanks, I wasn't aware. Please help me understand: is that in an
> effort
> to avoid configurability altogether, or because there's some
> preferred
> mechanism for performing configuration?

Configurability belongs into user space if possible.
>
> > It actually seems like a udev problem, and you need to solve it
> > there. It is also not specific to USB. Any sort of interface can
> > pop
> > up at an time, especially with parallel probing of busses.
>
> Yes, this is also applicable to the naming done for all ethernet
> devices. But I've seen the problem multiple times for USB NICs, which
> is
> why I proposed a fix here first.

Because USb devices are common. Your observations are determined
by ubiquity, not intrinsic factors.

> > So you need
> > udev to detect there has been a race condition and try again with
> > the
> > rename.
>

Yes, now, it may be that we do not export the information udev
would need to or you want new kinds of rules. But I see no evidence
of that.

Regards
Oliver