]> git.baikalelectronics.ru Git - kernel.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)
commit62377709ab35eb3be728dae92bf5e0be6ce86764
tree11247584ab1f2753c51c2a968a49c7933ff73c7b
parentbf1203d7d381fab3bed9a7110fc33d5eb8e84414
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