aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtemy Kovalyov <artemyko@mellanox.com>2017-08-17 08:52:09 -0400
committerDoug Ledford <dledford@redhat.com>2017-08-29 08:30:19 -0400
commiteb761894351d0372248f2636c213d7b822e8775f (patch)
treeb8c436d1f516d83e938f9a7e3bf7f308476baa24
parent8d50505ada728258fcdce99120b937ce68298c4e (diff)
IB/mlx5: Fill XRQ capabilities
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>
-rw-r--r--drivers/infiniband/hw/mlx5/main.c10
-rw-r--r--drivers/infiniband/hw/mlx5/mlx5_ib.h5
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 7ad585257fd3..ab3c562d5ba7 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -777,6 +777,16 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
777 1 << MLX5_CAP_GEN(dev->mdev, log_max_rq); 777 1 << MLX5_CAP_GEN(dev->mdev, log_max_rq);
778 } 778 }
779 779
780 if (MLX5_CAP_GEN(mdev, tag_matching)) {
781 props->xrq_caps.max_rndv_hdr_size = MLX5_TM_MAX_RNDV_MSG_SIZE;
782 props->xrq_caps.max_num_tags =
783 (1 << MLX5_CAP_GEN(mdev, log_tag_matching_list_sz)) - 1;
784 props->xrq_caps.flags = IB_TM_CAP_RC;
785 props->xrq_caps.max_ops =
786 1 << MLX5_CAP_GEN(mdev, log_max_qp_sz);
787 props->xrq_caps.max_sge = MLX5_TM_MAX_SGE;
788 }
789
780 if (field_avail(typeof(resp), cqe_comp_caps, uhw->outlen)) { 790 if (field_avail(typeof(resp), cqe_comp_caps, uhw->outlen)) {
781 resp.cqe_comp_caps.max_num = 791 resp.cqe_comp_caps.max_num =
782 MLX5_CAP_GEN(dev->mdev, cqe_compression) ? 792 MLX5_CAP_GEN(dev->mdev, cqe_compression) ?
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index b3380e8beacf..189e80cd6b2f 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -107,6 +107,11 @@ enum {
107 MLX5_CQE_VERSION_V1, 107 MLX5_CQE_VERSION_V1,
108}; 108};
109 109
110enum {
111 MLX5_TM_MAX_RNDV_MSG_SIZE = 64,
112 MLX5_TM_MAX_SGE = 1,
113};
114
110struct mlx5_ib_vma_private_data { 115struct mlx5_ib_vma_private_data {
111 struct list_head list; 116 struct list_head list;
112 struct vm_area_struct *vma; 117 struct vm_area_struct *vma;