Skip to content

Commit

Permalink
Merge pull request openucx#6275 from dsharma283/v1.10.x
Browse files Browse the repository at this point in the history
UCT/IB: fix cq creation failure using old ibv api
  • Loading branch information
yosefe authored Feb 5, 2021
2 parents 4b765ec + 749f834 commit 4861030
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/uct/ib/base/ib_iface.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
* Copyright (C) 2021 Broadcom. ALL RIGHTS RESERVED. The term “Broadcom”
* refers to Broadcom Inc. and/or its subsidiaries.
*
* See file LICENSE for terms.
*/
Expand Down Expand Up @@ -952,7 +954,7 @@ ucs_status_t uct_ib_verbs_create_cq(uct_ib_iface_t *iface, uct_ib_dir_t dir,
}

cq = ibv_cq_ex_to_cq(ibv_create_cq_ex(dev->ibv_context, &cq_attr));
if (!cq && (errno == ENOSYS))
if (!cq && ((errno == EOPNOTSUPP) || (errno == ENOSYS)))
#endif
{
iface->config.max_inl_cqe[dir] = 0;
Expand Down
5 changes: 4 additions & 1 deletion src/uct/ib/base/ib_verbs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
* Copyright (C) UT-Battelle, LLC. 2014. ALL RIGHTS RESERVED.
* Copyright (C) 2021 Broadcom. ALL RIGHTS RESERVED. The term “Broadcom”
* refers to Broadcom Inc. and/or its subsidiaries.
*
* See file LICENSE for terms.
*/

Expand Down Expand Up @@ -234,7 +237,7 @@ static inline int ibv_exp_cq_ignore_overrun(struct ibv_cq *cq) { return 0; }
#else
static inline int ibv_exp_cq_ignore_overrun(struct ibv_cq *cq)
{
errno = ENOSYS;
errno = EOPNOTSUPP;
return -1;
}
#endif /* HAVE_IBV_EXP_CQ_IGNORE_OVERRUN */
Expand Down

0 comments on commit 4861030

Please sign in to comment.