From 765f447ef6f81e2b45bab16dacd9e77a3b994649 Mon Sep 17 00:00:00 2001 From: Sean Hefty Date: Fri, 18 May 2012 15:34:14 -0700 Subject: [PATCH] commit --- meta | 10 +- patches/old-acm | 73 -------------- patches/reuseaddr | 34 ------- patches/rs-async-nonblock | 128 ------------------------- patches/rs-async-opt | 25 ----- patches/rs-delay | 89 ----------------- patches/rs-fulltest | 194 -------------------------------------- patches/rs-group-tests | 27 ------ patches/rs-nodelay | 75 --------------- 9 files changed, 1 insertion(+), 654 deletions(-) delete mode 100644 patches/old-acm delete mode 100644 patches/reuseaddr delete mode 100644 patches/rs-async-nonblock delete mode 100644 patches/rs-async-opt delete mode 100644 patches/rs-delay delete mode 100644 patches/rs-fulltest delete mode 100644 patches/rs-group-tests delete mode 100644 patches/rs-nodelay diff --git a/meta b/meta index 75ec92e7..9c35a2ea 100644 --- a/meta +++ b/meta @@ -1,14 +1,6 @@ Version: 1 -Previous: 5a8b5dfc21e1be5c262bea5a9e154b2a8f619c69 +Previous: 4e78eed53566f3553af4df5e76e8bc06074d7108 Head: 90b96504395c3e9f4652f4b46d63be3dea3689fe Applied: - reuseaddr: 5ce7d9c48d082fd1959918e9134f4bdd85c402d9 - rs-nodelay: c7515656281368210d75c103cc68c131511debf6 - rs-delay: 57d38cccd1f56452d3a653b674e2e3f049052d2b - rs-async-opt: d541438b83de7721c8ce91fd25c2801d99f5247a - rs-async-nonblock: 8cea41290e9c701beaa780fd2f412060916ca269 - rs-group-tests: f484de0b80b9369ad12c6b5628bb49a51dfc4ef0 - rs-fulltest: 7536a46ad1f69e6b7f41adb48bf8ddd2ee1a5129 - old-acm: 90b96504395c3e9f4652f4b46d63be3dea3689fe Unapplied: Hidden: diff --git a/patches/old-acm b/patches/old-acm deleted file mode 100644 index a65c2025..00000000 --- a/patches/old-acm +++ /dev/null @@ -1,73 +0,0 @@ -Bottom: 7553b4a2424ee63be0ec596d9d62a0f8512d235c -Top: 6bbc2f526b97dfafc16e7ec34dc8e4e1ce587f40 -Author: Sean Hefty -Date: 2012-05-18 10:00:58 -0700 - -librdmacm: Support older acm.h header files - -Older versions of acm.h do not include the resolve_data or -perf_data fields in struct acm_msg. If we're using an older -version of the acm.h header file, use an internal definition -of struct acm_msg. - -Signed-off-by: Sean Hefty - - ---- - -diff --git a/configure.in b/configure.in -index fa90fcb..dec6064 100644 ---- a/configure.in -+++ b/configure.in -@@ -73,6 +73,11 @@ fi - AC_CHECK_HEADER(infiniband/acm.h, - AC_DEFINE([USE_IB_ACM], 1, [setting IBACM support]), []) - -+AC_CHECK_HEADER(infiniband/acm.h, -+ AC_CHECK_MEMBER(struct acm_msg.resolve_data, [], -+ AC_DEFINE(DEFINE_ACM_MSG, 1, [adding ACM message definition]), -+ [#include ]), []) -+ - AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script, - if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then - ac_cv_version_script=yes -diff --git a/src/acm.c b/src/acm.c -index 7911b41..bcf11da 100755 ---- a/src/acm.c -+++ b/src/acm.c -@@ -48,6 +48,18 @@ - #ifdef USE_IB_ACM - #include - -+#if DEFINE_ACM_MSG -+typedef struct cma_acm_msg { -+ struct acm_hdr hdr; -+ union{ -+ uint8_t data[ACM_MSG_DATA_LENGTH]; -+ struct acm_ep_addr_data resolve_data[0]; -+ }; -+} cma_acm_msg_t; -+#else -+typedef struct acm_msg cma_acm_msg_t; -+#endif -+ - static pthread_mutex_t acm_lock = PTHREAD_MUTEX_INITIALIZER; - static int sock; - static short server_port = 6125; -@@ -237,7 +249,7 @@ err: - rdma_freeaddrinfo(ib_rai); - } - --static void ucma_ib_save_resp(struct rdma_addrinfo *rai, struct acm_msg *msg) -+static void ucma_ib_save_resp(struct rdma_addrinfo *rai, cma_acm_msg_t *msg) - { - struct acm_ep_addr_data *ep_data; - struct ibv_path_data *path_data = NULL; -@@ -306,7 +318,7 @@ static void ucma_copy_rai_addr(struct acm_ep_addr_data *data, struct sockaddr *a - - void ucma_ib_resolve(struct rdma_addrinfo **rai, struct rdma_addrinfo *hints) - { -- struct acm_msg msg; -+ cma_acm_msg_t msg; - struct acm_ep_addr_data *data; - int ret; diff --git a/patches/reuseaddr b/patches/reuseaddr deleted file mode 100644 index b5b13e13..00000000 --- a/patches/reuseaddr +++ /dev/null @@ -1,34 +0,0 @@ -Bottom: 3fcdf48082614bb29c44242534cfeecb47e07114 -Top: ea75b8334003947a7f09ba5f0efcec267b5143c1 -Author: Sean Hefty -Date: 2012-05-10 11:17:32 -0700 - -librdmacm/rsocket: Succeed setsockopt REUSEADDR on connected sockets - -The RDMA CM fail calls to set REUSEADDR on an rdma_cm_id if -it is not in the idle state. As a result, this causes a failure -in NetPipe when run with socket calls intercepted by rsockets. -Fix this by returning success when REUSEADDR is set on an rsocket -that has already been connected. When running over IB, REUSEADDR -is not necessary, since the TCP/IP addresses are mapped. - -Signed-off-by: Sean Hefty - - ---- - -diff --git a/src/rsocket.c b/src/rsocket.c -index 2ffde9b..de0ec3e 100644 ---- a/src/rsocket.c -+++ b/src/rsocket.c -@@ -1621,7 +1621,9 @@ int rsetsockopt(int socket, int level, int optname, - ret = rdma_set_option(rs->cm_id, RDMA_OPTION_ID, - RDMA_OPTION_ID_REUSEADDR, - (void *) optval, optlen); -- if (ret && errno == ENOSYS) -+ if (ret && ((errno == ENOSYS) || ((rs->state != rs_init) && -+ rs->cm_id->context && -+ (rs->cm_id->verbs->device->transport_type == IBV_TRANSPORT_IB)))) - ret = 0; - opt_on = *(int *) optval; - break; diff --git a/patches/rs-async-nonblock b/patches/rs-async-nonblock deleted file mode 100644 index 6da105d9..00000000 --- a/patches/rs-async-nonblock +++ /dev/null @@ -1,128 +0,0 @@ -Bottom: 739e2ac1d4183624ea78971f116d0b6be0266833 -Top: 8f6ed845f1d4f512d6113d3b4ff5776c7e330fc4 -Author: Sean Hefty -Date: 2012-05-16 15:23:41 -0700 - -rstream: Set rsocket nonblocking if set to async operation - -If asynchronous use is specified (use of poll/select), set the -rsocket to nonblocking. This matches the common usage case for -asynchronous sockets. - -When asynchronous support is enabled, the nonblocking/blocking -test option determines whether the poll/select call will block, -or if rstream will spin on the calls. - -This provides more flexibility with how the rsocket is used. -Specifically, MPI often uses nonblocking sockets, but spins on -poll/select. However, many apps will use nonblocking sockets, -but wait on poll/select. - -Signed-off-by: Sean Hefty - - ---- - -diff --git a/examples/rstream.c b/examples/rstream.c -index b73d59a..2b25ef5 100644 ---- a/examples/rstream.c -+++ b/examples/rstream.c -@@ -57,6 +57,7 @@ static int use_rs = 1; - static int use_async; - static int verify; - static int flags = MSG_DONTWAIT; -+static int poll_timeout = 0; - static int custom; - static int iterations = 1; - static int transfer_size = 1000; -@@ -190,6 +191,17 @@ static int verify_buf(void *buf, int size) - return 0; - } - -+static int do_poll(struct pollfd *fds) -+{ -+ int ret; -+ -+ do { -+ ret = rs_poll(fds, 1, poll_timeout); -+ } while (!ret); -+ -+ return ret == 1 ? 0 : ret; -+} -+ - static int send_xfer(int rs, int size) - { - struct pollfd fds; -@@ -205,8 +217,8 @@ static int send_xfer(int rs, int size) - - for (offset = 0; offset < size; ) { - if (use_async) { -- ret = rs_poll(&fds, 1, -1); -- if (ret != 1) -+ ret = do_poll(&fds); -+ if (ret) - return ret; - } - -@@ -234,8 +246,8 @@ static int recv_xfer(int rs, int size) - - for (offset = 0; offset < size; ) { - if (use_async) { -- ret = rs_poll(&fds, 1, -1); -- if (ret != 1) -+ ret = do_poll(&fds); -+ if (ret) - return ret; - } - -@@ -377,8 +389,8 @@ static int server_connect(void) - fds.fd = lrs; - fds.events = POLLIN; - -- ret = rs_poll(&fds, 1, -1); -- if (ret != 1) { -+ ret = do_poll(&fds); -+ if (ret) { - perror("rpoll"); - goto close; - } -@@ -421,21 +433,24 @@ static int client_connect(void) - ret = rs_connect(rs, res->ai_addr, res->ai_addrlen); - if (ret && (errno != EINPROGRESS)) { - perror("rconnect"); -- rs_close(rs); -- rs = ret; -+ goto err; - } - - if (errno == EINPROGRESS) { - fds.fd = rs; - fds.events = POLLOUT; -- do { -- ret = rs_poll(&fds, 1, -1); -- } while (!ret); -+ ret = do_poll(&fds); -+ if (ret) -+ goto err; - } - - free: - freeaddrinfo(res); - return rs; -+err: -+ freeaddrinfo(res); -+ rs_close(rs); -+ return ret; - } - - static int run(void) -@@ -562,6 +577,9 @@ int main(int argc, char **argv) - } - } - -+ if (!(flags & MSG_DONTWAIT)) -+ poll_timeout = -1; -+ - ret = run(); - return ret; - } diff --git a/patches/rs-async-opt b/patches/rs-async-opt deleted file mode 100644 index 2a049ccd..00000000 --- a/patches/rs-async-opt +++ /dev/null @@ -1,25 +0,0 @@ -Bottom: 7d9e5cc230e2810cf4b2e08f71e5100c4d4d5941 -Top: 739e2ac1d4183624ea78971f116d0b6be0266833 -Author: Sean Hefty -Date: 2012-05-11 10:41:02 -0700 - -rstream: Clarify use of async test option - -Signed-off-by: Sean Hefty - - ---- - -diff --git a/examples/rstream.c b/examples/rstream.c -index a214b1a..b73d59a 100644 ---- a/examples/rstream.c -+++ b/examples/rstream.c -@@ -554,7 +554,7 @@ int main(int argc, char **argv) - printf("\t[-p port_number]\n"); - printf("\t[-T test_option]\n"); - printf("\t s|sockets - use standard tcp/ip sockets\n"); -- printf("\t a|async - asynchronous operation\n"); -+ printf("\t a|async - asynchronous operation (use poll)\n"); - printf("\t b|blocking - use blocking calls\n"); - printf("\t n|nonblocking - use nonblocking calls\n"); - printf("\t v|verify - verify data\n"); diff --git a/patches/rs-delay b/patches/rs-delay deleted file mode 100644 index 00b158a4..00000000 --- a/patches/rs-delay +++ /dev/null @@ -1,89 +0,0 @@ -Bottom: 8cf2ab30dd18c0af94f11796a7f62c7abdbec612 -Top: 7d9e5cc230e2810cf4b2e08f71e5100c4d4d5941 -Author: Sean Hefty -Date: 2012-05-11 10:33:13 -0700 - -librdmacm/rstream: Set rsocket nonblocking for base tests - -The base set of rstream tests want nonblocking rsockets, but don't -actually set the rsocket to nonblocking. It instead relies on the -MSG_DONTWAIT flag. Make the code match the expected behavior and -set the rsocket to nonblocking and make nonblocking the default. - -Provide a test option to switch it back to blocking mode. We keep -the existing nonblocking test option for compatibility. - -Signed-off-by: Sean Hefty - - ---- - -diff --git a/examples/rstream.c b/examples/rstream.c -index a313fdb..a214b1a 100644 ---- a/examples/rstream.c -+++ b/examples/rstream.c -@@ -56,7 +56,7 @@ static int test_size[] = { - static int use_rs = 1; - static int use_async; - static int verify; --static int flags; -+static int flags = MSG_DONTWAIT; - static int custom; - static int iterations = 1; - static int transfer_size = 1000; -@@ -150,7 +150,6 @@ static void init_latency_test(int size) - { - size_str(test_name, size); - sprintf(test_name, "%s_lat", test_name); -- flags |= MSG_DONTWAIT; - transfer_count = 1; - transfer_size = size; - iterations = size_to_count(transfer_size); -@@ -160,7 +159,6 @@ static void init_bandwidth_test(int size) - { - size_str(test_name, size); - sprintf(test_name, "%s_bw", test_name); -- flags |= MSG_DONTWAIT; - iterations = 1; - transfer_size = size; - transfer_count = size_to_count(transfer_size); -@@ -485,6 +483,9 @@ static int set_test_opt(char *optarg) - case 'a': - use_async = 1; - break; -+ case 'b': -+ flags &= ~MSG_DONTWAIT; -+ break; - case 'n': - flags |= MSG_DONTWAIT; - break; -@@ -499,6 +500,8 @@ static int set_test_opt(char *optarg) - use_rs = 0; - } else if (!strncasecmp("async", optarg, 5)) { - use_async = 1; -+ } else if (!strncasecmp("block", optarg, 5)) { -+ flags &= ~MSG_DONTWAIT; - } else if (!strncasecmp("nonblock", optarg, 8)) { - flags |= MSG_DONTWAIT; - } else if (!strncasecmp("verify", optarg, 6)) { -@@ -552,6 +555,7 @@ int main(int argc, char **argv) - printf("\t[-T test_option]\n"); - printf("\t s|sockets - use standard tcp/ip sockets\n"); - printf("\t a|async - asynchronous operation\n"); -+ printf("\t b|blocking - use blocking calls\n"); - printf("\t n|nonblocking - use nonblocking calls\n"); - printf("\t v|verify - verify data\n"); - exit(1); -diff --git a/man/rstream.1 b/man/rstream.1 -index 701db3a..58bd7e3 100644 ---- a/man/rstream.1 -+++ b/man/rstream.1 -@@ -42,6 +42,8 @@ s | socket - uses standard socket calls to transfer data - .P - a | async - uses asynchronous operation (e.g. select / poll) - .P -+b | blocking - uses blocking calls -+.P - n | nonblocking - uses non-blocking calls - .P - v | verify - verifies data transfers diff --git a/patches/rs-fulltest b/patches/rs-fulltest deleted file mode 100644 index 29a2b05f..00000000 --- a/patches/rs-fulltest +++ /dev/null @@ -1,194 +0,0 @@ -Bottom: 73ebe2ff1ff06d4ecc24c5fe35c8f54b8ad98f9f -Top: 7553b4a2424ee63be0ec596d9d62a0f8512d235c -Author: Sean Hefty -Date: 2012-05-17 09:50:15 -0700 - -rstream: Add test option to include more sizes - -Allow user to specify that a full set of transfer sizes should -be tested. - -Signed-off-by: Sean Hefty - - ---- - -diff --git a/examples/rstream.c b/examples/rstream.c -index ec9b4ff..104b318 100644 ---- a/examples/rstream.c -+++ b/examples/rstream.c -@@ -45,11 +45,29 @@ - #include - #include - --static int test_size[] = { -- 64, -- 4096, -- 65536, -- 1048576 -+struct test_size_param { -+ int size; -+ int option; -+}; -+ -+static struct test_size_param test_size[] = { -+ { 1 << 6, 0 }, -+ { 1 << 7, 1 }, { (1 << 7) + (1 << 6), 1}, -+ { 1 << 8, 1 }, { (1 << 8) + (1 << 7), 1}, -+ { 1 << 9, 1 }, { (1 << 9) + (1 << 8), 1}, -+ { 1 << 10, 1 }, { (1 << 10) + (1 << 9), 1}, -+ { 1 << 11, 1 }, { (1 << 11) + (1 << 10), 1}, -+ { 1 << 12, 0 }, { (1 << 12) + (1 << 11), 1}, -+ { 1 << 13, 1 }, { (1 << 13) + (1 << 12), 1}, -+ { 1 << 14, 1 }, { (1 << 14) + (1 << 13), 1}, -+ { 1 << 15, 1 }, { (1 << 15) + (1 << 14), 1}, -+ { 1 << 16, 0 }, { (1 << 16) + (1 << 15), 1}, -+ { 1 << 17, 1 }, { (1 << 17) + (1 << 16), 1}, -+ { 1 << 18, 1 }, { (1 << 18) + (1 << 17), 1}, -+ { 1 << 19, 1 }, { (1 << 19) + (1 << 18), 1}, -+ { 1 << 20, 0 }, { (1 << 20) + (1 << 19), 1}, -+ { 1 << 21, 1 }, { (1 << 21) + (1 << 20), 1}, -+ { 1 << 22, 1 }, { (1 << 22) + (1 << 21), 1}, - }; - #define TEST_CNT (sizeof test_size / sizeof test_size[0]) - -@@ -59,6 +77,7 @@ static int verify; - static int flags = MSG_DONTWAIT; - static int poll_timeout = 0; - static int custom; -+static int size_option; - static int iterations = 1; - static int transfer_size = 1000; - static int transfer_count = 1000; -@@ -87,14 +106,30 @@ static void *buf; - - static void size_str(char *str, long long size) - { -- if (size >= (1 << 30)) -- sprintf(str, "%lldg", size / (1 << 30)); -- else if (size >= (1 << 20)) -- sprintf(str, "%lldm", size / (1 << 20)); -- else if (size >= (1 << 10)) -- sprintf(str, "%lldk", size / (1 << 10)); -- else -- sprintf(str, "%lld", size); -+ long long base, fraction = 0; -+ char mag; -+ -+ if (size >= (1 << 30)) { -+ base = 1 << 30; -+ mag = 'g'; -+ } else if (size >= (1 << 20)) { -+ base = 1 << 20; -+ mag = 'm'; -+ } else if (size >= (1 << 10)) { -+ base = 1 << 10; -+ mag = 'k'; -+ } else { -+ base = 1; -+ mag = '\0'; -+ } -+ -+ if (size / base < 10) -+ fraction = (size % base) * 10 / base; -+ if (fraction) { -+ sprintf(str, "%lld.%lld%c", size / base, fraction, mag); -+ } else { -+ sprintf(str, "%lld%c", size / base, mag); -+ } - } - - static void cnt_str(char *str, long long cnt) -@@ -119,16 +154,16 @@ static void show_perf(void) - bytes = (long long) iterations * transfer_count * transfer_size * 2; - - /* name size transfers iterations bytes seconds Gb/sec usec/xfer */ -- printf("%s\t", test_name); -+ printf("%-10s", test_name); - size_str(str, transfer_size); -- printf("%s\t", str); -+ printf("%-8s", str); - cnt_str(str, transfer_count); -- printf("%s\t", str); -+ printf("%-8s", str); - cnt_str(str, iterations); -- printf("%s\t", str); -+ printf("%-8s", str); - size_str(str, bytes); -- printf("%s\t", str); -- printf("%.2fs \t%.2f \t%.2f\n", -+ printf("%-8s", str); -+ printf("%8.2fs%10.2f%11.2f\n", - usec / 1000000., (bytes * 8) / (1000. * usec), - (usec / iterations) / (transfer_count * 2)); - } -@@ -457,7 +492,7 @@ static int run(void) - { - int i, rs, ret = 0; - -- buf = malloc(!custom ? test_size[TEST_CNT - 1] : transfer_size); -+ buf = malloc(!custom ? test_size[TEST_CNT - 1].size : transfer_size); - if (!buf) { - perror("malloc"); - return -1; -@@ -469,14 +504,19 @@ static int run(void) - goto free; - } - -- printf("name \tbytes \txfers \titers \ttotal \ttime \tGb/sec \tusec/xfer\n"); -+ printf("%-10s%-8s%-8s%-8s%-8s%8s %10s%13s\n", -+ "name", "bytes", "xfers", "iters", "total", "time", "Gb/sec", "usec/xfer"); - if (!custom) { - for (i = 0; i < TEST_CNT; i++) { -- init_latency_test(test_size[i]); -+ if (test_size[i].option > size_option) -+ continue; -+ init_latency_test(test_size[i].size); - run_test(rs); - } - for (i = 0; i < TEST_CNT; i++) { -- init_bandwidth_test(test_size[i]); -+ if (test_size[i].option > size_option) -+ continue; -+ init_bandwidth_test(test_size[i].size); - run_test(rs); - } - } else { -@@ -551,8 +591,12 @@ int main(int argc, char **argv) - transfer_count = atoi(optarg); - break; - case 'S': -- custom = 1; -- transfer_size = atoi(optarg); -+ if (!strncasecmp("all", optarg, 3)) { -+ size_option = 1; -+ } else { -+ custom = 1; -+ transfer_size = atoi(optarg); -+ } - break; - case 'p': - port = optarg; -@@ -567,7 +611,7 @@ int main(int argc, char **argv) - printf("\t[-b bind_address]\n"); - printf("\t[-I iterations]\n"); - printf("\t[-C transfer_count]\n"); -- printf("\t[-S transfer_size]\n"); -+ printf("\t[-S transfer_size or all]\n"); - printf("\t[-p port_number]\n"); - printf("\t[-T test_option]\n"); - printf("\t s|sockets - use standard tcp/ip sockets\n"); -diff --git a/man/rstream.1 b/man/rstream.1 -index 58bd7e3..0909932 100644 ---- a/man/rstream.1 -+++ b/man/rstream.1 -@@ -30,7 +30,8 @@ The number of messages to transfer from the client to the server and - back again on each iteration. (default 1) - .TP - \-S transfer_size --The size of each send transfer, in bytes. (default 1000) -+The size of each send transfer, in bytes. (default 1000) If 'all' -+is specified, rstream will run a series of tests of various sizes. - .TP - \-p server_port - The server's port number. diff --git a/patches/rs-group-tests b/patches/rs-group-tests deleted file mode 100644 index c3fce8ac..00000000 --- a/patches/rs-group-tests +++ /dev/null @@ -1,27 +0,0 @@ -Bottom: 8f6ed845f1d4f512d6113d3b4ff5776c7e330fc4 -Top: 73ebe2ff1ff06d4ecc24c5fe35c8f54b8ad98f9f -Author: Sean Hefty -Date: 2012-05-17 09:26:13 -0700 - -rstream: Group latency/bandwidth tests together - -Rather than grouping tests by transfer size, group by the test type. - -Signed-off-by: Sean Hefty - - ---- - -diff --git a/examples/rstream.c b/examples/rstream.c -index 2b25ef5..ec9b4ff 100644 ---- a/examples/rstream.c -+++ b/examples/rstream.c -@@ -474,6 +474,8 @@ static int run(void) - for (i = 0; i < TEST_CNT; i++) { - init_latency_test(test_size[i]); - run_test(rs); -+ } -+ for (i = 0; i < TEST_CNT; i++) { - init_bandwidth_test(test_size[i]); - run_test(rs); - } diff --git a/patches/rs-nodelay b/patches/rs-nodelay deleted file mode 100644 index 87bc3771..00000000 --- a/patches/rs-nodelay +++ /dev/null @@ -1,75 +0,0 @@ -Bottom: ea75b8334003947a7f09ba5f0efcec267b5143c1 -Top: 8cf2ab30dd18c0af94f11796a7f62c7abdbec612 -Author: Sean Hefty -Date: 2012-05-16 15:16:40 -0700 - -rstream: Always set TCP_NODELAY on rsocket - -The NODELAY option is coupled with whether the socket is blocking -or nonblocking. Remove this coupling and always set the NODELAY -option. - -NODELAY currently has no effect on rsockets. - -Signed-off-by: Sean Hefty - - ---- - -diff --git a/examples/rstream.c b/examples/rstream.c -index 8aa089d..a313fdb 100644 ---- a/examples/rstream.c -+++ b/examples/rstream.c -@@ -57,7 +57,6 @@ static int use_rs = 1; - static int use_async; - static int verify; - static int flags; --static int no_delay; - static int custom; - static int iterations = 1; - static int transfer_size = 1000; -@@ -151,7 +150,6 @@ static void init_latency_test(int size) - { - size_str(test_name, size); - sprintf(test_name, "%s_lat", test_name); -- no_delay = 1; - flags |= MSG_DONTWAIT; - transfer_count = 1; - transfer_size = size; -@@ -162,7 +160,6 @@ static void init_bandwidth_test(int size) - { - size_str(test_name, size); - sprintf(test_name, "%s_bw", test_name); -- no_delay = 1; - flags |= MSG_DONTWAIT; - iterations = 1; - transfer_size = size; -@@ -328,10 +325,8 @@ static void set_options(int rs) - break; - } - -- if (no_delay) { -- rs_setsockopt(rs, IPPROTO_TCP, TCP_NODELAY, -- (void *) &no_delay, sizeof(no_delay)); -- } -+ val = 1; -+ rs_setsockopt(rs, IPPROTO_TCP, TCP_NODELAY, (void *) &val, sizeof(val)); - - if (flags & MSG_DONTWAIT) { - rs_fcntl(rs, F_SETFL, O_NONBLOCK); -@@ -492,7 +487,6 @@ static int set_test_opt(char *optarg) - break; - case 'n': - flags |= MSG_DONTWAIT; -- no_delay = 1; - break; - case 'v': - verify = 1; -@@ -507,7 +501,6 @@ static int set_test_opt(char *optarg) - use_async = 1; - } else if (!strncasecmp("nonblock", optarg, 8)) { - flags |= MSG_DONTWAIT; -- no_delay = 1; - } else if (!strncasecmp("verify", optarg, 6)) { - verify = 1; - } else { -- 2.41.0