IB/mlx5: Fill XRQ capabilities
authorArtemy Kovalyov <artemyko@mellanox.com>
Thu, 17 Aug 2017 12:52:09 +0000 (15:52 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 29 Aug 2017 12:30:19 +0000 (08:30 -0400)
Provide driver specific values for XRQ capabilities.

Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com>
Reviewed-by: Yossi Itigin <yosefe@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h

index 7ad585257fd3a9b98824203d51e7a038ba8489c8..ab3c562d5ba7f7fbfa95cb730576a64a2d038e49 100644 (file)
@@ -777,6 +777,16 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
                        1 << MLX5_CAP_GEN(dev->mdev, log_max_rq);
        }
 
+       if (MLX5_CAP_GEN(mdev, tag_matching)) {
+               props->xrq_caps.max_rndv_hdr_size = MLX5_TM_MAX_RNDV_MSG_SIZE;
+               props->xrq_caps.max_num_tags =
+                       (1 << MLX5_CAP_GEN(mdev, log_tag_matching_list_sz)) - 1;
+               props->xrq_caps.flags = IB_TM_CAP_RC;
+               props->xrq_caps.max_ops =
+                       1 << MLX5_CAP_GEN(mdev, log_max_qp_sz);
+               props->xrq_caps.max_sge = MLX5_TM_MAX_SGE;
+       }
+
        if (field_avail(typeof(resp), cqe_comp_caps, uhw->outlen)) {
                resp.cqe_comp_caps.max_num =
                        MLX5_CAP_GEN(dev->mdev, cqe_compression) ?
index b3380e8beacf7a6c2d0b00a8dca49b7bcdf2d5e6..189e80cd6b2f3c23955dd9bb228b8e1adebaef95 100644 (file)
@@ -107,6 +107,11 @@ enum {
        MLX5_CQE_VERSION_V1,
 };
 
+enum {
+       MLX5_TM_MAX_RNDV_MSG_SIZE       = 64,
+       MLX5_TM_MAX_SGE                 = 1,
+};
+
 struct mlx5_ib_vma_private_data {
        struct list_head list;
        struct vm_area_struct *vma;