Re: [PATCH for-next v2 8/8] RDMA/erdma: Support UD QPs and UD WRs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Op 11-12-2024 om 03:09 schreef Boshi Yu:
The iWARP protocol supports only RC QPs previously. Now we add UD QPs
and UD WRs support for the RoCEv2 protocol.

Signed-off-by: Boshi Yu <boshiyu@xxxxxxxxxxxxxxxxx>
Reviewed-by: Cheng Xu <chengyou@xxxxxxxxxxxxxxxxx>
---
  drivers/infiniband/hw/erdma/erdma_cq.c    | 20 +++++++
  drivers/infiniband/hw/erdma/erdma_hw.h    | 37 +++++++++++-
  drivers/infiniband/hw/erdma/erdma_qp.c    | 71 ++++++++++++++++++-----
  drivers/infiniband/hw/erdma/erdma_verbs.c | 29 +++++++--
  4 files changed, 136 insertions(+), 21 deletions(-)

[...]
diff --git a/drivers/infiniband/hw/erdma/erdma_qp.c b/drivers/infiniband/hw/erdma/erdma_qp.c
index 03d93f026fca..4dfb4272ad86 100644
--- a/drivers/infiniband/hw/erdma/erdma_qp.c
+++ b/drivers/infiniband/hw/erdma/erdma_qp.c
@@ -398,17 +398,57 @@ static int fill_sgl(struct erdma_qp *qp, const struct ib_send_wr *send_wr,
  	return 0;
  }
+static void init_send_sqe_rc(struct erdma_qp *qp, struct erdma_send_sqe_rc *sqe,
+			     const struct ib_send_wr *wr, u32 *hw_op)
+{
+	u32 op = ERDMA_OP_SEND;
+
+	if (wr->opcode == IB_WR_SEND_WITH_IMM) {
+		op = ERDMA_OP_SEND_WITH_IMM;
+		sqe->imm_data = wr->ex.imm_data;
+	} else if (op == IB_WR_SEND_WITH_INV) {
+		op = ERDMA_OP_SEND_WITH_INV;
+		sqe->invalid_stag = cpu_to_le32(wr->ex.invalidate_rkey);
+	}
+
+	*hw_op = op;
+}
+
The else if condition is always false. Is there maybe a typo?
--
Kees




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux