diff options
author | Andrii Nakryiko <andriin@fb.com> | 2020-06-30 08:21:24 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-07-01 09:06:12 +0200 |
commit | 30ad688094bcfe8721bfd4003f6a20c9b6ddf964 (patch) | |
tree | 6695f0791ec2dd7d0ecbd5aa3ea60a25d847dd67 /tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | |
parent | ca4db6389d611eee2eb7c1dfe710b62d8ea06772 (diff) |
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/sockmap_basic.c')
0 files changed, 0 insertions, 0 deletions