Skip to content

Commit

Permalink
selftests: forwarding: vxlan_bridge_1d: Add a TOS test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Petr Machata authored and David S. Miller committed Nov 20, 2018
1 parent b3a7ee7 commit d417ecf
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export VXPORT
test_flood
test_unicast
test_ttl
test_tos
reapply_config
ping_ipv4
test_flood
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit d417ecf

Please sign in to comment.