Skip to content

Commit 0c2600c

Browse files
paravmellanoxSaeed Mahameed
authored andcommitted
net/mlx5: E-switch, Destroy TSAR after reload interface
When eswitch offloads is enabled, TSAR is created before reloading the interfaces. However when eswitch offloads mode is disabled, TSAR is disabled before reloading the interfaces. To keep the eswitch enable/disable sequence as mirror, destroy TSAR after reloading the interfaces. Fixes: 1bd27b1 ("net/mlx5: Introduce E-switch QoS management") Signed-off-by: Parav Pandit <[email protected]> Reviewed-by: Roi Dayan <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 2b8e9c7 commit 0c2600c

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+2
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/eswitch.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1653,8 +1653,6 @@ void mlx5_eswitch_disable_locked(struct mlx5_eswitch *esw, bool clear_vf)
16531653
else if (esw->mode == MLX5_ESWITCH_OFFLOADS)
16541654
esw_offloads_disable(esw);
16551655

1656-
esw_destroy_tsar(esw);
1657-
16581656
old_mode = esw->mode;
16591657
esw->mode = MLX5_ESWITCH_NONE;
16601658

@@ -1664,6 +1662,8 @@ void mlx5_eswitch_disable_locked(struct mlx5_eswitch *esw, bool clear_vf)
16641662
mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_IB);
16651663
mlx5_reload_interface(esw->dev, MLX5_INTERFACE_PROTOCOL_ETH);
16661664
}
1665+
esw_destroy_tsar(esw);
1666+
16671667
if (clear_vf)
16681668
mlx5_eswitch_clear_vf_vports_info(esw);
16691669
}

0 commit comments

Comments
 (0)