mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
0b46b75505
Introduce a macro LIBBPF_DEPRECATED_SINCE(major, minor, message) to prepare the deprecation of two API functions. This macro marks functions as deprecated when libbpf's version reaches the values passed as an argument. As part of this change libbpf_version.h header is added with recorded major (LIBBPF_MAJOR_VERSION) and minor (LIBBPF_MINOR_VERSION) libbpf version macros. They are now part of libbpf public API and can be relied upon by user code. libbpf_version.h is installed system-wide along other libbpf public headers. Due to this new build-time auto-generated header, in-kernel applications relying on libbpf (resolve_btfids, bpftool, bpf_preload) are updated to include libbpf's output directory as part of a list of include search paths. Better fix would be to use libbpf's make_install target to install public API headers, but that clean up is left out as a future improvement. The build changes were tested by building kernel (with KBUILD_OUTPUT and O= specified explicitly), bpftool, libbpf, selftests/bpf, and resolve_btfids builds. No problems were detected. Note that because of the constraints of the C preprocessor we have to write a few lines of macro magic for each version used to prepare deprecation (0.6 for now). Also, use LIBBPF_DEPRECATED_SINCE() to schedule deprecation of btf__get_from_id() and btf__load(), which are replaced by btf__load_from_kernel_by_id() and btf__load_into_kernel(), respectively, starting from future libbpf v0.6. This is part of libbpf 1.0 effort ([0]). [0] Closes: https://github.com/libbpf/libbpf/issues/278 Co-developed-by: Quentin Monnet <quentin@isovalent.com> Co-developed-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Quentin Monnet <quentin@isovalent.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20210908213226.1871016-1-andrii@kernel.org |
||
---|---|---|
.. | ||
.gitignore | ||
bpf_core_read.h | ||
bpf_endian.h | ||
bpf_gen_internal.h | ||
bpf_helpers.h | ||
bpf_prog_linfo.c | ||
bpf_tracing.h | ||
bpf.c | ||
bpf.h | ||
btf_dump.c | ||
btf.c | ||
btf.h | ||
Build | ||
gen_loader.c | ||
hashmap.c | ||
hashmap.h | ||
libbpf_common.h | ||
libbpf_errno.c | ||
libbpf_internal.h | ||
libbpf_legacy.h | ||
libbpf_probes.c | ||
libbpf.c | ||
libbpf.h | ||
libbpf.map | ||
libbpf.pc.template | ||
linker.c | ||
Makefile | ||
netlink.c | ||
nlattr.c | ||
nlattr.h | ||
relo_core.c | ||
relo_core.h | ||
ringbuf.c | ||
skel_internal.h | ||
str_error.c | ||
str_error.h | ||
strset.c | ||
strset.h | ||
xsk.c | ||
xsk.h |