aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/bpf/libbpf.map
diff options
context:
space:
mode:
authorGravatar Roberto Sassu <roberto.sassu@huawei.com> 2022-10-06 13:07:35 +0200
committerGravatar Andrii Nakryiko <andrii@kernel.org> 2022-10-10 16:49:20 -0700
commit97c8f9dd5db839f2387785ee936d0a5b257b31d3 (patch)
tree7187d54b1216e04a58ee53bbbab571f6be527a5c /tools/lib/bpf/libbpf.map
parentlibbpf: Introduce bpf_btf_get_fd_by_id_opts() (diff)
downloadlinux-97c8f9dd5db839f2387785ee936d0a5b257b31d3.tar.gz
linux-97c8f9dd5db839f2387785ee936d0a5b257b31d3.tar.bz2
linux-97c8f9dd5db839f2387785ee936d0a5b257b31d3.zip
libbpf: Introduce bpf_link_get_fd_by_id_opts()
Introduce bpf_link_get_fd_by_id_opts(), for symmetry with bpf_map_get_fd_by_id_opts(), to let the caller pass the newly introduced data structure bpf_get_fd_by_id_opts. Keep the existing bpf_link_get_fd_by_id(), and call bpf_link_get_fd_by_id_opts() with NULL as opts argument, to prevent setting open_flags. Currently, the kernel does not support non-zero open_flags for bpf_link_get_fd_by_id_opts(), and a call with them will result in an error returned by the bpf() system call. The caller should always pass zero open_flags. Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20221006110736.84253-6-roberto.sassu@huaweicloud.com
Diffstat (limited to 'tools/lib/bpf/libbpf.map')
-rw-r--r--tools/lib/bpf/libbpf.map1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map
index 7011d5eec67b..71bf5691a689 100644
--- a/tools/lib/bpf/libbpf.map
+++ b/tools/lib/bpf/libbpf.map
@@ -372,6 +372,7 @@ LIBBPF_1.0.0 {
LIBBPF_1.1.0 {
global:
bpf_btf_get_fd_by_id_opts;
+ bpf_link_get_fd_by_id_opts;
bpf_map_get_fd_by_id_opts;
bpf_prog_get_fd_by_id_opts;
user_ring_buffer__discard;