summaryrefslogtreecommitdiff
path: root/samples/bpf/test_tunnel_bpf.sh
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2018-02-05 13:35:36 -0800
committerDavid S. Miller <davem@davemloft.net>2018-02-06 11:32:49 -0500
commit9c33ca4317c81d9a5d030bbc60aeb2d16edf172b (patch)
tree9f6a56f4d4d7226b735237e1e99510d2ac194b75 /samples/bpf/test_tunnel_bpf.sh
parent39f57f6799cdd437277122d4cd1c470c08f527c0 (diff)
sample/bpf: fix erspan metadata
The commit c69de58ba84f ("net: erspan: use bitfield instead of mask and offset") changes the erspan header to use bitfield, and commit d350a823020e ("net: erspan: create erspan metadata uapi header") creates a uapi header file. The above two commit breaks the current erspan test. This patch fixes it by adapting the above two changes. Fixes: ac80c2a165af ("samples/bpf: add erspan v2 sample code") Fixes: ef88f89c830f ("samples/bpf: extend test_tunnel_bpf.sh with ERSPAN") Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/bpf/test_tunnel_bpf.sh')
-rwxr-xr-xsamples/bpf/test_tunnel_bpf.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/bpf/test_tunnel_bpf.sh b/samples/bpf/test_tunnel_bpf.sh
index ae7f7c38309b..43ce049996ee 100755
--- a/samples/bpf/test_tunnel_bpf.sh
+++ b/samples/bpf/test_tunnel_bpf.sh
@@ -68,7 +68,7 @@ function add_erspan_tunnel {
ip netns exec at_ns0 \
ip link add dev $DEV_NS type $TYPE seq key 2 \
local 172.16.1.100 remote 172.16.1.200 \
- erspan_ver 2 erspan_dir 1 erspan_hwid 3
+ erspan_ver 2 erspan_dir egress erspan_hwid 3
fi
ip netns exec at_ns0 ip link set dev $DEV_NS up
ip netns exec at_ns0 ip addr add dev $DEV_NS 10.1.1.100/24
@@ -97,7 +97,7 @@ function add_ip6erspan_tunnel {
ip netns exec at_ns0 \
ip link add dev $DEV_NS type $TYPE seq key 2 \
local ::11 remote ::22 \
- erspan_ver 2 erspan_dir 1 erspan_hwid 7
+ erspan_ver 2 erspan_dir egress erspan_hwid 7
fi
ip netns exec at_ns0 ip addr add dev $DEV_NS 10.1.1.100/24
ip netns exec at_ns0 ip link set dev $DEV_NS up