Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented proper fall-back to ibv_post_send without whitelists #88

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 12 additions & 26 deletions src/perftest_resources.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,6 @@ int alloc_hugepage_region (struct pingpong_context *ctx, int qp_index)
int verify_params_with_device_context(struct ibv_context *context,
struct perftest_parameters *user_param)
{
enum ctx_device current_dev = ib_dev_name(context);
if(user_param->use_event) {
if(user_param->eq_num > context->num_comp_vectors) {
fprintf(stderr, " Completion vector specified is invalid\n");
Expand All @@ -1393,28 +1392,6 @@ int verify_params_with_device_context(struct ibv_context *context,
return FAILURE;
}
}

// those are devices supporting new post send
if (current_dev != CONNECTIB &&
current_dev != CONNECTX4 &&
current_dev != CONNECTX4LX &&
current_dev != CONNECTX5 &&
current_dev != CONNECTX5EX &&
current_dev != CONNECTX6 &&
current_dev != CONNECTX6DX &&
current_dev != CONNECTX6LX &&
current_dev != CONNECTX7 &&
current_dev != MLX5GENVF &&
current_dev != BLUEFIELD &&
current_dev != BLUEFIELD2 &&
current_dev != EFA)
{
if (!user_param->use_old_post_send)
{
user_param->use_old_post_send = 1;
}
}

return SUCCESS;
}

Expand Down Expand Up @@ -1579,6 +1556,9 @@ int ctx_init(struct pingpong_context *ctx, struct perftest_parameters *user_para
for (i=0; i < user_param->num_of_qps; i++) {
if (create_qp_main(ctx, user_param, i, num_of_qps)) {
fprintf(stderr, "Failed to create QP.\n");
if (user_param->connection_type == DC) {
fprintf(stderr, "DC is not supported for the device chosen.\n");
}
return FAILURE;
}

Expand Down Expand Up @@ -1618,9 +1598,9 @@ int create_reg_qp_main(struct pingpong_context *ctx,
}

if (ctx->qp[i] == NULL) {
fprintf(stderr, "Unable to create QP.\n");
return FAILURE;
}
return FAILURE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question, is this related?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question, is this related?

Yes, it is, because we don't want to print this in fall-back case

}

#ifdef HAVE_IBV_WR_API
ctx->qpx[i] = ibv_qp_to_qp_ex(ctx->qp[i]);
#ifdef HAVE_MLX5DV
Expand All @@ -1639,6 +1619,12 @@ int create_qp_main(struct pingpong_context *ctx,
{
int ret;
ret = create_reg_qp_main(ctx, user_param, i, num_of_qps);
// this can happen if device doesn't support ibv_wr_* post send API
if (ret == FAILURE && errno == EOPNOTSUPP)
{
user_param->use_old_post_send = 1;
ret = create_reg_qp_main(ctx, user_param, i, num_of_qps);
}
return ret;
}

Expand Down