Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fd586de authored by Yonatan Cohen's avatar Yonatan Cohen Committed by Doug Ledford
Browse files

IB/mlx4: Add CQ moderation capability to query_device



query_device can now obtain the maximum values for
cq_max_count and cq_period, needed for cq moderation.

Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
Reviewed-by: default avatarMajd Dibbiny <majd@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 18bd9072
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -563,6 +563,9 @@ static int mlx4_ib_query_device(struct ib_device *ibdev,
		props->max_wq_type_rq = props->max_qp;
	}

	props->cq_caps.max_cq_moderation_count = MLX4_MAX_CQ_COUNT;
	props->cq_caps.max_cq_moderation_period = MLX4_MAX_CQ_PERIOD;

	if (!mlx4_is_slave(dev->dev))
		err = mlx4_get_internal_clock_params(dev->dev, &clock_params);