Skip to content

Commit

Permalink
Merge pull request #288 from raphael-s-norwitz/fix-qp-timeout-for-cm
Browse files Browse the repository at this point in the history
Fix qp_timeout argument in the RDMA CM path
  • Loading branch information
sshaulnv authored Sep 9, 2024
2 parents d2def67 + b8aa202 commit 5c29996
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/perftest_communication.c
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,7 @@ int create_comm_struct(struct perftest_comm *comm,
comm->rdma_params->output = user_param->output;
comm->rdma_params->report_per_port = user_param->report_per_port;
comm->rdma_params->retry_count = user_param->retry_count;
comm->rdma_params->qp_timeout = user_param->qp_timeout;
comm->rdma_params->mr_per_qp = user_param->mr_per_qp;
comm->rdma_params->dlid = user_param->dlid;
comm->rdma_params->cycle_buffer = user_param->cycle_buffer;
Expand Down Expand Up @@ -2328,6 +2329,14 @@ int rdma_cm_address_handler(struct pingpong_context *ctx,
}
}

rc = rdma_set_option(cma_id, RDMA_OPTION_ID, RDMA_OPTION_ID_ACK_TIMEOUT,
&user_param->qp_timeout, sizeof(uint8_t));
if (rc) {
error_message = "Failed to set qp_timeout.";
rdma_cm_connect_error(ctx);
goto error;
}

rc = rdma_resolve_route(cma_id, 2000);
if (rc) {
error_message = "Failed to resolve RDMA CM route.";
Expand Down Expand Up @@ -2463,6 +2472,14 @@ int rdma_cm_connection_request_handler(struct pingpong_context *ctx,
goto error_2;
}

rc = rdma_set_option(ctx->cm_id, RDMA_OPTION_ID,
RDMA_OPTION_ID_ACK_TIMEOUT,
&user_param->qp_timeout, sizeof(uint8_t));
if (rc) {
error_message = "Failed to set qp_timeout.";
goto error_2;
}

rc = rdma_accept(ctx->cm_id, &conn_param);
if (rc) {
error_message = "Failed to accept RDMA CM connection.";
Expand Down

0 comments on commit 5c29996

Please sign in to comment.