From bf4414515b468c0a4ca69f1450bfe65418022955 Mon Sep 17 00:00:00 2001 From: Yuval Shaia Date: Mon, 11 Mar 2019 03:29:11 -0700 Subject: 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 Reviewed-by: Marcel Apfelbaum Message-Id: <1552300155-25216-8-git-send-email-yuval.shaia@oracle.com> Reviewed-by: Kamal Heib Signed-off-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/rdma/rdma_rm.c') diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index b50e192b49..bac3b2f4a6 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); } -- cgit v1.2.3