]> git.baikalelectronics.ru Git - 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)
commitf2625668e3906745553a9189c2de37b302e78f72
treec48bdad63e1673d2dc516f189dd40e5d08c4a8f6
parentb1dc1fae0248c0c920e15cf54e553d575b260224
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: 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_switchdev.c