diff options
author | Ido Schimmel <idosch@mellanox.com> | 2019-01-08 11:48:10 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-08 16:53:54 -0500 |
commit | 16dc42e4511172aa3a4d49931597582c9ff78843 (patch) | |
tree | ec221ab3aa6940b671ec6089a479a6008a3dd7a8 | |
parent | 412283eedc138381e24d8c1304a3c5b298c503c4 (diff) |
selftests: mlxsw: Add a test case for VLAN addition error flow
Add a test case for the issue fixed by previous commit. In case the
offloading of an unsupported VxLAN tunnel was triggered by adding the
mapped VLAN to a local port, then error should be returned to the user.
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rwxr-xr-x | tools/testing/selftests/drivers/net/mlxsw/vxlan.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/testing/selftests/drivers/net/mlxsw/vxlan.sh b/tools/testing/selftests/drivers/net/mlxsw/vxlan.sh index dcf9f4e913e0..ae6146ec5afd 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/vxlan.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/vxlan.sh | |||
@@ -847,6 +847,24 @@ sanitization_vlan_aware_test() | |||
847 | 847 | ||
848 | log_test "vlan-aware - failed enslavement to vlan-aware bridge" | 848 | log_test "vlan-aware - failed enslavement to vlan-aware bridge" |
849 | 849 | ||
850 | bridge vlan del vid 10 dev vxlan20 | ||
851 | bridge vlan add vid 20 dev vxlan20 pvid untagged | ||
852 | |||
853 | # Test that offloading of an unsupported tunnel fails when it is | ||
854 | # triggered by addition of VLAN to a local port | ||
855 | RET=0 | ||
856 | |||
857 | # TOS must be set to inherit | ||
858 | ip link set dev vxlan10 type vxlan tos 42 | ||
859 | |||
860 | ip link set dev $swp1 master br0 | ||
861 | bridge vlan add vid 10 dev $swp1 &> /dev/null | ||
862 | check_fail $? | ||
863 | |||
864 | log_test "vlan-aware - failed vlan addition to a local port" | ||
865 | |||
866 | ip link set dev vxlan10 type vxlan tos inherit | ||
867 | |||
850 | ip link del dev vxlan20 | 868 | ip link del dev vxlan20 |
851 | ip link del dev vxlan10 | 869 | ip link del dev vxlan10 |
852 | ip link del dev br0 | 870 | ip link del dev br0 |