linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Artemy Kovalyov
	<artemyko-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: [rdma-next v1 REPOST 07/10] IB/mlx5: Fill XRQ capabilities
Date: Thu, 17 Aug 2017 15:52:09 +0300	[thread overview]
Message-ID: <20170817125212.3173-8-leon@kernel.org> (raw)
In-Reply-To: <20170817125212.3173-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

From: Artemy Kovalyov <artemyko-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Provide driver specific values for XRQ capabilities.

Signed-off-by: Artemy Kovalyov <artemyko-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Reviewed-by: Yossi Itigin <yosefe-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/infiniband/hw/mlx5/main.c    | 10 ++++++++++
 drivers/infiniband/hw/mlx5/mlx5_ib.h |  5 +++++
 2 files changed, 15 insertions(+)

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index e9ea759f35dd..894aec4a7c9d 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,
 			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) ?
diff --git a/drivers/infiniband/hw/mlx5/mlx5_ib.h b/drivers/infiniband/hw/mlx5/mlx5_ib.h
index 7ac991070020..76a731f39d2b 100644
--- a/drivers/infiniband/hw/mlx5/mlx5_ib.h
+++ b/drivers/infiniband/hw/mlx5/mlx5_ib.h
@@ -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;
--
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-08-17 12:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-17 12:52 [pull request][rdma-next v1 REPOST 00/10] Hardware tag matching support Leon Romanovsky
     [not found] ` <20170817125212.3173-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-08-17 12:52   ` [rdma-next v1 REPOST 01/10] IB/core: Add XRQ capabilities Leon Romanovsky
2017-08-17 12:52   ` [rdma-next v1 REPOST 02/10] IB/core: Separate CQ handle in SRQ context Leon Romanovsky
2017-08-17 12:52   ` [rdma-next v1 REPOST 03/10] IB/core: Add new SRQ type IB_SRQT_TM Leon Romanovsky
2017-08-17 12:52   ` [rdma-next v1 REPOST 04/10] IB/uverbs: Add XRQ creation parameter to UAPI Leon Romanovsky
2017-08-17 12:52   ` [rdma-next v1 REPOST 05/10] IB/uverbs: Add new SRQ type IB_SRQT_TM Leon Romanovsky
2017-08-17 12:52   ` [rdma-next v1 REPOST 06/10] IB/uverbs: Expose XRQ capabilities Leon Romanovsky
2017-08-17 12:52   ` Leon Romanovsky [this message]
2017-08-17 12:52   ` [rdma-next v1 REPOST 08/10] net/mlx5: Add XRQ support Leon Romanovsky
2017-08-17 12:52   ` [rdma-next v1 REPOST 09/10] IB/mlx5: Support IB_SRQT_TM Leon Romanovsky
2017-08-17 12:52   ` [rdma-next v1 REPOST 10/10] Documentation: Hardware tag matching Leon Romanovsky
     [not found]     ` <20170817125212.3173-11-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-08-21 16:04       ` Jason Gunthorpe
     [not found]         ` <20170821160437.GD4401-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-22  8:28           ` Leon Romanovsky
2017-08-24 19:56   ` [pull request][rdma-next v1 REPOST 00/10] Hardware tag matching support Doug Ledford
     [not found]     ` <1503604595.78641.39.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-08-24 20:10       ` Doug Ledford
     [not found]         ` <1503605434.78641.41.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-08-24 20:53           ` Doug Ledford
     [not found]             ` <1503608030.78641.57.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-08-27  6:08               ` Leon Romanovsky
     [not found]                 ` <20170827060839.GO1724-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-08-27  6:14                   ` Leon Romanovsky
2017-08-29  0:03                   ` Doug Ledford
2017-08-29  0:37   ` Doug Ledford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170817125212.3173-8-leon@kernel.org \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=artemyko-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).