Skip to content

Commit 5c29996

Browse files
authored
Merge pull request #288 from raphael-s-norwitz/fix-qp-timeout-for-cm
Fix qp_timeout argument in the RDMA CM path
2 parents d2def67 + b8aa202 commit 5c29996

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/perftest_communication.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,7 @@ int create_comm_struct(struct perftest_comm *comm,
12911291
comm->rdma_params->output = user_param->output;
12921292
comm->rdma_params->report_per_port = user_param->report_per_port;
12931293
comm->rdma_params->retry_count = user_param->retry_count;
1294+
comm->rdma_params->qp_timeout = user_param->qp_timeout;
12941295
comm->rdma_params->mr_per_qp = user_param->mr_per_qp;
12951296
comm->rdma_params->dlid = user_param->dlid;
12961297
comm->rdma_params->cycle_buffer = user_param->cycle_buffer;
@@ -2328,6 +2329,14 @@ int rdma_cm_address_handler(struct pingpong_context *ctx,
23282329
}
23292330
}
23302331

2332+
rc = rdma_set_option(cma_id, RDMA_OPTION_ID, RDMA_OPTION_ID_ACK_TIMEOUT,
2333+
&user_param->qp_timeout, sizeof(uint8_t));
2334+
if (rc) {
2335+
error_message = "Failed to set qp_timeout.";
2336+
rdma_cm_connect_error(ctx);
2337+
goto error;
2338+
}
2339+
23312340
rc = rdma_resolve_route(cma_id, 2000);
23322341
if (rc) {
23332342
error_message = "Failed to resolve RDMA CM route.";
@@ -2463,6 +2472,14 @@ int rdma_cm_connection_request_handler(struct pingpong_context *ctx,
24632472
goto error_2;
24642473
}
24652474

2475+
rc = rdma_set_option(ctx->cm_id, RDMA_OPTION_ID,
2476+
RDMA_OPTION_ID_ACK_TIMEOUT,
2477+
&user_param->qp_timeout, sizeof(uint8_t));
2478+
if (rc) {
2479+
error_message = "Failed to set qp_timeout.";
2480+
goto error_2;
2481+
}
2482+
24662483
rc = rdma_accept(ctx->cm_id, &conn_param);
24672484
if (rc) {
24682485
error_message = "Failed to accept RDMA CM connection.";

0 commit comments

Comments
 (0)