public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Selvin Xavier <selvin.xavier@broadcom.com>
To: dledford@redhat.com, linux-rdma@vger.kernel.org
Cc: netdev@vger.kernel.org, michael.chan@broadcom.com,
	Selvin Xavier <selvin.xavier@broadcom.com>,
	Eddie Wai <eddie.wai@broadcom.com>,
	Devesh Sharma <devesh.sharma@broadcom.com>,
	Somnath Kotur <somnath.kotur@broadcom.com>,
	Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Subject: [PATCH for bnxt_re V3 19/21] bnxt_re: Set uverbs command mask
Date: Tue, 20 Dec 2016 01:13:29 -0800	[thread overview]
Message-ID: <1482225211-22423-20-git-send-email-selvin.xavier@broadcom.com> (raw)
In-Reply-To: <1482225211-22423-1-git-send-email-selvin.xavier@broadcom.com>

This patch exports available uverbs command mask to the IB stack.
Also, populates some of the missing parameters in the ibdev structure
used for registration.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: Devesh Sharma <devesh.sharma@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
---
 drivers/infiniband/hw/bnxtre/bnxt_re_main.c | 35 +++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/drivers/infiniband/hw/bnxtre/bnxt_re_main.c b/drivers/infiniband/hw/bnxtre/bnxt_re_main.c
index ba082f1..035e85a 100644
--- a/drivers/infiniband/hw/bnxtre/bnxt_re_main.c
+++ b/drivers/infiniband/hw/bnxtre/bnxt_re_main.c
@@ -61,6 +61,7 @@
 #include "bnxt_qplib_rcfw.h"
 #include "bnxt_re.h"
 #include "bnxt_re_ib_verbs.h"
+#include <rdma/bnxtre-abi.h>
 #include "bnxt.h"
 static char version[] =
 		BNXT_RE_DESC " v" ROCE_DRV_MODULE_VERSION "\n";
@@ -435,8 +436,42 @@ static int bnxt_re_register_ib(struct bnxt_re_dev *rdev)
 		strlen(BNXT_RE_DESC) + 5);
 	ibdev->phys_port_cnt = 1;
 
+	bnxt_qplib_get_guid(rdev->netdev->dev_addr, (u8 *)&ibdev->node_guid);
+
 	ibdev->num_comp_vectors	= 1;
 	ibdev->dma_device = &rdev->en_dev->pdev->dev;
+	ibdev->local_dma_lkey = BNXT_QPLIB_RSVD_LKEY;
+
+	/* User space */
+	ibdev->uverbs_abi_ver = BNXT_RE_ABI_VERSION;
+	ibdev->uverbs_cmd_mask =
+			(1ull << IB_USER_VERBS_CMD_GET_CONTEXT)		|
+			(1ull << IB_USER_VERBS_CMD_QUERY_DEVICE)	|
+			(1ull << IB_USER_VERBS_CMD_QUERY_PORT)		|
+			(1ull << IB_USER_VERBS_CMD_ALLOC_PD)		|
+			(1ull << IB_USER_VERBS_CMD_DEALLOC_PD)		|
+			(1ull << IB_USER_VERBS_CMD_REG_MR)		|
+			(1ull << IB_USER_VERBS_CMD_REREG_MR)		|
+			(1ull << IB_USER_VERBS_CMD_DEREG_MR)		|
+			(1ull << IB_USER_VERBS_CMD_CREATE_COMP_CHANNEL) |
+			(1ull << IB_USER_VERBS_CMD_CREATE_CQ)		|
+			(1ull << IB_USER_VERBS_CMD_RESIZE_CQ)		|
+			(1ull << IB_USER_VERBS_CMD_DESTROY_CQ)		|
+			(1ull << IB_USER_VERBS_CMD_CREATE_QP)		|
+			(1ull << IB_USER_VERBS_CMD_MODIFY_QP)		|
+			(1ull << IB_USER_VERBS_CMD_QUERY_QP)		|
+			(1ull << IB_USER_VERBS_CMD_DESTROY_QP)		|
+			(1ull << IB_USER_VERBS_CMD_CREATE_SRQ)		|
+			(1ull << IB_USER_VERBS_CMD_MODIFY_SRQ)		|
+			(1ull << IB_USER_VERBS_CMD_QUERY_SRQ)		|
+			(1ull << IB_USER_VERBS_CMD_DESTROY_SRQ)		|
+			(1ull << IB_USER_VERBS_CMD_CREATE_AH)		|
+			(1ull << IB_USER_VERBS_CMD_MODIFY_AH)		|
+			(1ull << IB_USER_VERBS_CMD_QUERY_AH)		|
+			(1ull << IB_USER_VERBS_CMD_DESTROY_AH);
+	/* POLL_CQ and REQ_NOTIFY_CQ is directly handled in libbnxt_re */
+
+	/* Kernel verbs */
 	ibdev->query_device		= bnxt_re_query_device;
 	ibdev->modify_device		= bnxt_re_modify_device;
 
