All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Artemy Kovalyov
	<artemyko-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: [PATCH rdma-next 05/10] IB/uverbs: Expose XRQ capabilities
Date: Sun, 28 Aug 2016 14:00:45 +0300	[thread overview]
Message-ID: <1472382050-25908-6-git-send-email-leon@kernel.org> (raw)
In-Reply-To: <1472382050-25908-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

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

Make XRQ capabilities available via ibv_query_device() verb.

Signed-off-by: Artemy Kovalyov <artemyko-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Signed-off-by: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/infiniband/core/uverbs_cmd.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index e1fb1cd..548d4b4 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -4173,6 +4173,17 @@ int ib_uverbs_ex_query_device(struct ib_uverbs_file *file,
 
 	resp.device_cap_flags_ex = attr.device_cap_flags;
 	resp.response_length += sizeof(resp.device_cap_flags_ex);
+
+	if (ucore->outlen < resp.response_length + sizeof(resp.xrq_caps))
+		goto end;
+
+	resp.xrq_caps.max_unexpected_tags = attr.xrq_caps.max_unexpected_tags;
+	resp.xrq_caps.tag_mask_length = attr.xrq_caps.tag_mask_length;
+	resp.xrq_caps.header_size = attr.xrq_caps.header_size;
+	resp.xrq_caps.app_context_size = attr.xrq_caps.app_context_size;
+	resp.xrq_caps.max_match_list = attr.xrq_caps.max_match_list;
+	resp.xrq_caps.capability_flags = attr.xrq_caps.capability_flags;
+	resp.response_length += sizeof(resp.xrq_caps);
 end:
 	err = ib_copy_to_udata(ucore, &resp, resp.response_length);
 	return err;
-- 
2.7.4

--
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:[~2016-08-28 11:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-28 11:00 [PATCH rdma-next 00/10] Hardware tag matching support Leon Romanovsky
     [not found] ` <1472382050-25908-1-git-send-email-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-08-28 11:00   ` [PATCH rdma-next 01/10] IB/core: Add XRQ capabilities Leon Romanovsky
2016-08-28 11:00   ` [PATCH rdma-next 02/10] IB/core: Make CQ separate part of SRQ context Leon Romanovsky
2016-08-28 11:00   ` [PATCH rdma-next 03/10] IB/core: Add new SRQ type IB_SRQT_TAG_MATCHING Leon Romanovsky
2016-08-28 11:00   ` [PATCH rdma-next 04/10] IB/uverbs: Expose tag matching capabilties to UAPI Leon Romanovsky
2016-08-28 11:00   ` Leon Romanovsky [this message]
2016-08-28 11:00   ` [PATCH rdma-next 06/10] IB/uverbs: Add XRQ creation parameter " Leon Romanovsky
2016-08-28 11:00   ` [PATCH rdma-next 07/10] IB/uverbs: Add new SRQ type IB_SRQT_TAG_MATCHING Leon Romanovsky
2016-08-28 11:00   ` [PATCH rdma-next 08/10] IB/mlx5: Fill XRQ capabilities Leon Romanovsky
2016-08-28 11:00   ` [PATCH rdma-next 09/10] net/mlx5: Add XRQ support Leon Romanovsky
2016-08-28 11:00   ` [PATCH rdma-next 10/10] IB/mlx5: Support IB_SRQT_TAG_MATCHING Leon Romanovsky
2016-10-07 14:56   ` [PATCH rdma-next 00/10] Hardware tag matching support Leon Romanovsky
     [not found]     ` <20161007145620.GV9282-2ukJVAZIZ/Y@public.gmane.org>
2016-10-07 16:47       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A82373AB093986-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-10-13 14:15           ` Doug Ledford
     [not found]             ` <6259953b-27fe-77c9-ea90-af744f188671-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-13 17:02               ` Hefty, Sean
     [not found]                 ` <1828884A29C6694DAF28B7E6B8A82373AB095429-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-10-13 17:06                   ` Christoph Hellwig
     [not found]                     ` <20161013170641.GA9094-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-10-13 19:43                       ` Hefty, Sean
     [not found]                         ` <1828884A29C6694DAF28B7E6B8A82373AB095647-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-10-13 19:56                           ` Jason Gunthorpe
     [not found]                             ` <20161013195605.GA8077-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-10-13 20:02                               ` Christoph Hellwig
     [not found]                                 ` <20161013200208.GA8998-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2016-10-13 20:30                                   ` Doug Ledford
     [not found]                                     ` <a3495685-69c7-26a7-ba97-9761848535a8-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-10-13 20:47                                       ` Jason Gunthorpe
2016-10-13 21:23                                       ` Hefty, Sean
2016-10-14  4:19                                       ` Leon Romanovsky

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=1472382050-25908-6-git-send-email-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.