Commit 21bad8da authored by Eli Cohen's avatar Eli Cohen Committed by Jakub Kicinski

net/mlx5e: Simplify condition on esw_vport_enable_qos()

esw->qos.enabled will only be true if both MLX5_CAP_GEN(dev, qos) and
MLX5_CAP_QOS(dev, esw_scheduling) are true. Therefore, remove them from
the condition in and rely only on esw->qos.enabled.
Signed-off-by: default avatarEli Cohen <elic@nvidia.com>
Reviewed-by: default avatarRoi Dayan <roid@nvidia.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@nvidia.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 838b00a2
...@@ -1042,8 +1042,7 @@ static int esw_vport_enable_qos(struct mlx5_eswitch *esw, ...@@ -1042,8 +1042,7 @@ static int esw_vport_enable_qos(struct mlx5_eswitch *esw,
void *vport_elem; void *vport_elem;
int err = 0; int err = 0;
if (!esw->qos.enabled || !MLX5_CAP_GEN(dev, qos) || if (!esw->qos.enabled)
!MLX5_CAP_QOS(dev, esw_scheduling))
return 0; return 0;
if (vport->qos.enabled) if (vport->qos.enabled)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment