Skip to content

Commit 1ce5fc7

Browse files
HoommusSaeed Mahameed
authored andcommitted
net/mlx5: Clear bw_share upon VF disable
Currently, if user disables VFs with some min and max rates configured, they are cleared. But QoS data is not cleared and restored upon next VF enable placing limits on minimal rate for given VF, when user expects none. To match cleared vport->info struct with QoS-related min and max rates upon VF disable, clear vport->qos struct too. Fixes: 556b9d1 ("net/mlx5: Clear VF's configuration on disabling SRIOV") Signed-off-by: Vladyslav Tarasiuk <vladyslavt@nvidia.com> Reviewed-by: Moshe Shemesh <moshe@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent 8cbcc5e commit 1ce5fc7

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,6 +1408,7 @@ static void mlx5_eswitch_clear_vf_vports_info(struct mlx5_eswitch *esw)
14081408
int i;
14091409

14101410
mlx5_esw_for_each_vf_vport(esw, i, vport, esw->esw_funcs.num_vfs) {
1411+
memset(&vport->qos, 0, sizeof(vport->qos));
14111412
memset(&vport->info, 0, sizeof(vport->info));
14121413
vport->info.link_state = MLX5_VPORT_ADMIN_STATE_AUTO;
14131414
}

0 commit comments

Comments
 (0)