summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/bpf_tracing_net.h
diff options
context:
space:
mode:
authorEyal Birger <eyal.birger@gmail.com>2022-12-03 11:46:59 +0300
committerMartin KaFai Lau <martin.lau@kernel.org>2022-12-06 09:54:23 +0300
commit90a3a05eb33ff7a263f1e93e444d40e427cddf1a (patch)
tree9feeda0db56e1a151890140d5e5e558d36e6e169 /tools/testing/selftests/bpf/progs/bpf_tracing_net.h
parent4f4ac4d9106efeec9c84469725c04c4237c7fb6c (diff)
downloadlinux-90a3a05eb33ff7a263f1e93e444d40e427cddf1a.tar.xz
selftests/bpf: add xfrm_info tests
Test the xfrm_info kfunc helpers. The test setup creates three name spaces - NS0, NS1, NS2. XFRM tunnels are setup between NS0 and the two other NSs. The kfunc helpers are used to steer traffic from NS0 to the other NSs based on a userspace populated bpf global variable and validate that the return traffic had arrived from the desired NS. Signed-off-by: Eyal Birger <eyal.birger@gmail.com> Link: https://lore.kernel.org/r/20221203084659.1837829-5-eyal.birger@gmail.com Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/bpf_tracing_net.h')
-rw-r--r--tools/testing/selftests/bpf/progs/bpf_tracing_net.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/bpf_tracing_net.h b/tools/testing/selftests/bpf/progs/bpf_tracing_net.h
index adb087aecc9e..b394817126cf 100644
--- a/tools/testing/selftests/bpf/progs/bpf_tracing_net.h
+++ b/tools/testing/selftests/bpf/progs/bpf_tracing_net.h
@@ -25,6 +25,9 @@
#define IPV6_TCLASS 67
#define IPV6_AUTOFLOWLABEL 70
+#define TC_ACT_UNSPEC (-1)
+#define TC_ACT_SHOT 2
+
#define SOL_TCP 6
#define TCP_NODELAY 1
#define TCP_MAXSEG 2