selftests/bpf: Refactor some net macros to bpf_tracing_net.h
authorYonghong Song <yhs@fb.com>
Tue, 23 Jun 2020 23:08:17 +0000 (16:08 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 25 Jun 2020 01:37:59 +0000 (18:37 -0700)
commit647b502e3d5456f5c240b1587112b163c69732e9
tree01e243c31cd86dfa8b39fdb0c62df1cc27da2918
parent84544f5637ff3501876ba96bd48ca900317e08fb
selftests/bpf: Refactor some net macros to bpf_tracing_net.h

Refactor bpf_iter_ipv6_route.c and bpf_iter_netlink.c
so net macros, originally from various include/linux header
files, are moved to a new header file
bpf_tracing_net.h. The goal is to improve reuse so
networking tracing programs do not need to
copy these macros every time they use them.

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/20200623230817.3988962-1-yhs@fb.com
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_tracing_net.h [new file with mode: 0644]