Recent xsk change started using new BPF_JMP32_IMM macro. Add it to our
local copy of include/linux/filter.h to fix the build.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
The current definition calls BPF_LD_IMM64_RAW_FULL with
BPF_PSEUDO_MAP_FD but the original patch[0] invokes it with
BPF_PSEUDO_MAP_VALUE.
[0] https://patchwork.ozlabs.org/patch/1082785/
[ upstream commit 6b7a21140fca461c6d8d5c65a3746e7da50a409e ]
Needed a custom backport. I've changed fallbacks so that we can
partially pull in barriers step by step. I've fixed x86 ones and
added corresponding arm64 barriers.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This patch makes sure we build AF_XDP-related code as part of libbpf. This
also required copying few uapi/linux headers and adding few used definitions
in include headers.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Otherwise, we will have the following compilation error:
/home/yhs/work/bcc-new/src/cc/libbpf/src/bpf_prog_linfo.c:
In function ‘dissect_jited_func’:
/home/yhs/work/bcc-new/src/cc/libbpf/src/bpf_prog_linfo.c:88:10:
error: ‘EINVAL’ undeclared (first use in this function)
return -EINVAL;
The original linux/err.h at linux:tools/include directory
does include "asm/errno.h" as well.
Signed-off-by: Yonghong Song <yhs@fb.com>
sync with latest bpf-next tree.
the include/linux/filter.h is created as libbpf.c tries
to use various insn define macros.
Signed-off-by: Yonghong Song <yhs@fb.com>
This initial commit added the following files
from bpf-next repository:
src:
<files from linux:tools/lib/bpf>
bpf.c bpf.h btf.c btf.h libbpf.c libbpf.h
libbpf_errno.c netlink.c nlattr.c nlattr.h
str_error.c str_error.h
include:
<files from linux:tools/include/uapi/linux>
uapi/linux/{bpf.h, btf.h}
<files from linux:tools/include/tools>
tools/libc_compat.h
The following files are also added:
include/linux/{err.h, kernel.h, list.h, overflow.h, types.h}
These files are customized headers to satisfy compilation.
Their original counterparts are at linux:tools/include/linux
directory.
Signed-off-by: Yonghong Song <yhs@fb.com>