]> 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)
commit25e3d730e5d2003c991bd4abd2ea250dcaa2cd22
tree28b0e214c3bc19e9d3a0c36feed9205c52c78204
parentf2625668e3906745553a9189c2de37b302e78f72
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: d387a0f5b3e9 ("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