]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
destroy verbs completion channels created via ia_open or ep_create.
authorArlin Davis <arlin.r.davis@intel.com>
Thu, 4 Feb 2010 00:21:30 +0000 (16:21 -0800)
committerArlin Davis <arlin.r.davis@intel.com>
Thu, 4 Feb 2010 00:21:30 +0000 (16:21 -0800)
Completion channels are created with ia_open for CNO events and
with ep_create in cases where DAT allows EP(qp) to be created with
no EVD(cq) and IB doesn't. These completion channels need to be
destroyed at close along with a CQ for the EP without CQ case.

Signed-off-by: Arlin Davis <arlin.r.davis@intel.com>
dapl/openib_cma/device.c
dapl/openib_scm/device.c
dapl/openib_ucm/device.c

index 7ab05aa3fb7148dfaa8b0b12f7b7d9adbd4dc1de..12593cf4b38b92a0f038235dd844c2f8e874c726 100644 (file)
@@ -502,6 +502,17 @@ DAT_RETURN dapls_ib_close_hca(IN DAPL_HCA * hca_ptr)
                dapl_os_sleep_usec(1000);
        }
 bail:
+
+       if (hca_ptr->ib_trans.ib_cq)
+               ibv_destroy_comp_channel(hca_ptr->ib_trans.ib_cq);
+
+       if (hca_ptr->ib_trans.ib_cq_empty) {
+               struct ibv_comp_channel *channel;
+               channel = hca_ptr->ib_trans.ib_cq_empty->channel;
+               ibv_destroy_cq(hca_ptr->ib_trans.ib_cq_empty);
+               ibv_destroy_comp_channel(channel);
+       }
+
        if (hca_ptr->ib_hca_handle != IB_INVALID_HANDLE) {
                if (rdma_destroy_id(hca_ptr->ib_trans.cm_id))
                        return (dapl_convert_errno(errno, "ib_close_device"));
index 35d4c457f5c854a9ac082a4e9841d5be5c9da460..eb87a85b977af407df023ebcdff8f6dc2ced030d 100644 (file)
@@ -504,6 +504,16 @@ DAT_RETURN dapls_ib_close_hca(IN DAPL_HCA * hca_ptr)
        }
 
 out:
+       if (hca_ptr->ib_trans.ib_cq)
+               ibv_destroy_comp_channel(hca_ptr->ib_trans.ib_cq);
+
+       if (hca_ptr->ib_trans.ib_cq_empty) {
+               struct ibv_comp_channel *channel;
+               channel = hca_ptr->ib_trans.ib_cq_empty->channel;
+               ibv_destroy_cq(hca_ptr->ib_trans.ib_cq_empty);
+               ibv_destroy_comp_channel(channel);
+       }
+
        if (hca_ptr->ib_hca_handle != IB_INVALID_HANDLE) {
                if (ibv_close_device(hca_ptr->ib_hca_handle))
                        return (dapl_convert_errno(errno, "ib_close_device"));
index e890eefff056d73325c51858f05e0d4e82543b9f..1f324b352deeaeea560a5d5b9a94b6a3fe29cf0d 100644 (file)
@@ -401,6 +401,16 @@ DAT_RETURN dapls_ib_close_hca(IN DAPL_HCA * hca_ptr)
        destroy_os_signal(hca_ptr);
        ucm_service_destroy(hca_ptr);
 
+       if (hca_ptr->ib_trans.ib_cq)
+               ibv_destroy_comp_channel(hca_ptr->ib_trans.ib_cq);
+
+       if (hca_ptr->ib_trans.ib_cq_empty) {
+               struct ibv_comp_channel *channel;
+               channel = hca_ptr->ib_trans.ib_cq_empty->channel;
+               ibv_destroy_cq(hca_ptr->ib_trans.ib_cq_empty);
+               ibv_destroy_comp_channel(channel);
+       }
+
        if (hca_ptr->ib_hca_handle != IB_INVALID_HANDLE) {
                if (ibv_close_device(hca_ptr->ib_hca_handle))
                        return (dapl_convert_errno(errno, "ib_close_device"));