Skip to content

Commit

Permalink
Perftest: fix qp_timeout with rdma_cm and UD
Browse files Browse the repository at this point in the history
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 <sshaul@nvidia.com>
  • Loading branch information
sshaulnv committed Sep 16, 2024
1 parent 5c29996 commit 91fadb5
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/perftest_communication.c
Original file line number Diff line number Diff line change
Expand Up @@ -2329,12 +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;
if (user_param->connection_type == RC) {
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);
Expand Down Expand Up @@ -2472,12 +2474,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;
if (user_param->connection_type == RC) {
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);
Expand Down

0 comments on commit 91fadb5

Please sign in to comment.