netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Haley <brian.haley@hp.com>
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Jeff Layton <jlayton@redhat.com>,
	Linux Network Developers <netdev@vger.kernel.org>
Subject: Re: IPv6: presentation format for zero scope ID
Date: Thu, 10 Dec 2009 14:32:31 -0500	[thread overview]
Message-ID: <4B214CCF.3040207@hp.com> (raw)
In-Reply-To: <3C8ED938-D4F9-4167-BC02-575265B7A56A@oracle.com>

Chuck Lever wrote:
> One other thing.  This is a rather more broad question, but still
> IPv6-related.
> 
> I'm considering mapping the scope ID to a device name in rpc_ntop6(),
> but it looks like network device names are part of a net namespace, and
> these presentation address strings are shared.  This address string
> might appear in /proc/mounts, for example, but can also be used to send
> messages to user space service daemons like statd or gssd.  We try to do
> the conversion once when certain objects are created (like an RPC client
> data structure) and then save the string.

Devices can be renamed, I'm not sure how common it is after boot though.
If you're not printing it that often the overhead of dev_get_by_index()
probably isn't that high, especially since it now uses RCU.

> Is it OK to leave just the scope ID (for link-local only, of course), or
> might the scope IDs also vary depending on the namespace?  I wouldn't
> think that they would.

Are you asking if a given numeric scope ID could map to a different interface
depending on the namespace?  I don't think so, the ifindex is unique for every
device, but a given network namespace might not contain the device that
matches a certain ifindex.

-Brian

  reply	other threads:[~2009-12-10 19:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07 21:45 IPv6: presentation format for zero scope ID Chuck Lever
2009-12-08  3:27 ` Brian Haley
2009-12-08 13:03   ` Jeff Layton
2009-12-08 15:57     ` Chuck Lever
2009-12-09 19:57     ` Chuck Lever
2009-12-09 22:50       ` Brian Haley
2009-12-10 18:19         ` Chuck Lever
2009-12-10 19:32           ` Brian Haley [this message]
2009-12-08 16:08   ` Chuck Lever

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=4B214CCF.3040207@hp.com \
    --to=brian.haley@hp.com \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@redhat.com \
    --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).