aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladyslav Tarasiuk <[email protected]>2020-11-02 13:45:24 +0200
committerSaeed Mahameed <[email protected]>2020-11-17 11:50:53 -0800
commit1ce5fc724a26e0b476e42c5d588bdb80caea003b (patch)
tree98629bfae3879484c256d5b0e6727cd2de34b3ea
parent8cbcc5ef2a281f6bb10099f4572a08cb765ffbf4 (diff)
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: 556b9d16d3f5 ("net/mlx5: Clear VF's configuration on disabling SRIOV") Signed-off-by: Vladyslav Tarasiuk <[email protected]> Reviewed-by: Moshe Shemesh <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eswitch.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index e8e6294c7cca..6562f4d484e6 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -1408,6 +1408,7 @@ static void mlx5_eswitch_clear_vf_vports_info(struct mlx5_eswitch *esw)
int i;
mlx5_esw_for_each_vf_vport(esw, i, vport, esw->esw_funcs.num_vfs) {
+ memset(&vport->qos, 0, sizeof(vport->qos));
memset(&vport->info, 0, sizeof(vport->info));
vport->info.link_state = MLX5_VPORT_ADMIN_STATE_AUTO;
}