Skip to content

Commit 5b8631c

Browse files
elic307iSaeed Mahameed
authored andcommitted
net/mlx5: E-Switch, Fail mlx5_esw_modify_vport_rate if qos disabled
Avoid calling mlx5_esw_modify_vport_rate() if qos is not enabled and avoid unnecessary syndrome messages from firmware. Fixes: fcb64c0 ("net/mlx5: E-Switch, add ingress rate support") Signed-off-by: Eli Cohen <elic@nvidia.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
1 parent 470b747 commit 5b8631c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • drivers/net/ethernet/mellanox/mlx5/core

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,10 @@ int mlx5_esw_modify_vport_rate(struct mlx5_eswitch *esw, u16 vport_num,
11421142
struct mlx5_vport *vport;
11431143

11441144
vport = mlx5_eswitch_get_vport(esw, vport_num);
1145+
1146+
if (!vport->qos.enabled)
1147+
return -EOPNOTSUPP;
1148+
11451149
MLX5_SET(scheduling_context, ctx, max_average_bw, rate_mbps);
11461150

11471151
return mlx5_modify_scheduling_element_cmd(esw->dev,

0 commit comments

Comments
 (0)