public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@parallels•com>
To: Brian Haley <brian.haley@hp•com>
Cc: David Miller <davem@davemloft•net>,
	Eric Dumazet <eric.dumazet@gmail•com>,
	"netdev@vger•kernel.org" <netdev@vger•kernel.org>
Subject: Re: [PATCH v3 net-next] sockopt: Change getsockopt() of SO_BINDTODEVICE to return an interface name
Date: Wed, 28 Nov 2012 00:36:01 +0400	[thread overview]
Message-ID: <50B52431.5090800@parallels.com> (raw)
In-Reply-To: <50B388E4.7030600@hp.com>

On 11/26/2012 07:21 PM, Brian Haley wrote:
> Instead of having the getsockopt() of SO_BINDTODEVICE return an index, which
> will then require another call like if_indextoname() to get the actual interface
> name, have it return the name directly.
> 
> This also matches the existing man page description on socket(7) which mentions
> the argument being an interface name.
> 
> If the value has not been set, zero is returned and optlen will be set to zero
> to indicate there is no interface name present.
> 
> Added a seqlock to protect this code path, and dev_ifname(), from someone
> changing the device name via dev_change_name().
> 
> v2: Added seqlock protection while copying device name.
> 
> v3: Fixed word wrap in patch.
> 
> Signed-off-by: Brian Haley <brian.haley@hp•com>

Acked-by: Pavel Emelyanov <xemul@parallels•com>

      parent reply	other threads:[~2012-11-27 20:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26 15:21 [PATCH v3 net-next] sockopt: Change getsockopt() of SO_BINDTODEVICE to return an interface name Brian Haley
2012-11-27 20:34 ` Ben Hutchings
2012-11-27 20:36 ` Pavel Emelyanov [this message]

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=50B52431.5090800@parallels.com \
    --to=xemul@parallels$(echo .)com \
    --cc=brian.haley@hp$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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