]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
mlxsw: spectrum_switchdev: Schedule respin during trans prepare
authorPetr Machata <petrm@mellanox.com>
Wed, 30 May 2018 01:00:49 +0000 (03:00 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 May 2018 18:13:44 +0000 (14:13 -0400)
Since there's no special support for the bridge events, the driver
returns -EOPNOTSUPP, and thus the commit never happens. Therefore
schedule respin during the prepare stage: there's no real difference one
way or another.

This fixes the problem that mirror-to-gretap offload wouldn't adapt to
changes in bridge vlan configuration right away and another notification
would have to arrive for mlxsw to catch up.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Reviewed-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c

index cbc8fabc90c5a54e490e0d278f7dc75dabb96929..8a15ac49cb5aa61e1961f96c9b28290d8be437c3 100644 (file)
@@ -1697,7 +1697,7 @@ static int mlxsw_sp_port_obj_add(struct net_device *dev,
                vlan = SWITCHDEV_OBJ_PORT_VLAN(obj);
                err = mlxsw_sp_port_vlans_add(mlxsw_sp_port, vlan, trans);
 
-               if (switchdev_trans_ph_commit(trans)) {
+               if (switchdev_trans_ph_prepare(trans)) {
                        /* The event is emitted before the changes are actually
                         * applied to the bridge. Therefore schedule the respin
                         * call for later, so that the respin logic sees the