]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
libbpf: Add support for bpf_link-based netns attachment
authorJakub Sitnicki <jakub@cloudflare.com>
Sun, 31 May 2020 08:28:40 +0000 (10:28 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Jun 2020 22:21:03 +0000 (15:21 -0700)
commitd60d81acc2c180e33244857e35ef60072573b000
tree11247584ab1f2753c51c2a968a49c7933ff73c7b
parent0c047ecbb7bab4c1d2136f5f04bb47a66a9a12b8
libbpf: Add support for bpf_link-based netns attachment

Add bpf_program__attach_nets(), which uses LINK_CREATE subcommand to create
an FD-based kernel bpf_link, for attach types tied to network namespace,
that is BPF_FLOW_DISSECTOR for the moment.

Signed-off-by: Jakub Sitnicki <jakub@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200531082846.2117903-7-jakub@cloudflare.com
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h
tools/lib/bpf/libbpf.map