Subject: Re: [PATCH v4 net] bpf: add bpf_sk_netns_id() helper

From: Daniel Borkmann <[email-masked]>
Date: Tue, 07 Feb 2017 11:41:40 +0100

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 <[email-masked]>
> Reviewed-by: David Ahern <[email-masked]>
> Tested-by: David Ahern <[email-masked]>

For the BPF bits:

Acked-by: Daniel Borkmann <[email-masked]>