+++ /dev/null
-Bottom: e2b2c3d392d8eb2326d60d38ea68d53984cc2942
-Top: 2ba0685c99aaab7819bb95717eb462a7d2f14053
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2012-12-19 10:16:22 -0800
-
-Refresh of udpong
-
----
-
-diff --git a/examples/common.h b/examples/common.h
-index eaffb57..7cf16d2 100644
---- a/examples/common.h
-+++ b/examples/common.h
-@@ -76,6 +76,12 @@ union socket_addr {
- struct sockaddr_in6 sin6;
- };
-
-+enum rs_optimization {
-+ opt_mixed,
-+ opt_latency,
-+ opt_bandwidth
-+};
-+
- int get_rdma_addr(char *src, char *dst, char *port,
- struct rdma_addrinfo *hints, struct rdma_addrinfo **rai);
-
-diff --git a/examples/riostream.c b/examples/riostream.c
-index 718b20d..a1d3671 100644
---- a/examples/riostream.c
-+++ b/examples/riostream.c
-@@ -73,12 +73,6 @@ static struct test_size_param test_size[] = {
- };
- #define TEST_CNT (sizeof test_size / sizeof test_size[0])
-
--enum rs_optimization {
-- opt_mixed,
-- opt_latency,
-- opt_bandwidth
--};
--
- static int rs, lrs;
- static int use_async;
- static int verify;
-diff --git a/examples/rstream.c b/examples/rstream.c
-index 617710e..a408b9e 100644
---- a/examples/rstream.c
-+++ b/examples/rstream.c
-@@ -73,12 +73,6 @@ static struct test_size_param test_size[] = {
- };
- #define TEST_CNT (sizeof test_size / sizeof test_size[0])
-
--enum rs_optimization {
-- opt_mixed,
-- opt_latency,
-- opt_bandwidth
--};
--
- static int rs, lrs;
- static int use_async;
- static int verify;
Bottom: a51fe46dbaa58743e3254a4ef2288b4490ff5d13
-Top: e2b2c3d392d8eb2326d60d38ea68d53984cc2942
+Top: 2ba0685c99aaab7819bb95717eb462a7d2f14053
Author: Sean Hefty <sean.hefty@intel.com>
Date: 2012-12-05 15:58:03 -0800
+ return ret == 1 ? 0 : ret;
+}
diff --git a/examples/common.h b/examples/common.h
-index 8d9fea0..eaffb57 100644
+index 8d9fea0..7cf16d2 100644
--- a/examples/common.h
+++ b/examples/common.h
@@ -1,5 +1,5 @@
#if __BYTE_ORDER == __BIG_ENDIAN
static inline uint64_t cpu_to_be64(uint64_t x) { return x; }
-@@ -46,5 +48,40 @@ static inline uint64_t cpu_to_be64(uint64_t x) { return bswap_64(x); }
+@@ -46,5 +48,46 @@ static inline uint64_t cpu_to_be64(uint64_t x) { return bswap_64(x); }
static inline uint32_t cpu_to_be32(uint32_t x) { return bswap_32(x); }
#endif
+ struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
+};
++
++enum rs_optimization {
++ opt_mixed,
++ opt_latency,
++ opt_bandwidth
++};
+
int get_rdma_addr(char *src, char *dst, char *port,
struct rdma_addrinfo *hints, struct rdma_addrinfo **rai);
+int verify_buf(void *buf, int size);
+int do_poll(struct pollfd *fds, int timeout);
diff --git a/examples/riostream.c b/examples/riostream.c
-index dfb03e5..718b20d 100644
+index dfb03e5..a1d3671 100644
--- a/examples/riostream.c
+++ b/examples/riostream.c
@@ -45,6 +45,7 @@
struct test_size_param {
int size;
-@@ -98,46 +99,6 @@ static struct timeval start, end;
+@@ -72,12 +73,6 @@ static struct test_size_param test_size[] = {
+ };
+ #define TEST_CNT (sizeof test_size / sizeof test_size[0])
+
+-enum rs_optimization {
+- opt_mixed,
+- opt_latency,
+- opt_bandwidth
+-};
+-
+ static int rs, lrs;
+ static int use_async;
+ static int verify;
+@@ -98,46 +93,6 @@ static struct timeval start, end;
static void *buf;
static volatile uint8_t *poll_byte;
static void show_perf(void)
{
char str[32];
-@@ -162,20 +123,6 @@ static void show_perf(void)
+@@ -162,20 +117,6 @@ static void show_perf(void)
(usec / iterations) / (transfer_count * 2));
}
static void init_latency_test(int size)
{
char sstr[5];
-@@ -198,43 +145,6 @@ static void init_bandwidth_test(int size)
+@@ -198,43 +139,6 @@ static void init_bandwidth_test(int size)
transfer_count = size_to_count(transfer_size);
}
static int send_msg(int size)
{
struct pollfd fds;
-@@ -250,7 +160,7 @@ static int send_msg(int size)
+@@ -250,7 +154,7 @@ static int send_msg(int size)
for (offset = 0; offset < size; ) {
if (use_async) {
if (ret)
return ret;
}
-@@ -282,7 +192,7 @@ static int send_xfer(int size)
+@@ -282,7 +186,7 @@ static int send_xfer(int size)
for (offset = 0; offset < size; ) {
if (use_async) {
if (ret)
return ret;
}
-@@ -311,7 +221,7 @@ static int recv_msg(int size)
+@@ -311,7 +215,7 @@ static int recv_msg(int size)
for (offset = 0; offset < size; ) {
if (use_async) {
if (ret)
return ret;
}
-@@ -455,7 +365,7 @@ static int server_listen(void)
+@@ -455,7 +359,7 @@ static int server_listen(void)
int val, ret;
memset(&hints, 0, sizeof hints);
ret = getaddrinfo(src_addr, port, &hints, &res);
if (ret) {
perror("getaddrinfo");
-@@ -505,7 +415,7 @@ static int server_connect(void)
+@@ -505,7 +409,7 @@ static int server_connect(void)
fds.fd = lrs;
fds.events = POLLIN;
if (ret) {
perror("rpoll");
return ret;
-@@ -555,7 +465,7 @@ static int client_connect(void)
+@@ -555,7 +459,7 @@ static int client_connect(void)
if (ret && (errno == EINPROGRESS)) {
fds.fd = rs;
fds.events = POLLOUT;
goto close;
diff --git a/examples/rstream.c b/examples/rstream.c
-index 069b7c9..617710e 100644
+index 069b7c9..a408b9e 100644
--- a/examples/rstream.c
+++ b/examples/rstream.c
@@ -45,6 +45,7 @@
struct test_size_param {
int size;
-@@ -79,7 +80,6 @@ enum rs_optimization {
+@@ -72,14 +73,7 @@ static struct test_size_param test_size[] = {
};
+ #define TEST_CNT (sizeof test_size / sizeof test_size[0])
+-enum rs_optimization {
+- opt_mixed,
+- opt_latency,
+- opt_bandwidth
+-};
+-
static int rs, lrs;
-static int use_rs = 1;
static int use_async;
static int verify;
static int flags = MSG_DONTWAIT;
-@@ -100,62 +100,6 @@ static char *src_addr;
+@@ -100,62 +94,6 @@ static char *src_addr;
static struct timeval start, end;
static void *buf;
static void show_perf(void)
{
char str[32];
-@@ -180,20 +124,6 @@ static void show_perf(void)
+@@ -180,20 +118,6 @@ static void show_perf(void)
(usec / iterations) / (transfer_count * 2));
}
static void init_latency_test(int size)
{
char sstr[5];
-@@ -216,43 +146,6 @@ static void init_bandwidth_test(int size)
+@@ -216,43 +140,6 @@ static void init_bandwidth_test(int size)
transfer_count = size_to_count(transfer_size);
}
static int send_xfer(int size)
{
struct pollfd fds;
-@@ -268,7 +161,7 @@ static int send_xfer(int size)
+@@ -268,7 +155,7 @@ static int send_xfer(int size)
for (offset = 0; offset < size; ) {
if (use_async) {
if (ret)
return ret;
}
-@@ -297,7 +190,7 @@ static int recv_xfer(int size)
+@@ -297,7 +184,7 @@ static int recv_xfer(int size)
for (offset = 0; offset < size; ) {
if (use_async) {
if (ret)
return ret;
}
-@@ -402,7 +295,7 @@ static int server_listen(void)
+@@ -402,7 +289,7 @@ static int server_listen(void)
int val, ret;
memset(&hints, 0, sizeof hints);
ret = getaddrinfo(src_addr, port, &hints, &res);
if (ret) {
perror("getaddrinfo");
-@@ -452,7 +345,7 @@ static int server_connect(void)
+@@ -452,7 +339,7 @@ static int server_connect(void)
fds.fd = lrs;
fds.events = POLLIN;
if (ret) {
perror("rpoll");
return ret;
-@@ -505,7 +398,7 @@ static int client_connect(void)
+@@ -505,7 +392,7 @@ static int client_connect(void)
if (ret && (errno == EINPROGRESS)) {
fds.fd = rs;
fds.events = POLLOUT;