aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_tc_tunnel.sh
diff options
context:
space:
mode:
authorWillem de Bruijn <willemb@google.com>2019-03-22 14:32:59 -0400
committerAlexei Starovoitov <ast@kernel.org>2019-03-22 13:52:45 -0700
commit94f16813e1b297d31f8fe6217cd9be19e080f998 (patch)
treed609d2a8d561ecb291d12377eafe08a319ec5141 /tools/testing/selftests/bpf/test_tc_tunnel.sh
parentselftests/bpf: convert bpf tunnel test to BPF_ADJ_ROOM_MAC (diff)
downloadlinux-dev-94f16813e1b297d31f8fe6217cd9be19e080f998.tar.xz
linux-dev-94f16813e1b297d31f8fe6217cd9be19e080f998.zip
selftests/bpf: convert bpf tunnel test to BPF_F_ADJ_ROOM_FIXED_GSO
Lower route MTU to ensure packets fit in device MTU after encap, then skip the gso_size changes. Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/test_tc_tunnel.sh')
-rwxr-xr-xtools/testing/selftests/bpf/test_tc_tunnel.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_tc_tunnel.sh b/tools/testing/selftests/bpf/test_tc_tunnel.sh
index 9e18754f2354..cda5317790d2 100755
--- a/tools/testing/selftests/bpf/test_tc_tunnel.sh
+++ b/tools/testing/selftests/bpf/test_tc_tunnel.sh
@@ -35,6 +35,12 @@ setup() {
ip -netns "${ns1}" -6 addr add "${ns1_v6}/64" dev veth1 nodad
ip -netns "${ns2}" -6 addr add "${ns2_v6}/64" dev veth2 nodad
+ # clamp route to reserve room for tunnel headers
+ ip -netns "${ns1}" -4 route flush table main
+ ip -netns "${ns1}" -6 route flush table main
+ ip -netns "${ns1}" -4 route add "${ns2_v4}" mtu 1476 dev veth1
+ ip -netns "${ns1}" -6 route add "${ns2_v6}" mtu 1456 dev veth1
+
sleep 1
dd if=/dev/urandom of="${infile}" bs="${datalen}" count=1 status=none