Message ID | 20200220071054.12499-3-forrest0579@gmail.com |
---|---|
State | Changes Requested |
Delegated to: | BPF Maintainers |
Headers | show |
Series | bpf: Add get_netns_id helper for sock_ops | expand |
On Wed, Feb 19, 2020 at 11:11 PM Lingpeng Chen <forrest0579@gmail.com> wrote: > > This patch sync uapi bpf.h to tools/. > > Signed-off-by: Lingpeng Chen <forrest0579@gmail.com> Acked-by: Song Liu <songliubraving@fb.com>
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h index f1d74a2bd234..e79082f78b74 100644 --- a/tools/include/uapi/linux/bpf.h +++ b/tools/include/uapi/linux/bpf.h @@ -2892,6 +2892,12 @@ union bpf_attr { * Obtain the 64bit jiffies * Return * The 64 bit jiffies + * + * u64 bpf_get_netns_id(struct bpf_sock_ops *bpf_socket) + * Description + * Obtain netns id of sock + * Return + * The current netns inum */ #define __BPF_FUNC_MAPPER(FN) \ FN(unspec), \ @@ -3012,7 +3018,8 @@ union bpf_attr { FN(probe_read_kernel_str), \ FN(tcp_send_ack), \ FN(send_signal_thread), \ - FN(jiffies64), + FN(jiffies64), \ + FN(get_netns_id), /* integer value in 'imm' field of BPF_CALL instruction selects which helper * function eBPF program intends to call
This patch sync uapi bpf.h to tools/. Signed-off-by: Lingpeng Chen <forrest0579@gmail.com> --- tools/include/uapi/linux/bpf.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)