summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2018-12-12 17:03:06 +0000
committerDavid S. Miller <davem@davemloft.net>2018-12-12 16:34:22 -0800
commit06a2fc8f1498dc978e856ef5ded6667b476a3b5b (patch)
tree2528bae022784c5f9b636f0a567ae9f77242f78e /tools/testing
parentb498dc7d29bd6b4a108451671f81d712fba008ec (diff)
selftests: mlxsw: extack: Test VLAN add on a port device
Test mapping a VLAN at a port device such that on the same VLAN, there already is an unoffloadable VXLAN device. Signed-off-by: Petr Machata <petrm@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing')
-rwxr-xr-xtools/testing/selftests/drivers/net/mlxsw/extack.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/testing/selftests/drivers/net/mlxsw/extack.sh b/tools/testing/selftests/drivers/net/mlxsw/extack.sh
index d9e02624c70b..d72d8488a3b2 100755
--- a/tools/testing/selftests/drivers/net/mlxsw/extack.sh
+++ b/tools/testing/selftests/drivers/net/mlxsw/extack.sh
@@ -8,6 +8,7 @@ lib_dir=$(dirname $0)/../../../net/forwarding
ALL_TESTS="
netdev_pre_up_test
vxlan_vlan_add_test
+ port_vlan_add_test
"
NUM_NETIFS=2
source $lib_dir/lib.sh
@@ -105,6 +106,35 @@ vxlan_vlan_add_test()
ip link del dev br1
}
+port_vlan_add_test()
+{
+ RET=0
+
+ ip link add name br1 up type bridge vlan_filtering 1 mcast_snooping 0
+
+ # Unsupported configuration: mlxsw demands VXLAN with "noudpcsum".
+ ip link add name vx1 up type vxlan id 1000 \
+ local 192.0.2.17 remote 192.0.2.18 \
+ dstport 4789 tos inherit ttl 100
+
+ ip link set dev $swp1 master br1
+ check_err $?
+
+ bridge vlan del dev $swp1 vid 1
+
+ ip link set dev vx1 master br1
+ check_err $?
+
+ bridge vlan add dev $swp1 vid 1 pvid untagged 2>&1 >/dev/null \
+ | grep -q mlxsw_spectrum
+ check_err $?
+
+ log_test "extack - map VLAN at port"
+
+ ip link del dev vx1
+ ip link del dev br1
+}
+
trap cleanup EXIT
setup_prepare