linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] nvmet-rdma: remove p2p_client initialization from fast-path
@ 2019-04-08 15:39 Max Gurtovoy
  2019-04-08 15:39 ` [PATCH 2/2] nvmet: rename nvme_completion instances from rsp to cqe Max Gurtovoy
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Max Gurtovoy @ 2019-04-08 15:39 UTC (permalink / raw)


Initialize it during command allocation.

Cc: Logan Gunthorpe <logang at deltatee.com>
Cc: Stephen Bates <sbates at raithlin.com>
Signed-off-by: Max Gurtovoy <maxg at mellanox.com>
---
 drivers/nvme/target/rdma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c
index ef893ad..b727521 100644
--- a/drivers/nvme/target/rdma.c
+++ b/drivers/nvme/target/rdma.c
@@ -373,6 +373,7 @@ static int nvmet_rdma_alloc_rsp(struct nvmet_rdma_device *ndev,
 	if (ib_dma_mapping_error(ndev->device, r->send_sge.addr))
 		goto out_free_rsp;
 
+	r->req.p2p_client = &ndev->device->dev;
 	r->send_sge.length = sizeof(*r->req.rsp);
 	r->send_sge.lkey = ndev->pd->local_dma_lkey;
 
@@ -763,8 +764,6 @@ static void nvmet_rdma_handle_command(struct nvmet_rdma_queue *queue,
 		cmd->send_sge.addr, cmd->send_sge.length,
 		DMA_TO_DEVICE);
 
-	cmd->req.p2p_client = &queue->dev->device->dev;
-
 	if (!nvmet_req_init(&cmd->req, &queue->nvme_cq,
 			&queue->nvme_sq, &nvmet_rdma_ops))
 		return;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-04-09 10:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-08 15:39 [PATCH 1/2] nvmet-rdma: remove p2p_client initialization from fast-path Max Gurtovoy
2019-04-08 15:39 ` [PATCH 2/2] nvmet: rename nvme_completion instances from rsp to cqe Max Gurtovoy
2019-04-08 19:04   ` Chaitanya Kulkarni
2019-04-09 10:10   ` Christoph Hellwig
2019-04-08 16:04 ` [PATCH 1/2] nvmet-rdma: remove p2p_client initialization from fast-path Logan Gunthorpe
2019-04-08 16:26   ` Max Gurtovoy
2019-04-08 16:35     ` Logan Gunthorpe
2019-04-08 16:59       ` Max Gurtovoy
2019-04-09 10:10 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).