]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_nve: Replace error code with EINVAL
authorIdo Schimmel <idosch@mellanox.com>
Tue, 8 Jan 2019 16:48:08 +0000 (16:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jan 2019 21:53:54 +0000 (16:53 -0500)
commit805ed1512bbcf1b97b270792d1fbe416da66c52f
tree28b0e214c3bc19e9d3a0c36feed9205c52c78204
parentec8bf3b650bf915a3f41e5dde46b9b775e2bb633
mlxsw: spectrum_nve: Replace error code with EINVAL

Adding a VLAN on a port can trigger the offload of a VXLAN tunnel which
is already a member in the VLAN. In case the configuration of the VXLAN
is not supported, the driver would return -EOPNOTSUPP.

This is problematic since bridge code does not interpret this as error,
but rather that it should try to setup the VLAN using the 8021q driver
instead of switchdev.

Fixes: 39e366863916 ("mlxsw: spectrum: Enable VxLAN enslavement to VLAN-aware bridges")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_nve.c