[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20241115103149.2312-1-rex.nie@jaguarmicro.com>
Date: Fri, 15 Nov 2024 18:31:49 +0800
From: Rex Nie <rex.nie@...uarmicro.com>
To: kbusch@...nel.org,
axboe@...nel.dk,
hch@....de,
sagi@...mberg.me
Cc: linux-nvme@...ts.infradead.org,
linux-kernel@...r.kernel.org,
angus.chen@...uarmicro.com,
lege.wang@...uarmicro.com,
foryun.ma@...uarmicro.com,
Rex Nie <rex.nie@...uarmicro.com>
Subject: [PATCH] nvme-rdma: add IB_SEND_SIGNALED in wr.send_flags
Since reg_cqe.done is assigned(to nvme_rdma_memreg_done/nvme_rdma_sig_done
here), it means done callback need be called when work complete. The done
callback will only be called if IB_SEND_SIGNALED is set in wr.send_flags.
Signed-off-by: Rex Nie <rex.nie@...uarmicro.com>
---
drivers/nvme/host/rdma.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 24a2759798d0..d25ee7ffca45 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1337,6 +1337,7 @@ static int nvme_rdma_map_sg_fr(struct nvme_rdma_queue *queue,
req->reg_wr.wr.opcode = IB_WR_REG_MR;
req->reg_wr.wr.wr_cqe = &req->reg_cqe;
req->reg_wr.wr.num_sge = 0;
+ req->reg_wr.wr.send_flags = IB_SEND_SIGNALED;
req->reg_wr.mr = req->mr;
req->reg_wr.key = req->mr->rkey;
req->reg_wr.access = IB_ACCESS_LOCAL_WRITE |
@@ -1443,7 +1444,7 @@ static int nvme_rdma_map_sg_pi(struct nvme_rdma_queue *queue,
wr->wr.opcode = IB_WR_REG_MR_INTEGRITY;
wr->wr.wr_cqe = &req->reg_cqe;
wr->wr.num_sge = 0;
- wr->wr.send_flags = 0;
+ wr->wr.send_flags = IB_SEND_SIGNALED;
wr->mr = req->mr;
wr->key = req->mr->rkey;
wr->access = IB_ACCESS_LOCAL_WRITE |
--
2.17.1
Powered by blists - more mailing lists