selftests/bpf: Move newer bpf_iter_* type redefining to a new header file
authorYonghong Song <yhs@fb.com>
Tue, 23 Jun 2020 23:08:16 +0000 (16:08 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 25 Jun 2020 01:37:59 +0000 (18:37 -0700)
commit84544f5637ff3501876ba96bd48ca900317e08fb
treec7eac342801bdc50036e0920756d70dc5eda19cd
parent0d4fad3e57df2bf61e8ffc8d12a34b1caf9b8835
selftests/bpf: Move newer bpf_iter_* type redefining to a new header file

Commit b9f4c01f3e0b ("selftest/bpf: Make bpf_iter selftest
compilable against old vmlinux.h") and Commit dda18a5c0b75
("selftests/bpf: Convert bpf_iter_test_kern{3, 4}.c to define
own bpf_iter_meta") redefined newly introduced types
in bpf programs so the bpf program can still compile
properly with old kernels although loading may fail.

Since this patch set introduced new types and the same
workaround is needed, so let us move the workaround
to a separate header file so they do not clutter
bpf programs.

Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200623230816.3988656-1-yhs@fb.com
tools/testing/selftests/bpf/progs/bpf_iter.h [new file with mode: 0644]
tools/testing/selftests/bpf/progs/bpf_iter_bpf_map.c
tools/testing/selftests/bpf/progs/bpf_iter_ipv6_route.c
tools/testing/selftests/bpf/progs/bpf_iter_netlink.c
tools/testing/selftests/bpf/progs/bpf_iter_task.c
tools/testing/selftests/bpf/progs/bpf_iter_task_file.c
tools/testing/selftests/bpf/progs/bpf_iter_test_kern3.c
tools/testing/selftests/bpf/progs/bpf_iter_test_kern4.c
tools/testing/selftests/bpf/progs/bpf_iter_test_kern_common.h