aboutsummaryrefslogtreecommitdiff
path: root/hw/rdma/rdma_rm.c
diff options
context:
space:
mode:
authorYuval Shaia <yuval.shaia@oracle.com>2019-03-11 03:29:11 -0700
committerMarcel Apfelbaum <marcel.apfelbaum@gmail.com>2019-03-16 15:52:44 +0200
commitbf4414515b468c0a4ca69f1450bfe65418022955 (patch)
treee0e2a604c711f0218376dd6285f638dfce85faaa /hw/rdma/rdma_rm.c
parentff30a446b1d13373d35417d77d80b11cfde3fc6c (diff)
downloadqemu-bf4414515b468c0a4ca69f1450bfe65418022955.zip
qemu-bf4414515b468c0a4ca69f1450bfe65418022955.tar.gz
qemu-bf4414515b468c0a4ca69f1450bfe65418022955.tar.bz2
hw/rdma: Free all receive buffers when QP is destroyed
When QP is destroyed the backend QP is destroyed as well. This ensures we clean all received buffer we posted to it. However, a contexts of these buffers are still remain in the device. Fix it by maintaining a list of buffer's context and free them when QP is destroyed. Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com> Message-Id: <1552300155-25216-8-git-send-email-yuval.shaia@oracle.com> Reviewed-by: Kamal Heib <kamalheib1@gmail.com> Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Diffstat (limited to 'hw/rdma/rdma_rm.c')
-rw-r--r--hw/rdma/rdma_rm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c
index b50e192..bac3b2f 100644
--- a/hw/rdma/rdma_rm.c
+++ b/hw/rdma/rdma_rm.c
@@ -537,7 +537,7 @@ void rdma_rm_dealloc_qp(RdmaDeviceResources *dev_res, uint32_t qp_handle)
return;
}
- rdma_backend_destroy_qp(&qp->backend_qp);
+ rdma_backend_destroy_qp(&qp->backend_qp, dev_res);
rdma_res_tbl_dealloc(&dev_res->qp_tbl, qp->qpn);
}