Gentoo Archives: gentoo-user

From: Laurence Perkins <lperkins@×××××××.net>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: RE: [gentoo-user] Switching from eudev to udev, disaster.
Date: Tue, 30 Nov 2021 20:56:31
Message-Id: MW2PR07MB40584F0728A4B9D45C52E480D2679@MW2PR07MB4058.namprd07.prod.outlook.com
In Reply to: Re: [gentoo-user] Switching from eudev to udev, disaster. by Grant Taylor
1 So the old inconsistency was a super-bad kind of inconsistency. The interfaces got named based on the order in which the devices were discovered. Which, on a lot of systems, meant that every boot was essentially rolling the dice on a race condition. If you only have one device, you're fine. If your devices consistently come up in the same order, you're fine. If there's jitter though then things can easily get messy, and do so unexpectedly.
2
3 The new naming scheme names devices based on where they show up on the bus. This has its own issues. It means that USB adapters get different names when plugged into different slots. It means that adding or removing other PCI bus devices can change the bus address and therefore the name of your network interfaces. I've seen motherboard firmware updates do the same. But, at least in theory, this inconsistency should be triggered by something you *know* about unless hardware is getting added and removed by someone else without your knowledge.
4
5 If you only have one interface though and tweak your hardware regularly then you'll probably be happier to put it back to the old naming scheme because with only one device it should always be eth0.
6
7 LMP
8
9 -----Original Message-----
10 From: Grant Taylor <gtaylor@×××××××××××××××××××××.net>
11 Sent: Tuesday, November 30, 2021 12:34 PM
12 To: gentoo-user@l.g.o
13 Subject: Re: [gentoo-user] Switching from eudev to udev, disaster.
14
15 On 11/30/21 12:58 PM, Dale wrote:
16 > What I noticed in dmesg is that it takes the old name, eth0 for
17 > example, and then renames it to the new name.
18
19 I don't know if it's the /kernel/ that does the renaming, or not based on the kernel parameter, or if it's something else very early in the boot that does the renaming.
20
21 > Well, if one moves things around and eth0 becomes eth3 then doesn't
22 > that mess up the new name as well?
23
24 My understanding is that the new name is -- supposed to be -- based off of some property of the device. I assume that said property is from something akin to where lspci gets it's data. Probably something exposed in /proc and / or /sys via the actual driver that ultimately gets feed into the renaming routine.
25
26 > That could be why you see the results you have.> It's hard to base a
27 > name on something that is changing itself.
28
29 My understanding is that the new name is supposed to be completely independent from and not derived using the old name. So the old naming should have no influence on the new name.
30
31 > It would seem to me that if they were going to change things for real,
32 > they would change what the kernel names it in the beginning and it
33 > uses the name it was first given based on slot or something else unique.
34
35 Agreed. As in have the driver instantiate the device with the new name from the outset.
36
37 > In other words, have the kernel assign it enp2s3 or whatever when
38 > booting and that is the only name it gets.
39
40 Yep.
41
42 I don't know /why/ or /where/ the failure is with the new names. I just know that I have seen instability in them. Seeing as how stability ~> predictability is the motivation for the rename, well, that's a failure in my opinion.
43
44 Besides, it's a LOT easier to /just/ `tcpdump -nni eth0` when logging into a machine than it is to have to figure out the interface name first.
45
46 That being said, I was okay with what CentOS 6.x did, where the new name was matched against the MAC address. I had eth0 based on MAC for outside and eth1 based on MAC for inside on a number of systems.
47
48
49
50 --
51 Grant. . . .
52 unix || die

Replies

Subject Author
Re: [gentoo-user] Switching from eudev to udev, disaster. Rich Freeman <rich0@g.o>
Re: [gentoo-user] Switching from eudev to udev, disaster. Grant Taylor <gtaylor@×××××××××××××××××××××.net>