OSDN Git Service

bpf: Define enum bpf_core_relo_kind as uapi.
authorAlexei Starovoitov <ast@kernel.org>
Wed, 1 Dec 2021 18:10:27 +0000 (10:10 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 2 Dec 2021 19:18:35 +0000 (11:18 -0800)
commit46334a0cd21bed70d6f1ddef1464f75a0ebe1774
tree3609caf3683b152a729fada7065c8dc373b2eebf
parent29db4bea1d10b73749d7992c1fc9ac13499e8871
bpf: Define enum bpf_core_relo_kind as uapi.

enum bpf_core_relo_kind is generated by llvm and processed by libbpf.
It's a de-facto uapi.
With CO-RE in the kernel the bpf_core_relo_kind values become uapi de-jure.
Also rename them with BPF_CORE_ prefix to distinguish from conflicting names in
bpf_core_read.h. The enums bpf_field_info_kind, bpf_type_id_kind,
bpf_type_info_kind, bpf_enum_value_kind are passing different values from bpf
program into llvm.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211201181040.23337-5-alexei.starovoitov@gmail.com
include/uapi/linux/bpf.h
tools/include/uapi/linux/bpf.h
tools/lib/bpf/libbpf.c
tools/lib/bpf/relo_core.c
tools/lib/bpf/relo_core.h