[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5899A464.8080508@iogearbox.net>
Date: Tue, 07 Feb 2017 11:41:40 +0100
From: Daniel Borkmann <daniel@...earbox.net>
To: Alexei Starovoitov <ast@...com>,
"David S . Miller" <davem@...emloft.net>
CC: David Ahern <dsa@...ulusnetworks.com>, Tejun Heo <tj@...nel.org>,
Andy Lutomirski <luto@...capital.net>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH v4 net] bpf: add bpf_sk_netns_id() helper
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@...nel.org>
> Reviewed-by: David Ahern <dsa@...ulusnetworks.com>
> Tested-by: David Ahern <dsa@...ulusnetworks.com>
For the BPF bits:
Acked-by: Daniel Borkmann <daniel@...earbox.net>
Powered by blists - more mailing lists