diff options
author | Max Gurtovoy <maxg@mellanox.com> | 2019-04-08 18:39:58 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-04-25 17:41:26 +0300 |
commit | 8dc2ed3f3e5ba245828ad89968f6818be8996e9d (patch) | |
tree | 07206ad42c05fd4c83ac3e34f268cb4815fa82f1 /drivers/nvme/target | |
parent | 95f18c9d1310730d075499a75aaf13bcd60405a7 (diff) | |
download | linux-8dc2ed3f3e5ba245828ad89968f6818be8996e9d.tar.xz |
nvmet-rdma: remove p2p_client initialization from fast-path
Initialize it during command allocation.
Cc: Logan Gunthorpe <logang@deltatee.com>
Cc: Stephen Bates <sbates@raithlin.com>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target')
-rw-r--r-- | drivers/nvme/target/rdma.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c index ef893addf341..b7275218dfa5 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; |