netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xemul@parallels.com
Cc: brian.haley@hp.com, bhutchings@solarflare.com,
	eric.dumazet@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] sockopt: Introduce the SO_BINDTOIFINDEX
Date: Tue, 23 Oct 2012 13:36:02 -0400 (EDT)	[thread overview]
Message-ID: <20121023.133602.1844873902881466397.davem@davemloft.net> (raw)
In-Reply-To: <5086A7FD.3020503@parallels.com>


This is really a huge ball of confusion.

The user asks for a device to bind to, and they want the device which
had a particular name at the time of the call.

If you allow setting this via ifindex, the issues and races are the
same whether the name-->ifindex translation is done before the
sockopt() call or during it.

Furthermore both the name and the ifindex can change (that latter
via module unload/load).

If you want me to consider these changes seriously, talk less about
obtuse issues like symmetry and more about what problems it actually
solves.  As far as I can tell, all the same real issues still exist
even if we had this new interface.

In fact, I wouldn't mind if a getsockopt() on SO_BINDTODEVICE returned
BOTH the name and the ifindex in a special structure.  Then you could
actually construct a more foolproof mechanism on the user side to try
various ways to get the same device bound to during restart.

Symmetry is over-rated.

  reply	other threads:[~2012-10-23 17:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-23 14:21 [PATCH net-next] sockopt: Introduce the SO_BINDTOIFINDEX Pavel Emelyanov
2012-10-23 17:36 ` David Miller [this message]
2012-10-23 21:43   ` Brian Haley

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=20121023.133602.1844873902881466397.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=bhutchings@solarflare.com \
    --cc=brian.haley@hp.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@parallels.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).