From: Ben Hutchings <bhutchings@solarflare.com>
To: Matt Domsch <Matt_Domsch@dell.com>
Cc: linux-hotplug@vger.kernel.org, netdev@vger.kernel.org,
narendra_k@dell.com, jcm@redhat.com, notting@redhat.com
Subject: Re: extended netdevice naming proposal
Date: Thu, 18 Nov 2010 00:39:55 +0000 [thread overview]
Message-ID: <1290040795.30433.101.camel@localhost> (raw)
In-Reply-To: <20101117220659.GA12177@auslistsprd01.us.dell.com>
On Wed, 2010-11-17 at 16:06 -0600, Matt Domsch wrote:
> While this _is_ the original bikeshedding problem, as long as I'm
> going to use biosdevname to change names for embedded NICs, perhaps I
> can be so bold as to change them for USB add-in cards too?
>
> There are quite a few dimensions to the problem:
> * device location (onboard, PCI, other bus)
> * multiple ports on a single add-in card
> * with Network Partitioning (NPAR) and SR-IOV, the OS sees multiple
> network interfaces (physical or virtual interfaces) but a single external port
> * the suffix .1234 currently used for vlans (ala vconfig)
> * A single PCI device may drive multiple external ports
>
> As such, here is a naming proposal, aimed to keep within 15
> characters for most configurations.
>
> (location)(slot)#(port)/(instance).(vlan)
>
> location := NIC on Motherboard = net1, net2, net3, net4
"net", really?! I can't say I care that much, but this just doesn't
seem like a helpful prefix.
> (note: people hated the TLA collision with 'lom', so avoiding that here).
> := PCI slot = pci1, pci2, pci3, pci4
> these correspond to chassis labels, information is available in
> $PIRQ, SMBIOS or ACPI, which biosdevname retrieves and uses.
>
> For single- or multi-port cards in PCI slots, append #(port):
> pci1#1, pci1#2, pci1#3, pci1#4 for 4 ports on a card in PCI slot 1
'#' might be problematic but I don't have any concrete evidence of that.
> There is currently no way to get this port info from BIOS. Several people
> have suggested using adding a PCI capabilities field to expose this
> info in a standard way, but that's a ways off. Until then, biosdevname
> can guess (assume ascending MAC order on the single card).
You could try using the dev_id attribute first; it's supposed to be a
0-based index of a net device on a board. It won't be unique in all
cases, e.g. if a NIC vendor has used a bridge chip to connect multiple
controllers on a single board or if the driver just doesn't set it. So
you would need to fall back to MAC order in tha tcase.
> For NPAR/SR-IOV where the physical port is shared by several
> instances, append /(instance):
> net1/1, net1/2 pci1#1/1, pci1#1/2,
> pci1#1/2, pci1#1/3, ...
[...]
Surely VFs are normally passed through to a guest, in which case:
1. The host/console/dom0 won't create a net device for them.
2. The guest won't (and shouldn't) have such information about the
physical location of the PCI function.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2010-11-18 0:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-17 22:06 extended netdevice naming proposal Matt Domsch
2010-11-18 0:39 ` Ben Hutchings [this message]
2010-11-18 2:10 ` Bill Nottingham
2010-11-18 2:29 ` Ben Hutchings
2010-11-18 18:51 ` Matt Domsch
2010-11-18 19:00 ` Ben Hutchings
2010-11-18 18:34 ` Rick Jones
2010-11-18 18:52 ` Matt Domsch
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=1290040795.30433.101.camel@localhost \
--to=bhutchings@solarflare.com \
--cc=Matt_Domsch@dell.com \
--cc=jcm@redhat.com \
--cc=linux-hotplug@vger.kernel.org \
--cc=narendra_k@dell.com \
--cc=netdev@vger.kernel.org \
--cc=notting@redhat.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).