Skip to contentSkip to conversation

samples/bpf: fix bpf tunnel cleanup

PATCH Applied William Tu 2 participants 2 messages Jul 31, 2017 – Aug 1, 2017

Subsystems (3)
lore
Share & tools
lore

William Tu

author
#0 lore raw

PATCH 1/1 samples/bpf: fix bpf tunnel cleanup

test_tunnel_bpf.sh fails to remove the vxlan11 tunnel device, causing the next geneve tunnelling test case fails. In addition, the geneve reserved bit in tcbpf2_kern.c should be zero, according to the RFC.

---
 samples/bpf/tcbpf2_kern.c      | 4 ++--
 samples/bpf/test_tunnel_bpf.sh | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
samples/bpf/tcbpf2_kern.c +2 -2
index 9c823a609e75..270edcc149a1 100644
@@ -147,9 +147,9 @@ int _geneve_set_tunnel(struct __sk_buff *skb)
 	__builtin_memset(&gopt, 0x0, sizeof(gopt));
 	gopt.opt_class = 0x102; /* Open Virtual Networking (OVN) */
 	gopt.type = 0x08;
-	gopt.r1 = 1;
+	gopt.r1 = 0;
 	gopt.r2 = 0;
-	gopt.r3 = 1;
+	gopt.r3 = 0;
 	gopt.length = 2; /* 4-byte multiple */
 	*(int *) &gopt.opt_data = 0xdeadbeef;
 
samples/bpf/test_tunnel_bpf.sh +1 -0
index 1ff634f187b7..a70d2ea90313 100755
@@ -149,6 +149,7 @@ function cleanup {
 	ip link del veth1
 	ip link del ipip11
 	ip link del gretap11
+	ip link del vxlan11
 	ip link del geneve11
 	pkill tcpdump
 	pkill cat
Signature · 1 line
2.7.4
maintainer Applied
#1 lore raw

From: William Tu <[email protected]>
Date: Mon, 31 Jul 2017 14:40:50 -0700

Quoted 5 lines

test_tunnel_bpf.sh fails to remove the vxlan11 tunnel device, causing the next geneve tunnelling test case fails. In addition, the geneve reserved bit in tcbpf2_kern.c should be zero, according to the RFC.

Applied, thank you.