--- a/components/open-fabrics/perftest/patches/base.patch Fri Feb 13 08:20:53 2015 -0800
+++ b/components/open-fabrics/perftest/patches/base.patch Tue Feb 17 13:04:40 2015 -0800
@@ -1,3 +1,6 @@
+# This patch was developed in-house. Since it is Solaris-specific,
+# it is not suitable for upstream.
+#
diff -r -u /tmp/perftest-1.3.0/Makefile perftest-1.3.0/Makefile
--- /tmp/perftest-1.3.0/Makefile Thu Jan 20 01:37:35 2011
+++ perftest-1.3.0/Makefile Fri Feb 11 04:12:45 2011
@@ -214,9 +217,12 @@
#include <infiniband/verbs.h>
#include <rdma/rdma_cma.h>
-@@ -144,7 +147,7 @@
+@@ -142,9 +145,9 @@
- if (n < 0) {
+ n = getaddrinfo(data->servername, service, &hints, &res);
+
+- if (n < 0) {
++ if (n != 0) {
fprintf(stderr, "%d:%s: %s for %s:%d\n",
- pid, __func__, gai_strerror(n),
+ (int)pid, __func__, gai_strerror(n),
@@ -343,11 +349,13 @@
free(data->rem_dest);
goto err;
}
-@@ -347,7 +350,7 @@
+@@ -346,8 +349,8 @@
+ if (asprintf(&service, "%d", data->port) < 0)
goto err5;
- if ( (n = getaddrinfo(NULL, service, &hints, &res)) < 0 ) {
+- if ( (n = getaddrinfo(NULL, service, &hints, &res)) < 0 ) {
- fprintf(stderr, "%d:%s: %s for port %d\n", pid, __func__,
++ if ( (n = getaddrinfo(NULL, service, &hints, &res) != 0) ) {
+ fprintf(stderr, "%d:%s: %s for port %d\n", (int)pid, __func__,
gai_strerror(n), data->port);
goto err5;
@@ -828,6 +836,15 @@
return 1;
}
ccnt += 1;
+@@ -1265,7 +1277,7 @@
+
+ write(data.sockfd, "done", sizeof "done");
+ close(data.sockfd);
+-
++
+ }
+
+ print_report(iters, data.size, duplex, tposted, tcompleted);
diff -r -u /tmp/perftest-1.3.0/rdma_lat.c perftest-1.3.0/rdma_lat.c
--- /tmp/perftest-1.3.0/rdma_lat.c Wed Apr 7 09:44:33 2010
+++ perftest-1.3.0/rdma_lat.c Fri Feb 11 04:12:46 2011
@@ -874,9 +891,12 @@
&rem_dest->psn, &rem_dest->rkey, &rem_dest->vaddr);
if (parsed != 5) {
-@@ -220,7 +229,7 @@
+@@ -218,9 +227,9 @@
- if (n < 0) {
+ n = getaddrinfo(data->servername, service, &hints, &res);
+
+- if (n < 0) {
++ if (n != 0) {
fprintf(stderr, "%d:%s: %s for %s:%d\n",
- pid, __func__, gai_strerror(n),
+ (int)pid, __func__, gai_strerror(n),
@@ -962,11 +982,13 @@
goto err3;
}
ctx = pp_init_ctx(data->ib_dev, data);
-@@ -393,7 +402,7 @@
+@@ -392,8 +401,8 @@
+ if (asprintf(&service, "%d", data->port) < 0)
goto err5;
- if ( (n = getaddrinfo(NULL, service, &hints, &res)) < 0 ) {
+- if ( (n = getaddrinfo(NULL, service, &hints, &res)) < 0 ) {
- fprintf(stderr, "%d:%s: %s for port %d\n", pid, __func__,
++ if ( (n = getaddrinfo(NULL, service, &hints, &res) != 0) ) {
+ fprintf(stderr, "%d:%s: %s for port %d\n", (int)pid, __func__,
gai_strerror(n), data->port);
goto err5;
@@ -1384,6 +1406,24 @@
} else {
switch (params->mtu) {
+@@ -791,7 +807,7 @@
+
+ n = getaddrinfo(servername, service, &hints, &res);
+
+- if (n < 0) {
++ if (n != 0) {
+ fprintf(stderr, "%s for %s:%d\n", gai_strerror(n), servername, port);
+ return n;
+ }
+@@ -835,7 +851,7 @@
+
+ n = getaddrinfo(NULL, service, &hints, &res);
+
+- if (n < 0) {
++ if (n != 0) {
+ fprintf(stderr, "%s for port %d\n", gai_strerror(n), port);
+ return n;
+ }
@@ -869,7 +885,6 @@
close(sockfd);
return connfd;