diff options
author | Yonatan Cohen <yonatanc@mellanox.com> | 2017-11-13 03:51:17 -0500 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-11-13 16:59:22 -0500 |
commit | 0fd586de65ae6a249433e1b496f5ed9ce199be73 (patch) | |
tree | f521b1eeef74bc26db2c9c1762164edb68f4241e | |
parent | 18bd90729237dc6ddbad01bc9618148224f03590 (diff) |
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: Yonatan Cohen <yonatanc@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 28c10ffc19e2..8c8a16791a3f 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c | |||
@@ -563,6 +563,9 @@ static int mlx4_ib_query_device(struct ib_device *ibdev, | |||
563 | props->max_wq_type_rq = props->max_qp; | 563 | props->max_wq_type_rq = props->max_qp; |
564 | } | 564 | } |
565 | 565 | ||
566 | props->cq_caps.max_cq_moderation_count = MLX4_MAX_CQ_COUNT; | ||
567 | props->cq_caps.max_cq_moderation_period = MLX4_MAX_CQ_PERIOD; | ||
568 | |||
566 | if (!mlx4_is_slave(dev->dev)) | 569 | if (!mlx4_is_slave(dev->dev)) |
567 | err = mlx4_get_internal_clock_params(dev->dev, &clock_params); | 570 | err = mlx4_get_internal_clock_params(dev->dev, &clock_params); |
568 | 571 | ||