Skip to content

Commit

Permalink
Merge pull request #3692 from yosefe/topic/ibv-create-cq-ex-fallback-…
Browse files Browse the repository at this point in the history
…v1.6.x

UCT/IB: Fallback to ibv_create_cq() if ibv_create_cq_ex() returns ENOSYS - v1.6.x
  • Loading branch information
yosefe authored Jun 12, 2019
2 parents c24e1c6 + e7cf1b7 commit 82a0649
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Bugfixes:
- Fixing the wrong name of aliases
- Fix data race in UCP wireup
- Fix segfault when libuct.so is reloaded - issue #3558
- Fallback to ibv_create_cq() if ibv_create_cq_ex() returns ENOSYS

Tested configurations:
- RDMA: MLNX_OFED 4.5, distribution inbox drivers, rdma-core 22.1
Expand Down
9 changes: 6 additions & 3 deletions src/uct/ib/base/ib_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,16 +588,19 @@ ucs_status_t uct_ib_verbs_create_cq(struct ibv_context *context, int cqe,
}

cq = ibv_cq_ex_to_cq(ibv_create_cq_ex(context, &cq_attr));
#else
cq = ibv_create_cq(context, cqe, NULL, channel, comp_vector);
if (!cq && (errno == ENOSYS))
#endif
{
*inl = 0;
cq = ibv_create_cq(context, cqe, NULL, channel, comp_vector);
}

if (!cq) {
ucs_error("ibv_create_cq(cqe=%d) failed: %m", cqe);
return UCS_ERR_IO_ERROR;
}

*cq_p = cq;
*inl = 0;
return UCS_OK;
}

Expand Down

0 comments on commit 82a0649

Please sign in to comment.