netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Domsch, Matt" <Matt_Domsch@Dell.com>
To: "K, Narendra" <Narendra_K@Dell.com>
Cc: Bryan Kadzban <bryan@kadzban.is-a-geek.net>,
	dannf@hp.com, bhutchings@solarflare.com, netdev@vger.kernel.org,
	linux-hotplug@vger.kernel.org, "Hargrave,
	Jordan" <Jordan_Hargrave@Dell.com>,
	"Rose, Charles" <Charles_Rose@Dell.com>,
	"Shandilya, Sandeep K" <Sandeep_K_Shandilya@Dell.com>
Subject: Re: PATCH: Network Device Naming mechanism and policy
Date: Fri, 6 Nov 2009 16:05:09 -0600	[thread overview]
Message-ID: <20091106220509.GA15533@mock.linuxdev.us.dell.com> (raw)
In-Reply-To: <EDA0A4495861324DA2618B4C45DCB3EE5896D2@blrx3m08.blr.amer.dell.com>

On Wed, Nov 04, 2009 at 08:23:38AM -0600, K, Narendra wrote:
> Similarly, export an attribute named "smbios_name" to sysfs, i.e
> "/sys/class/net/eth0/smbios_name". "Cat /sys/class/net/eth0/smbios_name"
> would show "Embedded_NIC_1[23..]" and this can be used by udev in
> 70-persistent-net.rules as 
> 
> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
> ATTR{smbios_name}=="Embedded_NIC_1", ATTR{type}=="1", KERNEL=="eth*",
> NAME="eth0".
> 
> I suppose this would not need any changes to the udev code and existing
> udev infrastructure can be used as udev is capable handling
> ATTR{something}.
> 
> This would also ensure that whichever device is "Embedded_NIC_1" as per
> the BIOS, will also be "eth0" in the os.

We can grab the smbios_name value using biosdevname in a PROGRAM= part
of the udev rule.  But it doesn't actually solve the problem.  We
haven't changed the network device naming scheme from "eth%d" to
something else.  Therefore, by having rules which simply try to
re-order names within that scheme, when they're being enumerated in
parallel and racing, we get collisions.  Take for example, this which
tries to rename the 4 onboard NICs in a particular order, in the
absence of any other rules:

PROGRAM="/sbin/biosdevname --policy=smbios_names -i %k", RESULT=="Embedded NIC 1", NAME="eth0"
PROGRAM="/sbin/biosdevname --policy=smbios_names -i %k", RESULT=="Embedded NIC 2", NAME="eth1"
PROGRAM="/sbin/biosdevname --policy=smbios_names -i %k", RESULT=="Embedded NIC 3", NAME="eth2"
PROGRAM="/sbin/biosdevname --policy=smbios_names -i %k", RESULT=="Embedded NIC 4", NAME="eth3"

I wind up with instead this in ifconfig -a:

eth0        00:1B:21:42:66:30  
eth1        00:1B:21:42:66:31  
eth2        00:22:19:59:8E:5A  
eth2_rename 00:22:19:59:8E:56  
eth3        00:22:19:59:8E:5C  
eth3_rename 00:22:19:59:8E:58  

When what I would have expected would have been:

eth0 00:22:19:59:8E:56
eth1 00:22:19:59:8E:58
eth2 00:22:19:59:8E:5A
eth3 00:22:19:59:8E:5C
eth4 00:1B:21:42:66:30  
eth5 00:1B:21:42:66:31  


I can't use eth%d as the scheme - that's the kernel's scheme.  I have
to switch the scheme to something else.


-- 
Matt Domsch
Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux

  parent reply	other threads:[~2009-11-06 22:05 UTC|newest]

Thread overview: 120+ 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:17           ` 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
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:53               ` 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:13     ` Narendra_K
2009-10-13 17:36       ` dann frazier
2009-10-16  0:32         ` dann frazier
2009-10-16 14:02           ` 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:30                   ` Narendra_K
2009-10-19 16:14                     ` Bryan Kadzban
2009-11-04 14:23                       ` 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:41                               ` Narendra_K
2009-11-10 17:23                                 ` Stephen Hemminger
2009-11-11  6:31                                   ` Narendra_K
2009-11-06 22:05                         ` Domsch, Matt [this message]
2009-10-22  6:36                   ` [PATCH] udev: create empty regular files to represent net interfaces dann frazier
2009-10-27 20:55                     ` Matt Domsch
2009-10-28  8:23                       ` Kay Sievers
2009-10-28 13:03                         ` Matt Domsch
2009-10-28 15:09                           ` dann frazier
2009-10-28 16:09                             ` Jordan_Hargrave
2009-10-28 16:09                             ` Jordan_Hargrave
2009-10-28 16:11                               ` Greg KH
2009-10-28 13:06                         ` Ben Hutchings
2009-10-28 19:15                         ` Narendra_K
2009-10-29 13:11                         ` Matt Domsch
2009-10-29 14:25                           ` Greg KH
2009-10-29 16:44                             ` Narendra_K
2009-10-29 16:52                               ` Greg KH
2009-10-29 17:22                                 ` [PATCH] udev: create empty regular files to represent netinterfaces Narendra_K
2009-10-29 17:50                                   ` dann frazier
2009-10-29 16:49                             ` [PATCH] udev: create empty regular files to represent net interfaces 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 17:46                             ` 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:13                               ` Narendra_K
2009-10-30 16:08                                 ` dann frazier
2009-10-30 16:53                                   ` [PATCH] udev: create empty regular files to represent netinterfaces Narendra_K
2009-10-30 17:05                                     ` dann frazier
2009-10-30 17:10                                   ` [PATCH] udev: create empty regular files to represent net interfaces Matt Domsch
2009-10-30 17:13                                     ` Greg KH
2009-10-30  7:45                         ` Hannes Reinecke
2009-10-30 16:22                           ` Bryan Kadzban
2009-10-30 16:34                             ` 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

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=20091106220509.GA15533@mock.linuxdev.us.dell.com \
    --to=matt_domsch@dell.com \
    --cc=Charles_Rose@Dell.com \
    --cc=Jordan_Hargrave@Dell.com \
    --cc=Narendra_K@Dell.com \
    --cc=Sandeep_K_Shandilya@Dell.com \
    --cc=bhutchings@solarflare.com \
    --cc=bryan@kadzban.is-a-geek.net \
    --cc=dannf@hp.com \
    --cc=linux-hotplug@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).