On Tue, 2009-03-24 at 10:46 -0500, Matt Domsch wrote:
Also bear in mind that a module completing init() does not necessarily
mean that the interfaces have been created. If the driver requires
firmware, it will call out to userspace, and may not register the
interface until well afterwards.
One could even construct a pathological case where only a virtual device
was registered, and userspace was required to add logical interfaces
(most likely in a udev rule).
Well, the obvious fix to this is to make sure the names are always
correct :)
Actually udev handles this by using a temporary name. When renaming
eth0->eth1 it actually uses an intermediate name first. This allows it
to simultaneously swap eth0<->eth1 since one unblocks the other
(actually both unblock each other).
There is a failure case where two devices both end up trying to get the
same name, in which case one will lock with a "_rename" name. There was
an early debate in Ubuntu when we first wrote this code about using
later names (eth2, eth3, etc.) but we realised that just hides the
problem (and it happens again if you plug in a pccard or something that
wants eth2).
Since this is always a bug, making the problem visible was a "good
thing".
While this works for PCI slots, it already doesn't scale to other buses.
For example what slot number is the pccard slot? If you have two
different pccard devices, would they get assigned the same name (udev
currently assigns them different names).
Now consider USB. Would the device name change depending on which USB
port you plugged it into? Or is USB just a single slot, in which case
what happens when you have two USB ethernet devices?
The Apple USB Ethernet device in my iPhone is not the USB Wireless
adapter I own, both have very different networking configurations.
it's not ideal in the laptop world. Consider a user with two different=20
I quite liked the idea of /dev/eth0, then we could just use symlinks.
Scott
--=20
Scott James Remnant
scott@ubuntu.com