public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox•net>
To: Alexei Starovoitov <ast@fb•com>,
	"David S . Miller" <davem@davemloft•net>
Cc: David Ahern <dsa@cumulusnetworks•com>, Tejun Heo <tj@kernel•org>,
	Andy Lutomirski <luto@amacapital•net>,
	"Eric W . Biederman" <ebiederm@xmission•com>,
	netdev@vger•kernel.org
Subject: Re: [PATCH v4 net] bpf: add bpf_sk_netns_id() helper
Date: Tue, 07 Feb 2017 11:41:40 +0100	[thread overview]
Message-ID: <5899A464.8080508@iogearbox.net> (raw)
In-Reply-To: <1486432968-3255218-1-git-send-email-ast@fb.com>

On 02/07/2017 03:02 AM, Alexei Starovoitov wrote:
> in cases where bpf programs are looking at sockets and packets
> that belong to different netns, it could be useful to get an id
> that uniquely identify a netns within the whole system.
>
> Therefore introduce 'u64 bpf_sk_netns_id(sk);' helper. It returns
> unique value that identifies netns of given socket or dev_net(skb->dev)
> The upper 32-bits of the return value contain device id where namespace
> filesystem resides and lower 32-bits contain inode number within that filesystem.
[...]
> Signed-off-by: Alexei Starovoitov <ast@kernel•org>
> Reviewed-by: David Ahern <dsa@cumulusnetworks•com>
> Tested-by: David Ahern <dsa@cumulusnetworks•com>

For the BPF bits:

Acked-by: Daniel Borkmann <daniel@iogearbox•net>

  reply	other threads:[~2017-02-07 10:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07  2:02 [PATCH v4 net] bpf: add bpf_sk_netns_id() helper Alexei Starovoitov
2017-02-07 10:41 ` Daniel Borkmann [this message]
2017-02-08 18:16 ` David Miller
2017-02-14  7:21 ` Eric W. Biederman
2017-02-16  2:16   ` David Ahern
2017-02-16  3:08     ` Eric W. Biederman
2017-02-16  3:18       ` David Ahern
2017-02-16  3:25         ` Andy Lutomirski
2017-02-16  3:35           ` David Ahern
2017-02-16  3:45             ` Eric W. Biederman

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=5899A464.8080508@iogearbox.net \
    --to=daniel@iogearbox$(echo .)net \
    --cc=ast@fb$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=dsa@cumulusnetworks$(echo .)com \
    --cc=ebiederm@xmission$(echo .)com \
    --cc=luto@amacapital$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=tj@kernel$(echo .)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