NA OFI: close wait set after completion queue is closed
@@ -1538,26 +1538,26 @@ na_ofi_endpoint_close(struct na_ofi_endpoint *na_ofi_endpoint)
na_ofi_endpoint->noe_ep = NULL;
}
- /* Close wait set */
- if (na_ofi_endpoint->noe_wait) {
- rc = fi_close(&na_ofi_endpoint->noe_wait->fid);
+ /* Close completion queue */
+ if (na_ofi_endpoint->noe_cq) {
+ rc = fi_close(&na_ofi_endpoint->noe_cq->fid);
if (rc != 0) {
- NA_LOG_ERROR("fi_close wait failed, rc: %d(%s).", rc, fi_strerror(-rc));
+ NA_LOG_ERROR("fi_close CQ failed, rc: %d(%s).", rc, fi_strerror(-rc));
ret = NA_PROTOCOL_ERROR;
goto out;
}
- na_ofi_endpoint->noe_wait = NULL;
+ na_ofi_endpoint->noe_cq = NULL;
}
- /* Close completion queue */
- if (na_ofi_endpoint->noe_cq) {
- rc = fi_close(&na_ofi_endpoint->noe_cq->fid);
+ /* Close wait set */
+ if (na_ofi_endpoint->noe_wait) {
+ rc = fi_close(&na_ofi_endpoint->noe_wait->fid);
if (rc != 0) {
- NA_LOG_ERROR("fi_close CQ failed, rc: %d(%s).", rc, fi_strerror(-rc));
+ NA_LOG_ERROR("fi_close wait failed, rc: %d(%s).", rc, fi_strerror(-rc));
ret = NA_PROTOCOL_ERROR;
goto out;
}
- na_ofi_endpoint->noe_cq = NULL;
+ na_ofi_endpoint->noe_wait = NULL;
}
/* Free OFI info */
