From: Sean Hefty Date: Mon, 28 May 2012 09:17:35 +0000 (-0700) Subject: Refresh of rstream-opt X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=c0493bfc313d1e7db9b8e22c4fe901dc5978e94a;p=~shefty%2Flibrdmacm.git Refresh of rstream-opt --- diff --git a/examples/rstream.c b/examples/rstream.c index 3a7f5109..067b7466 100644 --- a/examples/rstream.c +++ b/examples/rstream.c @@ -365,7 +365,7 @@ static void set_options(int rs) sizeof buffer_size); rs_setsockopt(rs, SOL_SOCKET, SO_RCVBUF, (void *) &buffer_size, sizeof buffer_size); - } else if (optimization == opt_bandwidth) { + } else { val = 1 << 19; rs_setsockopt(rs, SOL_SOCKET, SO_SNDBUF, (void *) &val, sizeof val); rs_setsockopt(rs, SOL_SOCKET, SO_RCVBUF, (void *) &val, sizeof val); @@ -379,14 +379,14 @@ static void set_options(int rs) if (use_rs) { /* Inline size based on experimental data */ - if (optimization == opt_latency) - val = 384; - else if (optimization == opt_bandwidth) +// if (optimization == opt_latency) +// val = 384; +// else if (optimization == opt_bandwidth) val = 32; // 0; - else - val = 64; +// else +// val = 64; -// rs_setsockopt(rs, SOL_RDMA, RDMA_INLINE, &val, sizeof val); + rs_setsockopt(rs, SOL_RDMA, RDMA_INLINE, &val, sizeof val); } } @@ -549,11 +549,11 @@ static int run(void) init_latency_test(test_size[i].size); run_test(); } -// rs_shutdown(rs, SHUT_RDWR); -// rs_close(rs); + rs_shutdown(rs, SHUT_RDWR); + rs_close(rs); optimization = opt_bandwidth; -// ret = dst_addr ? client_connect() : server_connect(); + ret = dst_addr ? client_connect() : server_connect(); if (ret) goto free; for (i = 0; i < TEST_CNT; i++) {