summaryrefslogtreecommitdiffstats
path: root/scripts/link-vmlinux.sh
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2020-03-04 17:00:06 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2020-03-04 17:00:10 +0100
commit0641cadac46710bf7f87fa46067194ec1d932d90 (patch)
treef226fe625bc79e1ea70a223dac69fdf33e434383 /scripts/link-vmlinux.sh
parent320a36063e1441210106aa33997ad3770d4c86b4 (diff)
parent367d82f17eff53cec531920eb0de9973fac89ec1 (diff)
Merge branch 'bpf-uapi-enums'
Andrii Nakryiko says: ==================== Convert BPF-related UAPI constants, currently defined as #define macro, into anonymous enums. This has no difference in terms of usage of such constants in C code (they are still could be used in all the compile-time contexts that `#define`s can), but they are recorded as part of DWARF type info, and subsequently get recorded as part of kernel's BTF type info. This allows those constants to be emitted as part of vmlinux.h auto-generated header file and be used from BPF programs. Which is especially convenient for all kinds of BPF helper flags and makes CO-RE BPF programs nicer to write. libbpf's btf_dump logic currently assumes enum values are signed 32-bit values, but that doesn't match a typical case, so switch it to emit unsigned values. Once BTF encoding of BTF_KIND_ENUM is extended to capture signedness properly, this will be made more flexible. As an immediate validation of the approach, runqslower's copy of BPF_F_CURRENT_CPU #define is dropped in favor of its enum variant from vmlinux.h. v2->v3: - convert only constants usable from BPF programs (BPF helper flags, map create flags, etc) (Alexei); v1->v2: - fix up btf_dump test to use max 32-bit unsigned value instead of negative one. ==================== Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'scripts/link-vmlinux.sh')
0 files changed, 0 insertions, 0 deletions