]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
Refresh of rstream-opt
authorSean Hefty <sean.hefty@intel.com>
Mon, 28 May 2012 09:17:35 +0000 (02:17 -0700)
committerSean Hefty <sean.hefty@intel.com>
Mon, 28 May 2012 09:17:35 +0000 (02:17 -0700)
examples/rstream.c

index 3a7f5109d217b870316cf5e0bc02908cac84801d..067b74665025a400d08a5d7433dcc2d699491fbb 100644 (file)
@@ -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++) {