提交 21bad8da 编写于 作者: E Eli Cohen 提交者: 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: NEli Cohen <elic@nvidia.com>
Reviewed-by: NRoi Dayan <roid@nvidia.com>
Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册