]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
rping: Reduce retry_count to fit in 3-bits
authorSean Hefty <sean.hefty@intel.com>
Wed, 3 Oct 2012 22:05:20 +0000 (15:05 -0700)
committerSean Hefty <sean.hefty@intel.com>
Wed, 3 Oct 2012 22:21:49 +0000 (15:21 -0700)
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 <dledford@redhat.com>

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 <sean.hefty@intel.com>
examples/rping.c

index 785338e3b461f425a1b28eaffd1a03966a0cad72..32bd70ac4d6a8029f8c160a9f2af2cb5c41dfba8 100644 (file)
@@ -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) {