aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/endian.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-06-30 08:21:24 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2020-07-01 09:06:12 +0200
commit30ad688094bcfe8721bfd4003f6a20c9b6ddf964 (patch)
tree6695f0791ec2dd7d0ecbd5aa3ea60a25d847dd67 /tools/testing/selftests/bpf/prog_tests/endian.c
parentselftests/bpf: Allow substituting custom vmlinux.h for selftests build (diff)
downloadlinux-dev-30ad688094bcfe8721bfd4003f6a20c9b6ddf964.tar.xz
linux-dev-30ad688094bcfe8721bfd4003f6a20c9b6ddf964.zip
libbpf: Make bpf_endian co-exist with vmlinux.h
Make bpf_endian.h compatible with vmlinux.h. It is a frequent request from users wanting to use bpf_endian.h in their BPF applications using CO-RE and vmlinux.h. To achieve that, re-implement byte swap macros and drop all the header includes. This way it can be used both with linux header includes, as well as with a vmlinux.h. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20200630152125.3631920-2-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/endian.c')
0 files changed, 0 insertions, 0 deletions