Commit b498dc7d authored by Petr Machata's avatar Petr Machata Committed by David S. Miller

selftests: mlxsw: extack: Test VLAN add on a VXLAN device

Test mapping a VLAN at a VXLAN device that can't be offloaded.
Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7357eb3d
...@@ -7,6 +7,7 @@ lib_dir=$(dirname $0)/../../../net/forwarding ...@@ -7,6 +7,7 @@ lib_dir=$(dirname $0)/../../../net/forwarding
ALL_TESTS=" ALL_TESTS="
netdev_pre_up_test netdev_pre_up_test
vxlan_vlan_add_test
" "
NUM_NETIFS=2 NUM_NETIFS=2
source $lib_dir/lib.sh source $lib_dir/lib.sh
...@@ -74,6 +75,36 @@ netdev_pre_up_test() ...@@ -74,6 +75,36 @@ netdev_pre_up_test()
ip link del dev br1 ip link del dev br1
} }
vxlan_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 vx1 master br1
check_err $?
bridge vlan add dev vx1 vid 1
check_err $?
ip link set dev $swp1 master br1
check_err $?
bridge vlan add dev vx1 vid 1 pvid untagged 2>&1 >/dev/null \
| grep -q mlxsw_spectrum
check_err $?
log_test "extack - map VLAN at VXLAN device"
ip link del dev vx1
ip link del dev br1
}
trap cleanup EXIT trap cleanup EXIT
setup_prepare setup_prepare
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment