net/mlx5: E-switch, Destroy TSAR when fail to enable the mode
authorParav Pandit <parav@mellanox.com>
Sat, 27 Jun 2020 10:29:28 +0000 (13:29 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Tue, 28 Jul 2020 19:55:27 +0000 (12:55 -0700)
When either esw_legacy_enable() or esw_offloads_enable() fails,
code missed to destroy the created TSAR.

Hence, add the missing call to destroy the TSAR.

Fixes: 610090ebce92 ("net/mlx5: E-switch, Initialize TSAR Qos hardware block before its user vports")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

index 1116ab9..9701f0f 100644 (file)
@@ -1608,7 +1608,7 @@ abort:
                mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_IB);
                mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_ETH);
        }
-
+       esw_destroy_tsar(esw);
        return err;
 }