aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-11-19 16:11:21 +0000
committerDavid S. Miller <davem@davemloft.net>2018-11-19 17:59:44 -0800
commitd417ecf533fe014de667705f58ae5c579f7740b9 (patch)
treeaf6f079e6a5ccad3388c7e7c8e39b4254dc24d5e /tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh
parentselftests: forwarding: vxlan_bridge_1d: Add a TTL test (diff)
downloadlinux-dev-d417ecf533fe014de667705f58ae5c579f7740b9.tar.xz
linux-dev-d417ecf533fe014de667705f58ae5c579f7740b9.zip
selftests: forwarding: vxlan_bridge_1d: Add a TOS test
Test that TOS is inherited from the tunneled packet into the envelope as configured at the VXLAN device. Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rwxr-xr-xtools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh b/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh
index 0c17b0d427ba..ac1070937ae7 100755
--- a/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh
+++ b/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh
@@ -69,6 +69,7 @@ export VXPORT
test_flood
test_unicast
test_ttl
+ test_tos
reapply_config
ping_ipv4
test_flood
@@ -507,6 +508,19 @@ test_ttl()
log_test "VXLAN: envelope TTL"
}
+test_tos()
+{
+ RET=0
+
+ tc filter add dev v1 egress pref 77 prot ip \
+ flower ip_tos 0x40 action pass
+ vxlan_ping_test $h1 192.0.2.3 "-Q 0x40" v1 egress 77 10
+ vxlan_ping_test $h1 192.0.2.3 "-Q 0x30" v1 egress 77 0
+ tc filter del dev v1 egress pref 77 prot ip
+
+ log_test "VXLAN: envelope TOS inheritance"
+}
+
test_all()
{
echo "Running tests with UDP port $VXPORT"