-- 
2.5.5

  parent reply	other threads:[~2016-12-20  9:13 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-20  9:13 [PATCH for bnxt_re V3 00/21] Broadcom RoCE Driver (bnxt_re) Selvin Xavier
2016-12-20  9:13 ` [PATCH for bnxt_re V3 01/21] bnxt_re: Add bnxt_re RoCE driver files Selvin Xavier
2016-12-20  9:13 ` [PATCH for bnxt_re V3 03/21] bnxt_re: register with the NIC driver Selvin Xavier
2017-01-15 19:41   ` Leon Romanovsky
2017-01-16  8:08     ` Selvin Xavier
2017-01-16  8:33       ` Leon Romanovsky
2016-12-20  9:13 ` [PATCH for bnxt_re V3 04/21] bnxt_re: Enabling RoCE control path Selvin Xavier
2016-12-20  9:13 ` [PATCH for bnxt_re V3 05/21] bnxt_re: Adding Notification Queue support Selvin Xavier
2016-12-20  9:13 ` [PATCH for bnxt_re V3 06/21] bnxt_re: Support for PD, ucontext and mmap verbs Selvin Xavier
2016-12-20  9:13 ` [PATCH for bnxt_re V3 07/21] bnxt_re: Support for query and modify device verbs Selvin Xavier
2016-12-20  9:13 ` [PATCH for bnxt_re V3 09/21] bnxt_re: Support for GID related verbs Selvin Xavier
2016-12-20  9:13 ` [PATCH for bnxt_re V3 12/21] bnxt_re: Support memory registration verbs Selvin Xavier
2016-12-20  9:13 ` [PATCH for bnxt_re V3 14/21] bnxt_re: Support post_send verb Selvin Xavier
2016-12-20  9:13 ` [PATCH for bnxt_re V3 15/21] bnxt_re: Support post_recv Selvin Xavier
2016-12-20  9:13 ` [PATCH for bnxt_re V3 18/21] bnxt_re: Support for DCB Selvin Xavier
2016-12-20  9:13 ` Selvin Xavier [this message]
     [not found] ` <1482225211-22423-1-git-send-email-selvin.xavier-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2016-12-20  9:13   ` [PATCH for bnxt_re V3 02/21] bnxt_re: Introducing autogenerated Host Software Interface(hsi) file Selvin Xavier
2016-12-20  9:13   ` [PATCH for bnxt_re V3 08/21] bnxt_re: Adding support for port related verbs Selvin Xavier
2016-12-20  9:13   ` [PATCH for bnxt_re V3 10/21] bnxt_re: Support for CQ verbs Selvin Xavier
2016-12-20  9:13   ` [PATCH for bnxt_re V3 11/21] bnxt_re: Support for AH verbs Selvin Xavier
2016-12-20  9:13   ` [PATCH for bnxt_re V3 13/21] bnxt_re: Support QP verbs Selvin Xavier
2016-12-20  9:13   ` [PATCH for bnxt_re V3 16/21] bnxt_re: Support poll_cq verb Selvin Xavier
2016-12-20  9:13   ` [PATCH for bnxt_re V3 17/21] bnxt_re: Handling dispatching of events to IB stack Selvin Xavier
2016-12-20  9:13   ` [PATCH for bnxt_re V3 20/21] bnxt_re: Add QP event handling Selvin Xavier
2016-12-20  9:13   ` [PATCH for bnxt_re V3 21/21] bnxt_re: Add bnxt_re driver build support Selvin Xavier
2016-12-20 14:28   ` [PATCH for bnxt_re V3 00/21] Broadcom RoCE Driver (bnxt_re) 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=1482225211-22423-20-git-send-email-selvin.xavier@broadcom.com \
    --to=selvin.xavier@broadcom.com \
    --cc=devesh.sharma@broadcom.com \
    --cc=dledford@redhat.com \
    --cc=eddie.wai@broadcom.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=somnath.kotur@broadcom.com \
    --cc=sriharsha.basavapatna@broadcom.com \
    /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