:: Re: [DNG] if2mac init.d service for…
Página Principal
Delete this message
Reply to this message
Autor: Antony Stone
Data:  
Para: dng
Assunto: Re: [DNG] if2mac init.d service for persistent network interface names
On Wednesday 23 December 2020 at 23:41:58, Didier Kryn wrote:

> Le 23/12/2020 à 22:03, Antony Stone a écrit :
> > If the kernel decides A=eth1, B=eth2, C=eth0 then there's no way for udev
> > rules to rename them, because "File exists" (which should of course say
> > "Device name exists").
>
>     This should not happen and did not happen in the past because the
> interfaces are created sequentially. Therefore, if you want to rename
> the first one, no name other than eth0 exists yet; and you can figure
> out that something similar happen to the next: the kernel does not name
> it by the name you have assigned to the first one, etc.


No; the problem is that the kernel names all of the interfaces before udev
gets to do whatever it wants to, therefore by the time my rules saying which
interface I want as eth0, which as eth1 and which as eth2 are able to run, all
those names exist, but on the wrong (according to me) devices.

>     What may have changed is Eudev managed to not work sequentially. If
> it followed the order in which the interfaces show up out of the
> Netlink, there would be no problem. Therefore I suspect the authors
> managed to launch several threads in order to save 0.01s of the boot
> time. Or to loose more because thread scheduling might well consume more
> than what parallelism saves.


I have no opinion on that.

>     Or maybe the kernel is much faster than Eudev and it has the time to
> create the interfaces faster than Eudev processes them.


That sounds likely.

>     But for sure the mechanism worked in the past.


I completely agree.

As I said in my opening posting on the "Ethernet names revisited" thread:

| I'm trying to work out how to give those interfaces the names I want; the
| motherboard as eth0, and the PCI card as eth1 / eth2.

|
| Historically, I've been used to udev and /etc/udev/rules.d/70-persistent-
| net.rules doing this, where I can specify the name I want for each interface
| according to its MAC address.


By "historically" I meant "up to Jessie, and I think also Stretch / Ascii".
It's not doing the same in Buster / Beowulf.


Antony.

--
I still maintain the point that designing a monolithic kernel in 1991 is a
fundamental error. Be thankful you are not my student. You would not get a
high grade for such a design :-)
- Andrew Tanenbaum to Linus Torvalds

                                                   Please reply to the list;
                                                         please *don't* CC me.