Skip to content

Commit 91fadb5

Browse files
committed
Perftest: fix qp_timeout with rdma_cm and UD
Upstream commit b8aa202 add a rdma cm qp_timeout support over datapath, which is not supported over UD qp type. This commit enable it over RC qp type only. Signed-off-by: Shmuel Shaul <[email protected]>
1 parent 5c29996 commit 91fadb5

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

src/perftest_communication.c

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,12 +2329,14 @@ int rdma_cm_address_handler(struct pingpong_context *ctx,
23292329
}
23302330
}
23312331

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;
2332+
if (user_param->connection_type == RC) {
2333+
rc = rdma_set_option(cma_id, RDMA_OPTION_ID, RDMA_OPTION_ID_ACK_TIMEOUT,
2334+
&user_param->qp_timeout, sizeof(uint8_t));
2335+
if (rc) {
2336+
error_message = "Failed to set qp_timeout.";
2337+
rdma_cm_connect_error(ctx);
2338+
goto error;
2339+
}
23382340
}
23392341

23402342
rc = rdma_resolve_route(cma_id, 2000);
@@ -2472,12 +2474,14 @@ int rdma_cm_connection_request_handler(struct pingpong_context *ctx,
24722474
goto error_2;
24732475
}
24742476

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;
2477+
if (user_param->connection_type == RC) {
2478+
rc = rdma_set_option(ctx->cm_id, RDMA_OPTION_ID,
2479+
RDMA_OPTION_ID_ACK_TIMEOUT,
2480+
&user_param->qp_timeout, sizeof(uint8_t));
2481+
if (rc) {
2482+
error_message = "Failed to set qp_timeout.";
2483+
goto error_2;
2484+
}
24812485
}
24822486

24832487
rc = rdma_accept(ctx->cm_id, &conn_param);

0 commit comments

Comments
 (0)