From: Matt Domsch <Matt_Domsch@dell.com>
To: Greg KH <greg@kroah.com>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
netdev@vger.kernel.org, linux-hotplug@vger.kernel.org,
Narendra_K@dell.com, jordan_hargrave@dell.com
Subject: Re: PATCH: Network Device Naming mechanism and policy
Date: Sat, 10 Oct 2009 12:47:32 +0000 [thread overview]
Message-ID: <20091010124731.GA17218@mock.linuxdev.us.dell.com> (raw)
In-Reply-To: <20091010052308.GA12458@kroah.com>
On Fri, Oct 09, 2009 at 10:23:08PM -0700, Greg KH wrote:
> On Fri, Oct 09, 2009 at 11:40:57PM -0500, Matt Domsch wrote:
> > The fundamental roadblock to this is that enumeration != naming,
> > except that it is for network devices, and we keep changing the
> > enumeration order.
>
> No, the hardware changes the enumeration order, it places _no_
> guarantees on what order stuff will be found in. So this is not the
> kernel changing, just to be clear.
Over time the kernel has changed its enumeration mechanisms, and
introduced parallelism into the process (which is a good thing),
which, from a user perspective, makes names nondeterministic. Yes,
fixing this up by hard-coding MAC addresses after install has been
the traditional mechanism to address this. I think there's a better
way.
> Again, I have a machine here that likes to reorder PCI devices every 4th
> or so boot times, and that's fine according to the PCI spec. Yeah, it's
> a crappy BIOS, but the manufacturer rightly pointed out that it is not
> in violation of anything.
I haven't encounted this myself, but yes, it's valid but annoying.
> > Today, port naming is completely nondeterministic. If you have but
> > one NIC, there are few chances to get the name wrong (it'll be eth0).
> > If you have >1 NIC, chances increase to get it wrong.
>
> That is why all distros name network devices based on the only
> deterministic thing they have today, the MAC address. I still fail to
> see why you do not like this solution, it is honestly the only way to
> properly name network devices in a sane manner.
>
> All distros also provide a way to easily rename the network devices, to
> place a specific name on a specific MAC address, so again, this should
> all be solved already.
It's not the only way, it introduces state where there's a desire for
a stateless solution, it's useless for getting all the names right at
initial OS install time, and it restricts us to a single "name" for a
given device.
We can get additional information from BIOS. SMBIOS 2.6 (types 9 and
41) has the fields to let us get a "label" for an device at a given
b/d/f. On my PowerEdge R610, I see "Embedded NIC 1" .. "Embedded NIC
4" for the 4 LOMs. These labels have a clear correlation to the
labels on the back of the chassis at these ports. biosdevname can
parse and report this. HP made a similar vendor-specific extension to
SMBIOS for their platforms, which biosdevname also parses. Even if
BIOS decides they need to renumber the busses on every boot, it can
keep this table correct. (insert general mistrust of BIOS authors
rant; that's not the point here.)
biosdevname can be used in udev rules to create multiple names for a
given device. Rules such as:
PROGRAM="/sbin/biosdevname --policy=all_names -i %k", SYMLINK+="net/by-slot-name/%c", OPTIONS+="string_escape=replace"
PROGRAM="/sbin/biosdevname --policy=smbios_names -i %k", SYMLINK+="net/by-chassis-label/%c", OPTIONS+="string_escape=replace"
SMBIOS has its own problems, specifically that it's not hot-plug
aware (it's a static table created during POST). And if a better way
is found (perhaps through the PCI SIG or ACPI), great, biosdevname can
be extended to use it. But, without at least a change in udev or the
kernel, it doesn't do any good.
> No matter how badly your BIOS teams mess up the PCI enumeration
> order :)
In my case, the BIOS for a given system always configures the ports
the same way, and assigns b/d/f the same way. With no change in the
BIOS or hardware, I still see the ports enumerated differently on each
boot. :-(
--
Matt Domsch
Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux
next prev parent reply other threads:[~2009-10-10 12:47 UTC|newest]
Thread overview: 121+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <EDA0A4495861324DA2618B4C45DCB3EE5894ED@blrx3m08.blr.amer.dell.com>
2009-10-09 14:00 ` PATCH: Network Device Naming mechanism and policy Narendra K
2009-10-09 14:51 ` Matt Domsch
2009-10-09 16:23 ` Bryan Kadzban
2009-10-09 16:56 ` Marco d'Itri
2009-10-12 10:41 ` Scott James Remnant
2009-10-12 11:31 ` Ben Hutchings
2009-10-12 17:37 ` Bill Nottingham
2009-10-13 18:06 ` Dan Williams
2009-10-13 18:53 ` Ben Hutchings
2009-10-13 19:53 ` John W. Linville
2009-10-09 16:36 ` Greg KH
2009-10-09 17:17 ` Matt Domsch
2009-10-09 17:22 ` Greg KH
2009-10-09 21:09 ` Matt Domsch
2009-10-10 2:44 ` Stephen Hemminger
2009-10-10 4:40 ` Matt Domsch
2009-10-10 5:23 ` Greg KH
2009-10-10 8:29 ` Sujit K M
2009-10-10 16:27 ` Greg KH
2009-10-10 19:00 ` Ben Hutchings
2009-10-10 21:10 ` Greg KH
2009-10-10 12:47 ` Matt Domsch [this message]
2009-10-10 16:25 ` Greg KH
2009-10-10 17:34 ` Bryan Kadzban
2009-10-10 21:13 ` Greg KH
2009-10-12 6:21 ` Bryan Kadzban
2009-10-12 16:19 ` Bryan Kadzban
2009-10-11 16:40 ` David Zeuthen
2009-10-11 18:47 ` Greg KH
2009-10-10 18:11 ` Bill Fink
2009-10-10 18:35 ` Kay Sievers
2009-10-11 21:10 ` Rob Townley
2009-10-11 23:04 ` Matt Domsch
2009-10-12 3:00 ` Greg KH
2009-10-12 18:35 ` Rob Townley
2009-10-12 18:44 ` Matt Domsch
2009-10-12 17:45 ` Bill Nottingham
2009-10-12 17:55 ` Greg KH
2009-10-12 18:07 ` Bill Nottingham
2009-10-12 18:15 ` Greg KH
2009-10-10 18:32 ` Stephen Hemminger
2009-10-10 21:06 ` Greg KH
2009-10-13 18:02 ` Dan Williams
2009-10-13 18:56 ` Narendra_K
2009-10-12 7:30 ` Kurt Van Dijck
2009-10-11 0:37 ` Marco d'Itri
2009-10-13 15:08 ` dann frazier
2009-10-13 17:25 ` Narendra_K
2009-10-13 17:36 ` dann frazier
2009-10-16 0:32 ` dann frazier
2009-10-16 14:14 ` Narendra_K
2009-10-16 15:20 ` dann frazier
2009-10-16 15:33 ` Ben Hutchings
2009-10-16 15:41 ` dann frazier
2009-10-16 21:40 ` dann frazier
2009-10-19 11:42 ` Narendra_K
2009-10-19 16:14 ` Bryan Kadzban
2009-11-04 14:35 ` Narendra_K
2009-11-06 8:49 ` Marco d'Itri
2009-11-06 22:06 ` Matt Domsch
2009-11-06 22:35 ` Marco d'Itri
2009-11-06 23:17 ` dann frazier
2009-11-09 14:53 ` Narendra_K
2009-11-10 17:23 ` Stephen Hemminger
2009-11-11 6:43 ` Narendra_K
2009-11-06 22:05 ` Domsch, Matt
2009-10-22 6:36 ` [PATCH] udev: create empty regular files to represent net dann frazier
2009-10-27 20:55 ` [PATCH] udev: create empty regular files to represent net interfaces Matt Domsch
2009-10-28 8:23 ` [PATCH] udev: create empty regular files to represent net Kay Sievers
2009-10-28 13:03 ` [PATCH] udev: create empty regular files to represent net interfaces Matt Domsch
2009-10-28 15:09 ` [PATCH] udev: create empty regular files to represent net dann frazier
2009-10-28 16:09 ` [PATCH] udev: create empty regular files to represent net interfaces Jordan_Hargrave
2009-10-28 16:09 ` Jordan_Hargrave
2009-10-28 16:11 ` [PATCH] udev: create empty regular files to represent net Greg KH
2009-10-28 13:06 ` Ben Hutchings
2009-10-28 19:27 ` [PATCH] udev: create empty regular files to represent net interfaces Narendra_K
2009-10-29 13:11 ` Matt Domsch
2009-10-29 14:25 ` [PATCH] udev: create empty regular files to represent net Greg KH
2009-10-29 16:49 ` Ben Hutchings
2009-10-29 16:55 ` Greg KH
2009-10-29 17:12 ` Ben Hutchings
2009-10-29 17:20 ` Greg KH
2009-10-29 16:56 ` [PATCH] udev: create empty regular files to represent net interfaces Narendra_K
2009-10-29 16:52 ` [PATCH] udev: create empty regular files to represent net Greg KH
2009-10-29 17:34 ` [PATCH] udev: create empty regular files to represent netinterfaces Narendra_K
2009-10-29 17:50 ` [PATCH] udev: create empty regular files to represent dann frazier
2009-10-29 17:46 ` [PATCH] udev: create empty regular files to represent net dann frazier
2009-10-30 3:30 ` Marco d'Itri
2009-10-30 5:38 ` dann frazier
2009-10-30 6:22 ` Marco d'Itri
2009-10-30 15:00 ` dann frazier
2009-10-30 15:25 ` [PATCH] udev: create empty regular files to represent net interfaces Narendra_K
2009-10-30 16:08 ` [PATCH] udev: create empty regular files to represent net dann frazier
2009-10-30 16:54 ` [PATCH] udev: create empty regular files to represent netinterfaces Narendra_K
2009-10-30 17:05 ` [PATCH] udev: create empty regular files to represent dann frazier
2009-10-30 17:10 ` [PATCH] udev: create empty regular files to represent net interfaces Matt Domsch
2009-10-30 17:13 ` [PATCH] udev: create empty regular files to represent net Greg KH
2009-10-30 7:45 ` [PATCH] udev: create empty regular files to represent net interfaces Hannes Reinecke
2009-10-30 16:22 ` Bryan Kadzban
2009-10-30 16:34 ` [PATCH] udev: create empty regular files to represent net Stephen Hemminger
2009-10-13 19:51 ` PATCH: Network Device Naming mechanism and policy Greg KH
2009-10-13 20:00 ` Jordan_Hargrave
2009-10-13 20:19 ` Greg KH
2009-10-13 22:05 ` Matt Domsch
2009-10-13 22:08 ` dann frazier
[not found] <EDA0A4495861324DA2618B4C45DCB3EE58964E@blrx3m08.blr.amer.dell.com>
2009-10-28 13:06 ` Narendra K
[not found] <EDA0A4495861324DA2618B4C45DCB3EE589541@blrx3m08.blr.amer.dell.com>
2009-10-12 18:47 ` Narendra K
2009-10-12 19:09 ` Greg KH
2009-10-12 19:41 ` Karl O. Pinc
2009-10-13 18:17 ` Dan Williams
2009-10-13 18:56 ` Ben Hutchings
2009-10-12 19:48 ` Matt Domsch
[not found] <EDA0A4495861324DA2618B4C45DCB3EE58953F@blrx3m08.blr.amer.dell.com>
2009-10-12 18:07 ` Narendra K
[not found] <EDA0A4495861324DA2618B4C45DCB3EE5894F6@blrx3m08.blr.amer.dell.com>
2009-10-09 16:04 ` Narendra K
2009-10-09 16:12 ` Stephen Hemminger
2009-10-09 16:25 ` Matt Domsch
[not found] <5DDAB7BA7BDB58439DD0EED0B8E9A3AE011CD92D@ausx3mpc102.aus.amer.dell.com>
2009-08-19 18:56 ` Jordan_Hargrave
2009-08-19 19:26 ` Ben Hutchings
2009-08-19 19:40 ` Jordan_Hargrave
2009-08-20 4:41 ` Bryan Kadzban
2009-10-12 17:54 ` Marco d'Itri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091010124731.GA17218@mock.linuxdev.us.dell.com \
--to=matt_domsch@dell.com \
--cc=Narendra_K@dell.com \
--cc=greg@kroah.com \
--cc=jordan_hargrave@dell.com \
--cc=linux-hotplug@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).