Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1482741 > unrolled thread

[PATCH V2 for-next 0/9] IB/hns: Add CM(Connection Manager) Support to HNS RoCe Driver

Started bySalil Mehta <salil.mehta@huawei.com>
First post2016-09-13 22:00 +0200
Last post2016-09-13 22:00 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH V2 for-next 0/9] IB/hns: Add CM(Connection Manager) Support to HNS RoCe Driver Salil Mehta <salil.mehta@huawei.com> - 2016-09-13 22:00 +0200
    [PATCH V2 for-next 4/9] IB/hns: Fix two possible bugs for rdma cm Salil Mehta <salil.mehta@huawei.com> - 2016-09-13 22:00 +0200

#1482741 — [PATCH V2 for-next 0/9] IB/hns: Add CM(Connection Manager) Support to HNS RoCe Driver

FromSalil Mehta <salil.mehta@huawei.com>
Date2016-09-13 22:00 +0200
Subject[PATCH V2 for-next 0/9] IB/hns: Add CM(Connection Manager) Support to HNS RoCe Driver
Message-ID<sh225-6k1-3@gated-at.bofh.it>
This patch-set adds the CM(Connection Manager) support to the
HNS RoCE driver. Changes done are primarily to add support of
APIs in IB device and some fixes over the base driver to
support RDMA Connection Manager. This patch-set also updates
the Device binding document as new parameter node-guid was
added to the DT.

All of the patches have been authored by Oulijun and reviewed
by Huwei.

Change Log:
V1->V2: Addressed the comments from Leon Romanovsky. Please refer
        individual patch for details.

Lijun Ou (9):
  IB/hns: Register HNS RoCE Driver get_netdev() with IB Core
  IB/hns: Add & initialize "node_guid" parameter for RDMA CM
  IB/hns: Fix the value of device_cap_flags
  IB/hns: Fix two possible bugs for rdma cm
  IB/hns: Add phy_port for computing GSI/QPN
  IB/hns: Change the logic for allocating uar registers
  IB/hns: Fix the bug of rdma cm connecting on user mode
  IB/hns: Fix two bugs for rdma cm connecting
  IB/hns: Add node_guid definition to the bindings document

 .../bindings/infiniband/hisilicon-hns-roce.txt     |  2 +
 drivers/infiniband/hw/hns/hns_roce_device.h        |  4 +-
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c         | 80 +++++++++-------------
 drivers/infiniband/hw/hns/hns_roce_main.c          | 32 ++++++++-
 drivers/infiniband/hw/hns/hns_roce_pd.c            |  4 +-
 drivers/infiniband/hw/hns/hns_roce_qp.c            | 13 ++--
 6 files changed, 76 insertions(+), 59 deletions(-)

-- 
1.9.1

[toc] | [next] | [standalone]


#1482742 — [PATCH V2 for-next 4/9] IB/hns: Fix two possible bugs for rdma cm

FromSalil Mehta <salil.mehta@huawei.com>
Date2016-09-13 22:00 +0200
Subject[PATCH V2 for-next 4/9] IB/hns: Fix two possible bugs for rdma cm
Message-ID<sh226-6k1-31@gated-at.bofh.it>
In reply to#1482741
From: Lijun Ou <oulijun@huawei.com>

Fix the length of wqe that maybe lead to an error and
write the end bytes of QP1C into the register.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
index 399f5de..aaea95c 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
@@ -205,8 +205,7 @@ int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 				      (wr->send_flags & IB_SEND_FENCE ?
 				      (cpu_to_le32(HNS_ROCE_WQE_FENCE)) : 0);
 
-			wqe = (struct hns_roce_wqe_ctrl_seg *)wqe +
-			       sizeof(struct hns_roce_wqe_ctrl_seg);
+			wqe += sizeof(struct hns_roce_wqe_ctrl_seg);
 
 			switch (wr->opcode) {
 			case IB_WR_RDMA_READ:
@@ -235,8 +234,7 @@ int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 				break;
 			}
 			ctrl->flag |= cpu_to_le32(ps_opcode);
-			wqe = (struct hns_roce_wqe_raddr_seg *)wqe +
-			       sizeof(struct hns_roce_wqe_raddr_seg);
+			wqe += sizeof(struct hns_roce_wqe_raddr_seg);
 
 			dseg = wqe;
 			if (wr->send_flags & IB_SEND_INLINE && wr->num_sge) {
@@ -253,8 +251,7 @@ int hns_roce_v1_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
 					memcpy(wqe, ((void *) (uintptr_t)
 					       wr->sg_list[i].addr),
 					       wr->sg_list[i].length);
-					wqe = (struct hns_roce_wqe_raddr_seg *)
-					       wqe + wr->sg_list[i].length;
+					wqe += wr->sg_list[i].length;
 				}
 				ctrl->flag |= HNS_ROCE_WQE_INLINE;
 			} else {
@@ -1795,6 +1792,7 @@ static int hns_roce_v1_m_sqp(struct ib_qp *ibqp, const struct ib_qp_attr *attr,
 		writel(context->qp1c_bytes_28, addr + 6);
 		writel(context->qp1c_bytes_32, addr + 7);
 		writel(context->cur_sq_wqe_ba_l, addr + 8);
+		writel(context->qp1c_bytes_40, addr + 9);
 	}
 
 	/* Modify QP1C status */
-- 
1.9.1

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web