Skip to content

Commit

Permalink
Merge pull request #286 from hginjgerx/td
Browse files Browse the repository at this point in the history
Perftest: Fix failure in creating cq when create cq ex is not support…
  • Loading branch information
sshaulnv authored Sep 2, 2024
2 parents 279d92e + fba7ce7 commit 2fb0e05
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/perftest_resources.c
Original file line number Diff line number Diff line change
Expand Up @@ -1547,6 +1547,8 @@ int create_reg_cqs(struct pingpong_context *ctx,
#endif
ctx->send_cq = ibv_cq_ex_to_cq(ibv_create_cq_ex(ctx->context, &send_cq_attr));
if (!ctx->send_cq) {
if (!user_param->no_lock && errno == EOPNOTSUPP)
goto cq_ex_not_supported;
fprintf(stderr, "Couldn't create CQ\n");
return FAILURE;
}
Expand All @@ -1571,7 +1573,9 @@ int create_reg_cqs(struct pingpong_context *ctx,
}
}
return SUCCESS;
#else

cq_ex_not_supported:
#endif
ctx->send_cq = ibv_create_cq(ctx->context,tx_buffer_depth *
user_param->num_of_qps, NULL, ctx->send_channel, user_param->eq_num);
if (!ctx->send_cq) {
Expand All @@ -1589,7 +1593,6 @@ int create_reg_cqs(struct pingpong_context *ctx,
}

return SUCCESS;
#endif
}

/******************************************************************************
Expand Down

0 comments on commit 2fb0e05

Please sign in to comment.