From 5ed551f9ebc2af74eb2e330b258f0203cbf381e3 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Wed, 3 Oct 2012 15:05:20 -0700 Subject: [PATCH] rping: Reduce retry_count to fit in 3-bits retry_count is a 3 bit value on IB, reduce it from 10 to 7. A value of 10 prevents rping from working over the Intel IB HCA. Problem reported by Doug Ledford The retry_count is also not set when calling rdma_accept. Rather than passing different values into rdma_accept than what was specified by the remote side, use the values given in the connection request. Signed-off-by: Sean Hefty --- examples/rping.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/examples/rping.c b/examples/rping.c index 785338e3..32bd70ac 100644 --- a/examples/rping.c +++ b/examples/rping.c @@ -342,16 +342,11 @@ error: static int rping_accept(struct rping_cb *cb) { - struct rdma_conn_param conn_param; int ret; DEBUG_LOG("accepting client connection request\n"); - memset(&conn_param, 0, sizeof conn_param); - conn_param.responder_resources = 1; - conn_param.initiator_depth = 1; - - ret = rdma_accept(cb->child_cm_id, &conn_param); + ret = rdma_accept(cb->child_cm_id, NULL); if (ret) { perror("rdma_accept"); return ret; @@ -975,7 +970,7 @@ static int rping_connect_client(struct rping_cb *cb) memset(&conn_param, 0, sizeof conn_param); conn_param.responder_resources = 1; conn_param.initiator_depth = 1; - conn_param.retry_count = 10; + conn_param.retry_count = 7; ret = rdma_connect(cb->cm_id, &conn_param); if (ret) { -- 2.41.0