Cleanup allocated completion channels.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
dapl_os_sleep_usec(1000);\r
}\r
bail:\r
+ if (hca_ptr->ib_trans.ib_cq)\r
+ ibv_destroy_comp_channel(hca_ptr->ib_trans.ib_cq);\r
+\r
+ if (hca_ptr->ib_trans.ib_cq_empty) {\r
+ struct ibv_comp_channel *channel;\r
+ channel = hca_ptr->ib_trans.ib_cq_empty->channel;\r
+ ibv_destroy_cq(hca_ptr->ib_trans.ib_cq_empty);\r
+ ibv_destroy_comp_channel(channel);\r
+ }\r
+\r
if (hca_ptr->ib_hca_handle != IB_INVALID_HANDLE) {\r
if (rdma_destroy_id(hca_ptr->ib_trans.cm_id))\r
return (dapl_convert_errno(errno, "ib_close_device"));\r
}\r
\r
out:\r
+ if (hca_ptr->ib_trans.ib_cq)\r
+ ibv_destroy_comp_channel(hca_ptr->ib_trans.ib_cq);\r
+\r
+ if (hca_ptr->ib_trans.ib_cq_empty) {\r
+ struct ibv_comp_channel *channel;\r
+ channel = hca_ptr->ib_trans.ib_cq_empty->channel;\r
+ ibv_destroy_cq(hca_ptr->ib_trans.ib_cq_empty);\r
+ ibv_destroy_comp_channel(channel);\r
+ }\r
+\r
if (hca_ptr->ib_hca_handle != IB_INVALID_HANDLE) {\r
if (ibv_close_device(hca_ptr->ib_hca_handle))\r
return (dapl_convert_errno(errno, "ib_close_device"));\r
destroy_os_signal(hca_ptr);
ucm_service_destroy(hca_ptr);
+ if (hca_ptr->ib_trans.ib_cq)\r
+ ibv_destroy_comp_channel(hca_ptr->ib_trans.ib_cq);\r
+\r
+ if (hca_ptr->ib_trans.ib_cq_empty) {\r
+ struct ibv_comp_channel *channel;\r
+ channel = hca_ptr->ib_trans.ib_cq_empty->channel;\r
+ ibv_destroy_cq(hca_ptr->ib_trans.ib_cq_empty);\r
+ ibv_destroy_comp_channel(channel);\r
+ }\r
+
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"));