linux_dsm_epyc7002/tools/testing/selftests/bpf
Yonghong Song 533350227d 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>
2017-07-11 20:51:29 -07:00
..
gnu selftests/bpf: get rid of -D__x86_64__ 2017-05-03 09:51:25 -04:00
include/uapi/linux selftests/bpf: fix broken build due to types.h 2017-05-17 18:45:14 -04:00
.gitignore bpf: Add test_tag to .gitignore 2017-02-10 15:56:08 -05:00
bpf_endian.h samples/bpf: fix a build issue 2017-07-11 20:51:29 -07:00
bpf_helpers.h samples/bpf: fix a build issue 2017-07-11 20:51:29 -07:00
bpf_util.h bpf: Move endianness BPF helpers out of bpf_util.h 2017-05-01 12:43:49 -07:00
config bpf: add initial suite for selftests 2016-10-18 11:35:55 -04:00
Makefile samples/bpf: fix a build issue 2017-07-11 20:51:29 -07:00
test_align.c selftests/bpf: make correct use of exit codes in bpf selftests 2017-06-13 13:58:56 -04:00
test_iptunnel_common.h selftests/bpf: add a test for basic XDP functionality 2017-04-01 12:45:57 -07:00
test_kmod.sh selftests: do not require bash to run bpf tests 2017-01-05 13:19:47 -07:00
test_l4lb.c bpf: Move endianness BPF helpers out of bpf_util.h 2017-05-01 12:43:49 -07:00
test_lpm_map.c bpf: Remove bpf_sys.h from selftests 2017-02-10 15:56:08 -05:00
test_lru_map.c bpf: lru: Lower the PERCPU_NR_SCANS from 16 to 4 2017-04-17 13:55:52 -04:00
test_maps.c bpf, tests: add a test for htab lookup + update traversal 2017-06-10 19:05:46 -04:00
test_obj_id.c bpf: Fix test_obj_id.c for llvm 5.0 2017-06-09 15:15:11 -04:00
test_pkt_access.c selftests/bpf: fix broken build due to types.h 2017-05-17 18:45:14 -04:00
test_pkt_md_access.c selftests/bpf: Add test cases to test narrower ctx field loads 2017-06-14 14:56:25 -04:00
test_progs.c selftests/bpf: Add test cases to test narrower ctx field loads 2017-06-14 14:56:25 -04:00
test_tag.c bpf: Remove bpf_sys.h from selftests 2017-02-10 15:56:08 -05:00
test_tcp_estats.c selftests/bpf: add a test case to check verifier pointer arithmetic 2017-05-03 09:51:25 -04:00
test_verifier.c bpf: add various test cases for verifier selftest 2017-07-03 02:22:52 -07:00
test_xdp.c selftests: bpf: Use bpf_endian.h in test_xdp.c 2017-05-02 07:52:01 -07:00