Commit d417ecf5 authored by Petr Machata's avatar Petr Machata Committed by David S. Miller
Browse files

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: default avatarPetr Machata <petrm@mellanox.com>
Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b3a7ee74
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -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"