Skip to content

Commit e410bb2

Browse files
committed
Set min_rnr_timer to 12 for RDMA CM case.
Description: Default min_rnr_timer value leads to traffic drops if running tests with for long duration (1 hour and more) in case IB SEND responder side scatter memory is changing. Signed-off-by: Dmitry Akhmedzhanov <[email protected]>
1 parent 796c36a commit e410bb2

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# SOFTWARE.
3030
dnl Process this file with autoconf to produce a configure script.
3131

32-
AC_INIT([perftest],[5.95],[[email protected]])
32+
AC_INIT([perftest],[5.96],[[email protected]])
3333
AC_CONFIG_HEADERS([config.h])
3434
AC_CONFIG_AUX_DIR([config])
3535
AC_CONFIG_MACRO_DIR([m4])

src/perftest_communication.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,6 +2215,9 @@ int rdma_cm_connection_request_handler(struct pingpong_context *ctx,
22152215
char *error_message = "";
22162216
struct cma_node *cm_node;
22172217
struct rdma_conn_param conn_param;
2218+
struct ibv_qp_attr rtr_attr = {
2219+
.min_rnr_timer = MIN_RNR_TIMER,
2220+
};
22182221

22192222
connection_index = ctx->cma_master.connection_index;
22202223

@@ -2266,6 +2269,11 @@ int rdma_cm_connection_request_handler(struct pingpong_context *ctx,
22662269
goto error_2;
22672270
}
22682271

2272+
if (user_param->connection_type == RC)
2273+
{
2274+
ibv_modify_qp(ctx->qp[connection_index], &rtr_attr, IBV_QP_MIN_RNR_TIMER);
2275+
}
2276+
22692277
rc = rdma_cm_initialize_ud_connection_parameters(ctx, user_param);
22702278
if (rc) {
22712279
error_message = \

src/perftest_resources.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2010,7 +2010,7 @@ static int ctx_modify_qp_to_rtr(struct ibv_qp *qp,
20102010
flags |= IBV_QP_AV | IBV_QP_PATH_MTU;
20112011
if (is_dc_server_side)
20122012
{
2013-
attr->min_rnr_timer = 12;
2013+
attr->min_rnr_timer = MIN_RNR_TIMER;
20142014
flags |= IBV_QP_MIN_RNR_TIMER;
20152015
} //DCT
20162016
}
@@ -2024,7 +2024,7 @@ static int ctx_modify_qp_to_rtr(struct ibv_qp *qp,
20242024
if (user_param->connection_type == RC || user_param->connection_type == XRC) {
20252025

20262026
attr->max_dest_rd_atomic = my_dest->out_reads;
2027-
attr->min_rnr_timer = 12;
2027+
attr->min_rnr_timer = MIN_RNR_TIMER;
20282028
flags |= (IBV_QP_MIN_RNR_TIMER | IBV_QP_MAX_DEST_RD_ATOMIC);
20292029
}
20302030
}

src/perftest_resources.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
#define PL (1)
8181
#define ATOMIC_ADD_VALUE (1)
8282
#define ATOMIC_SWAP_VALUE (0)
83+
#define MIN_RNR_TIMER (12)
8384

8485
/* Space for GRH when we scatter the packet in UD. */
8586
#define PINGPONG_SEND_WRID (60)

0 commit comments

Comments
 (0)