On 12/20/24 3:09 AM, Kees Bakker wrote: > 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? Hi, Kees, Thanks for pointing out this, and it has been fixed by Advait Dhamorikar. https://lore.kernel.org/lkml/173461061730.349703.2739528249042727020.b4-ty@xxxxxxxxxx/T/ Thanks, Cheng Xu