netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Domsch <Matt_Domsch@dell.com>
To: David Miller <davem@davemloft.net>
Cc: kaber@trash.net, jengelh@medozas.de, dwmw2@infradead.org,
	jchapman@katalix.com, jonathan@jonmasters.org, tgraf@suug.ch,
	rick.jones2@hp.com, auke-jan.h.kok@intel.com,
	johnathan@jonmasters.org, netdev@vger.kernel.org
Subject: Re: network interface *name* alias support?
Date: Tue, 27 May 2008 14:03:52 -0500	[thread overview]
Message-ID: <20080527190352.GE25696@auslistsprd01.us.dell.com> (raw)
In-Reply-To: <20080525.051713.124717485.davem@davemloft.net>

On Sun, May 25, 2008 at 05:17:13AM -0700, David Miller wrote:
> Physical geography information for a device is available
> to userspace already.  If tools want to present that to
> the user in a suitable interface, fine.  But what is
> being proposed here is not necessary to implement that.

OK, I'm just trying to understand how you would see this "feature"
being implemented in userspace.  Advice welcome.

I keep looking at my analogue: disk devices.

Disks have a hard-coded association: Some device node with number
(8,0) means "the first SCSI disk device" to the kernel.  Regardless of
what the name of the file that implements the device node is (probably
/dev/sda, but not necessarily), or if there are symlinks pointing at
that file.  The kernel only cares about the linkage between the device
node and the driver that accepts read/write/ioctl/etc. to it.

Network devices have no such thing that I can tell.  I get at the
device names (as presently assigned) by reading /proc/net/dev (I'd be
happy to be told of a more correct way - this is what net-tools uses.)
The moment I've finished reading this though, another process can come
along and change these devices names.  Now every ioctl() my code makes
could fail because the name (in struct ifreq) is the handle used for
such calls.  One could argue it's a rare thing to change device
names...

This still leaves us the problem of wanting perhaps several naming
policies: by logical use, by physical geography, by kernel enumeration
name, etc.  Every tool that interacts with device names would need to
be modified to get at these "new names" to make use of them,
which are then translated (in userspace) to the current matching
kernel name, which is then used to make the ioctl() calls.  And we'll
have to persist these "new names" (assuming they aren't always
computable - e.g. the udev persistent net names rules today -
certainly we'd have to do that for any logical use naming policy; 
agreed the persistance mapping would have to exist in userspace).

Something like that?

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

  reply	other threads:[~2008-05-27 19:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-23 16:31 network interface *name* alias support? Jan Engelhardt
2008-05-23 17:14 ` Kok, Auke
2008-05-23 17:44   ` Rick Jones
2008-05-23 19:06     ` Jon Masters
2008-05-23 19:11       ` Jon Masters
2008-05-23 20:46       ` Jan Engelhardt
2008-05-23 20:55         ` Jon Masters
2008-05-23 22:54       ` Thomas Graf
2008-05-24  4:25         ` Jon Masters
2008-05-24  4:53           ` Jan Engelhardt
2008-05-24  5:16             ` Matt Domsch
2008-05-24  9:15               ` James Chapman
2008-05-24  9:33                 ` David Woodhouse
2008-05-24 10:37                   ` James Chapman
2008-05-24 20:31                   ` Patrick McHardy
2008-05-24 20:54                     ` Jan Engelhardt
2008-05-25  3:07                       ` Patrick McHardy
2008-05-25 12:17                         ` David Miller
2008-05-27 19:03                           ` Matt Domsch [this message]
2008-05-27 21:49                             ` Jan Engelhardt
2008-05-27 22:11                             ` Thomas Graf
2008-05-24 18:12           ` Stephen Hemminger
  -- strict thread matches above, loose matches on Subject: below --
2008-05-21 22:47 Jon Masters
2008-05-23 13:07 ` David Woodhouse
2008-05-23 14:50   ` Jon Masters

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=20080527190352.GE25696@auslistsprd01.us.dell.com \
    --to=matt_domsch@dell.com \
    --cc=auke-jan.h.kok@intel.com \
    --cc=davem@davemloft.net \
    --cc=dwmw2@infradead.org \
    --cc=jchapman@katalix.com \
    --cc=jengelh@medozas.de \
    --cc=johnathan@jonmasters.org \
    --cc=jonathan@jonmasters.org \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=rick.jones2@hp.com \
    --cc=tgraf@suug.ch \
    /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).