Re: Network Device Naming mechanism and policy

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Scott James Remnant
Date: Tuesday, March 24, 2009 - 10:02 am

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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Network Device Naming mechanism and policy, Matt Domsch, (Tue Mar 24, 8:46 am)
Re: Network Device Naming mechanism and policy, Patrick McHardy, (Tue Mar 24, 9:21 am)
Re: Network Device Naming mechanism and policy, Kay Sievers, (Tue Mar 24, 9:28 am)
Re: Network Device Naming mechanism and policy, Patrick McHardy, (Tue Mar 24, 9:38 am)
Re: Network Device Naming mechanism and policy, Dan Williams, (Tue Mar 24, 9:40 am)
Re: Network Device Naming mechanism and policy, Karl O. Pinc, (Tue Mar 24, 9:42 am)
Re: Network Device Naming mechanism and policy, Alan Cox, (Tue Mar 24, 10:00 am)
Re: Network Device Naming mechanism and policy, Scott James Remnant, (Tue Mar 24, 10:02 am)
Re: Network Device Naming mechanism and policy, Patrick McHardy, (Tue Mar 24, 10:04 am)
Re: Network Device Naming mechanism and policy, Matt Domsch, (Tue Mar 24, 10:45 am)
Re: Network Device Naming mechanism and policy, Matt Domsch, (Tue Mar 24, 10:52 am)
Re: Network Device Naming mechanism and policy, Bill Nottingham, (Tue Mar 24, 11:12 am)
Re: Network Device Naming mechanism and policy, Scott James Remnant, (Tue Mar 24, 11:20 am)
Re: Network Device Naming mechanism and policy, david, (Tue Mar 24, 11:49 am)
Re: Network Device Naming mechanism and policy, david, (Tue Mar 24, 11:51 am)
Re: Network Device Naming mechanism and policy, Matt Domsch, (Tue Mar 24, 12:22 pm)
Re: Network Device Naming mechanism and policy, Alan Cox, (Tue Mar 24, 2:02 pm)
Re: Network Device Naming mechanism and policy, David Miller, (Tue Mar 24, 3:57 pm)
Re: Network Device Naming mechanism and policy, Greg KH, (Tue Mar 24, 4:14 pm)
Re: Network Device Naming mechanism and policy, Chris Friesen, (Wed Mar 25, 1:22 pm)
Re: Network Device Naming mechanism and policy, Matt Domsch, (Thu Mar 26, 9:39 am)
Re: Network Device Naming mechanism and policy, Dan Williams, (Thu Mar 26, 1:16 pm)
Re: Network Device Naming mechanism and policy, Dan Williams, (Thu Mar 26, 1:17 pm)
Re: Network Device Naming mechanism and policy, Len Brown, (Fri Mar 27, 9:06 am)
Re: Network Device Naming mechanism and policy, Kurt Van Dijck, (Tue Mar 31, 7:07 am)
Re: Network Device Naming mechanism and policy, Matt Domsch, (Thu Apr 9, 7:58 am)