Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: Remove bpf_tracing_net.h usages from two networking tests

This patch removes the bpf_tracing_net.h usage from the networking tests,
fib_lookup and test_lwt_redirect. Instead of using the (copied) macro
TC_ACT_SHOT and ETH_HLEN from bpf_tracing_net.h, they can directly
use the ones defined in the network header files under linux/.

Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20240509175026.3423614-2-martin.lau@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Martin KaFai Lau and committed by
Alexei Starovoitov
c0338e60 00936709

+2 -2
+1 -1
tools/testing/selftests/bpf/progs/fib_lookup.c
··· 3 3 4 4 #include <linux/types.h> 5 5 #include <linux/bpf.h> 6 + #include <linux/pkt_cls.h> 6 7 #include <bpf/bpf_helpers.h> 7 - #include "bpf_tracing_net.h" 8 8 9 9 struct bpf_fib_lookup fib_params = {}; 10 10 int fib_lookup_ret = 0;
+1 -1
tools/testing/selftests/bpf/progs/test_lwt_redirect.c
··· 3 3 #include <bpf/bpf_endian.h> 4 4 #include <bpf/bpf_helpers.h> 5 5 #include <linux/ip.h> 6 - #include "bpf_tracing_net.h" 6 + #include <linux/if_ether.h> 7 7 8 8 /* We don't care about whether the packet can be received by network stack. 9 9 * Just care if the packet is sent to the correct device at correct direction