* [PATCH 1/1] nvme-rdma: Introduce nvme_rdma_destroy_qp
@ 2017-11-01 12:51 Max Gurtovoy
2017-11-03 7:02 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Max Gurtovoy @ 2017-11-01 12:51 UTC (permalink / raw)
QP object is created using rdma_cm api, therefore the destruction
should use the same api for symmetry.
Signed-off-by: Max Gurtovoy <maxg at mellanox.com>
---
drivers/nvme/host/rdma.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 87bac27..d955cbc 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -267,6 +267,12 @@ static int nvme_rdma_create_qp(struct nvme_rdma_queue *queue, const int factor)
return ret;
}
+static void nvme_rdma_destroy_qp(struct nvme_rdma_queue *queue)
+{
+ rdma_destroy_qp(queue->cm_id);
+ queue->qp = NULL;
+}
+
static int nvme_rdma_reinit_request(void *data, struct request *rq)
{
struct nvme_rdma_ctrl *ctrl = data;
@@ -439,7 +445,7 @@ static void nvme_rdma_destroy_queue_ib(struct nvme_rdma_queue *queue)
dev = queue->device;
ibdev = dev->dev;
- rdma_destroy_qp(queue->cm_id);
+ nvme_rdma_destroy_qp(queue);
ib_free_cq(queue->ib_cq);
nvme_rdma_free_ring(ibdev, queue->rsp_ring, queue->queue_size,
@@ -493,7 +499,7 @@ static int nvme_rdma_create_queue_ib(struct nvme_rdma_queue *queue)
return 0;
out_destroy_qp:
- ib_destroy_qp(queue->qp);
+ nvme_rdma_destroy_qp(queue);
out_destroy_ib_cq:
ib_free_cq(queue->ib_cq);
out_put_dev:
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 1/1] nvme-rdma: Introduce nvme_rdma_destroy_qp
2017-11-01 12:51 [PATCH 1/1] nvme-rdma: Introduce nvme_rdma_destroy_qp Max Gurtovoy
@ 2017-11-03 7:02 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2017-11-03 7:02 UTC (permalink / raw)
On Wed, Nov 01, 2017@02:51:46PM +0200, Max Gurtovoy wrote:
> QP object is created using rdma_cm api, therefore the destruction
> should use the same api for symmetry.
Please resend against current nvme-4.15.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-03 7:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-01 12:51 [PATCH 1/1] nvme-rdma: Introduce nvme_rdma_destroy_qp Max Gurtovoy
2017-11-03 7:02 ` 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).