selftests/bpf: Remove bpf_tracing_net.h usages from two networking tests
authorMartin KaFai Lau <martin.lau@kernel.org>
Thu, 9 May 2024 17:50:17 +0000 (10:50 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 9 May 2024 18:13:11 +0000 (11:13 -0700)
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>
tools/testing/selftests/bpf/progs/fib_lookup.c
tools/testing/selftests/bpf/progs/test_lwt_redirect.c

index c4514dd58c62788c5905595befe2f81dd97bc215..7b5dd2214ff46a18bb8b9423b6a9b8ef49c171b2 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <linux/types.h>
 #include <linux/bpf.h>
+#include <linux/pkt_cls.h>
 #include <bpf/bpf_helpers.h>
-#include "bpf_tracing_net.h"
 
 struct bpf_fib_lookup fib_params = {};
 int fib_lookup_ret = 0;
index 8c895122f29365b0671cadae5c97bc02b524670e..83439b87b766c642fa96fbcce94f62f00c89c8e4 100644 (file)
@@ -3,7 +3,7 @@
 #include <bpf/bpf_endian.h>
 #include <bpf/bpf_helpers.h>
 #include <linux/ip.h>
-#include "bpf_tracing_net.h"
+#include <linux/if_ether.h>
 
 /* We don't care about whether the packet can be received by network stack.
  * Just care if the packet is sent to the correct device at correct direction