Skip to content

Commit ccae524

Browse files
Saravanan Vajravelsshaulnv
authored andcommitted
perftest: Set Ack timeout for rdma_cm connection id
Perftest doesn't configure timeout set by user for rdma_cm connections. It can lead to timeout of mad packets for cetain workloads. Added code to set the ack timeout of QP associated with rdma_cm connection identifier Signed-off-by: Saravanan Vajravel <[email protected]>
1 parent bbb237d commit ccae524

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/perftest_communication.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,12 @@ int rdma_client_connect(struct pingpong_context *ctx,struct perftest_parameters
999999
}
10001000
}
10011001

1002+
if (rdma_set_option(ctx->cm_id, RDMA_OPTION_ID, RDMA_OPTION_ID_ACK_TIMEOUT,
1003+
&user_param->qp_timeout, sizeof(uint8_t))) {
1004+
fprintf(stderr, " Set RDMA-CM Ack timeout option failed: %d\n", event->event);
1005+
return FAILURE;
1006+
}
1007+
10021008
while (1) {
10031009

10041010
if (num_of_retry <= 0) {
@@ -1232,6 +1238,12 @@ int rdma_server_connect(struct pingpong_context *ctx,
12321238
}
12331239
}
12341240

1241+
if (rdma_set_option(ctx->cm_id, RDMA_OPTION_ID, RDMA_OPTION_ID_ACK_TIMEOUT,
1242+
&user_param->qp_timeout, sizeof(uint8_t))) {
1243+
fprintf(stderr, " Set RDMA-CM Ack timeout option failed: %d\n", event->event);
1244+
return FAILURE;
1245+
}
1246+
12351247
if (rdma_accept(ctx->cm_id, &conn_param)) {
12361248
fprintf(stderr, "Function rdma_accept failed\n");
12371249
return 1;

0 commit comments

Comments
 (0)