aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/bpf/bpf_helpers.h
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2017-07-10 14:04:28 -0700
committerDavid S. Miller <davem@davemloft.net>2017-07-11 20:51:29 -0700
commit533350227d95937703aaa16414701eadd67f3ac3 (patch)
tree0fb01390f34db0ba88a21511fff195c0f06cd03d /tools/testing/selftests/bpf/bpf_helpers.h
parentbridge: mdb: fix leak on complete_info ptr on fail path (diff)
downloadwireguard-linux-533350227d95937703aaa16414701eadd67f3ac3.tar.xz
wireguard-linux-533350227d95937703aaa16414701eadd67f3ac3.zip
samples/bpf: fix a build issue
With latest net-next: ==== clang -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/6.3.1/include -I./arch/x86/include -I./arch/x86/include/generated/uapi -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -Isamples/bpf \ -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unused-value -Wno-pointer-sign \ -Wno-compare-distinct-pointer-types \ -Wno-gnu-variable-sized-type-not-at-end \ -Wno-address-of-packed-member -Wno-tautological-compare \ -Wno-unknown-warning-option \ -O2 -emit-llvm -c samples/bpf/tcp_synrto_kern.c -o -| llc -march=bpf -filetype=obj -o samples/bpf/tcp_synrto_kern.o samples/bpf/tcp_synrto_kern.c:20:10: fatal error: 'bpf_endian.h' file not found ^~~~~~~~~~~~~~ 1 error generated. ==== net has the same issue. Add support for ntohl and htonl in tools/testing/selftests/bpf/bpf_endian.h. Also move bpf_helpers.h from samples/bpf to selftests/bpf and change compiler include logic so that programs in samples/bpf can access the headers in selftests/bpf, but not the other way around. Signed-off-by: Yonghong Song <yhs@fb.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Lawrence Brakmo <brakmo@fb.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--tools/testing/selftests/bpf/bpf_helpers.h (renamed from samples/bpf/bpf_helpers.h)0
1 files changed, 0 insertions, 0 deletions
diff --git a/samples/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h
index d50ac342dc92..d50ac342dc92 100644
--- a/samples/bpf/bpf_helpers.h
+++ b/tools/testing/selftests/bpf/bpf_helpers.h