The QP contains references to the protection domain (PD), memory regions (MR), address handles, completion queues (CQ), address handles (AH), etc. The QP should be destroyed before any other objects are destroyed so that the referenced object is not busy.
Signed-off-by: Ralph Campbell <[email protected]> diff --git a/src/rdma.c b/src/rdma.c index 845c35f..492d240 100644 --- a/src/rdma.c +++ b/src/rdma.c @@ -1577,6 +1577,10 @@ show_node_info(DEVICE *dev) static void rd_close(DEVICE *dev) { + if (Req.use_cm) + cm_close(dev); + else + ib_close(dev); if (dev->ah) ibv_destroy_ah(dev->ah); if (dev->cq) @@ -1585,10 +1589,6 @@ rd_close(DEVICE *dev) ibv_dealloc_pd(dev->pd); if (dev->channel) ibv_destroy_comp_channel(dev->channel); - if (Req.use_cm) - cm_close(dev); - else - ib_close(dev); rd_mrfree(dev); memset(dev, 0, sizeof(*dev)); _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
