]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
mlxsw: spectrum_switchdev: Avoid returning errors in commit phase
authorIdo Schimmel <idosch@mellanox.com>
Tue, 8 Jan 2019 16:48:07 +0000 (16:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jan 2019 21:53:54 +0000 (16:53 -0500)
commit457e20d659247a09524e276aed46f19d853701d0
treec48bdad63e1673d2dc516f189dd40e5d08c4a8f6
parent143a8e038ac599ca73c6354c8af6a8fdeee9fa7d
mlxsw: spectrum_switchdev: Avoid returning errors in commit phase

Drivers are not supposed to return errors in switchdev commit phase if
they returned OK in prepare phase. Otherwise, a WARNING is emitted.
However, when the offloading of a VXLAN tunnel is triggered by the
addition of a VLAN on a local port, it is not possible to guarantee that
the commit phase will succeed without doing a lot of work.

In these cases, the artificial division between prepare and commit phase
does not make sense, so simply do the work in the prepare phase.

Fixes: d70e42b22dd4 ("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_switchdev.c