]> www.infradead.org Git - users/jedix/linux-maple.git/commit
libbpf: Add bpf_object__token_fd accessor
authorIhor Solodrai <ihor.solodrai@pm.me>
Fri, 13 Sep 2024 00:19:02 +0000 (00:19 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 13 Sep 2024 02:07:13 +0000 (19:07 -0700)
commitea02a946873ba6709080e9db7b22449f1ac69fd4
tree53e317721866b200e9342ba701ee8dde1f802299
parent6182e0b80f9b5c8da19ab3a60db2e4cc10b259e8
libbpf: Add bpf_object__token_fd accessor

Add a LIBBPF_API function to retrieve the token_fd from a bpf_object.

Without this accessor, if user needs a token FD they have to get it
manually via bpf_token_create, even though a token might have been
already created by bpf_object__load.

Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Ihor Solodrai <ihor.solodrai@pm.me>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240913001858.3345583-1-ihor.solodrai@pm.me
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h
tools/lib/bpf/libbpf.map