Thread (2 messages) 2 messages, 2 authors, 2017-01-18

Re: [PATCH for bnxt_re V4 09/21] RDMA/bnxt_re: Support for GID related verbs

From: Leon Romanovsky <leon@kernel.org>
Date: 2017-01-18 09:50:15
Also in: linux-rdma

On Wed, Dec 21, 2016 at 03:41:58AM -0800, Selvin Xavier wrote:
Implements add GID, del GID,  get_netdev and pkey related verbs.

v3: Fixes some sparse warning related to endianness check. Removes
    macros which are just wrapper for standard defines.

Signed-off-by: Eddie Wai <redacted>
Signed-off-by: Devesh Sharma <redacted>
Signed-off-by: Somnath Kotur <redacted>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
---
 drivers/infiniband/hw/bnxt_re/ib_verbs.c  | 123 +++++++++++++++++
 drivers/infiniband/hw/bnxt_re/ib_verbs.h  |  18 +++
 drivers/infiniband/hw/bnxt_re/main.c      |   7 +
 drivers/infiniband/hw/bnxt_re/qplib_res.c |   5 +
 drivers/infiniband/hw/bnxt_re/qplib_res.h |   3 +
 drivers/infiniband/hw/bnxt_re/qplib_sp.c  | 218 ++++++++++++++++++++++++++++++
 drivers/infiniband/hw/bnxt_re/qplib_sp.h  |  11 ++
 7 files changed, 385 insertions(+)
<snip>
quoted hunk ↗ jump to hunk
+
+int bnxt_qplib_del_sgid(struct bnxt_qplib_sgid_tbl *sgid_tbl,
+			struct bnxt_qplib_gid *gid, bool update)
+{
+	struct bnxt_qplib_res *res = to_bnxt_qplib(sgid_tbl,
+						   struct bnxt_qplib_res,
+						   sgid_tbl);
+	struct bnxt_qplib_rcfw *rcfw = res->rcfw;
+	int index;
+
+	if (!sgid_tbl) {
+		dev_err(&res->pdev->dev, "QPLIB: SGID table not allocated");
+		return -EINVAL;
+	}
+	/* Do we need a sgid_lock here? */
It is better to answer on this question before acceptance.
quoted hunk ↗ jump to hunk
+	if (!sgid_tbl->active) {
+		dev_err(&res->pdev->dev,
+			"QPLIB: SGID table has no active entries");
+		return -ENOMEM;
+	}

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help