<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=174280919-18022009><FONT face=Arial color=#0000ff size=2>This
is an updated patch to WinVerbs tests.</FONT></SPAN></DIV>
<DIV><SPAN class=174280919-18022009><FONT face=Arial color=#0000ff size=2>It
solves two problems:</FONT></SPAN></DIV>
<DIV><SPAN class=174280919-18022009><FONT face=Arial color=#0000ff size=2>1.
Support correct work with both IPv6 and IPv4 host addresses;</FONT></SPAN></DIV>
<DIV><SPAN class=174280919-18022009><FONT face=Arial color=#0000ff size=2>2.
Calculate correctly the latencies on win2k8.</FONT></SPAN></DIV>
<DIV><SPAN class=174280919-18022009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174280919-18022009><FONT face=Arial color=#0000ff size=2>After
the fix WinVerbs' performance tests shows approximately the same results as
Ibal's ones.</FONT></SPAN></DIV>
<DIV><SPAN class=174280919-18022009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174280919-18022009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=174280919-18022009></SPAN> </DIV>
<DIV><SPAN class=174280919-18022009><FONT face=Arial color=#0000ff size=2>Index:
tests/perftest/rdma_bw/rdma_bw.c<BR>===================================================================<BR>---
tests/perftest/rdma_bw/rdma_bw.c (revision 1977)<BR>+++
tests/perftest/rdma_bw/rdma_bw.c (working copy)<BR>@@ -384,10 +384,10
@@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd != INVALID_SOCKET)
{<BR>+ n =
0;<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char
*) &n, sizeof n);<BR> n =
1;<BR>- <BR> setsockopt(sockfd, SOL_SOCKET,
SO_REUSEADDR, (char *) &n, sizeof
n);<BR>- <BR> if (!bind(sockfd, t->ai_addr,
t->ai_addrlen))<BR> break;<BR> closesocket(sockfd);<BR>Index:
tests/perftest/rdma_lat/rdma_lat.c<BR>===================================================================<BR>---
tests/perftest/rdma_lat/rdma_lat.c (revision 1977)<BR>+++
tests/perftest/rdma_lat/rdma_lat.c (working copy)<BR>@@ -439,8 +439,8
@@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd != INVALID_SOCKET)
{<BR>- n = 1;<BR>- <BR>+ n =
0;<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char
*) &n, sizeof n);<BR> if (!bind(sockfd,
t->ai_addr,
t->ai_addrlen))<BR> break;<BR> closesocket(sockfd);<BR>@@
-1177,7 +1177,6 @@<BR> <BR> if (scnt < iters)
{<BR> struct ibv_send_wr
*bad_wr;<BR>- tstamp[scnt] =
get_cycles();<BR> <BR> *post_buf =
(char)++scnt;<BR> if (ibv_post_send(qp, wr, &bad_wr))
{<BR>@@ -1185,6 +1184,7
@@<BR> scnt);<BR> return
11;<BR> }<BR>+ tstamp[scnt-1] =
get_cycles();<BR> }<BR> <BR> if (ccnt
< iters) {<BR>Index:
tests/perftest/read_bw/read_bw.c<BR>===================================================================<BR>---
tests/perftest/read_bw/read_bw.c (revision 1977)<BR>+++
tests/perftest/read_bw/read_bw.c (working copy)<BR>@@ -208,10 +208,10
@@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd != INVALID_SOCKET)
{<BR>+ n =
0;<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char *)
&n, sizeof n);<BR> n =
1;<BR>-<BR> setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
(char *) &n, sizeof n);<BR>-<BR> if (!bind(sockfd,
t->ai_addr,
t->ai_addrlen))<BR> break;<BR> closesocket(sockfd);<BR>Index:
tests/perftest/read_lat/read_lat.c<BR>===================================================================<BR>---
tests/perftest/read_lat/read_lat.c (revision 1977)<BR>+++
tests/perftest/read_lat/read_lat.c (working copy)<BR>@@ -252,10 +252,10
@@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd != INVALID_SOCKET)
{<BR>+ n =
0;<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char *)
&n, sizeof n);<BR> n =
1;<BR>-<BR> setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
(char *) &n, sizeof n);<BR>-<BR> if (!bind(sockfd,
t->ai_addr,
t->ai_addrlen))<BR> break;<BR> closesocket(sockfd);<BR>@@
-675,12 +675,12 @@<BR> while (scnt < user_param->iters )
{<BR> struct ibv_send_wr
*bad_wr;<BR> *post_buf =
(char)++scnt;<BR>- tstamp[scnt - 1] =
get_cycles();<BR> if (ibv_post_send(qp, wr, &bad_wr))
{<BR> fprintf(stderr, "Couldn't post send:
scnt=%d\n",<BR> scnt);<BR> return
11;<BR> }<BR>+ tstamp[scnt - 1] =
get_cycles();<BR> if (user_param->use_event)
{<BR> struct ibv_cq
*ev_cq;<BR> void
*ev_ctx;<BR>Index:
tests/perftest/send_bw/send_bw.c<BR>===================================================================<BR>---
tests/perftest/send_bw/send_bw.c (revision 1977)<BR>+++
tests/perftest/send_bw/send_bw.c (working copy)<BR>@@ -223,10 +223,10
@@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd != INVALID_SOCKET)
{<BR>+ n =
0;<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char *)
&n, sizeof n);<BR> n =
1;<BR>-<BR> setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
(char *) &n, sizeof n);<BR>-<BR> if (!bind(sockfd,
t->ai_addr,
t->ai_addrlen))<BR> break;<BR> closesocket(sockfd);<BR>Index:
tests/perftest/send_lat/send_lat.c<BR>===================================================================<BR>---
tests/perftest/send_lat/send_lat.c (revision 1977)<BR>+++
tests/perftest/send_lat/send_lat.c (working copy)<BR>@@ -263,10 +263,9
@@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd != INVALID_SOCKET)
{<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char *)
&n, sizeof n);<BR> n =
1;<BR>-<BR> setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
(char *) &n, sizeof n);<BR>-<BR> if (!bind(sockfd,
t->ai_addr,
t->ai_addrlen))<BR> break;<BR> closesocket(sockfd);<BR>@@
-911,13 +910,13
@@<BR> <BR> }<BR> /* client
post first */<BR>- tstamp[scnt] =
get_cycles();<BR> *post_buf =
(char)++scnt;<BR> if (ibv_post_send(qp, wr, &bad_wr))
{<BR> fprintf(stderr, "Couldn't post send:
scnt=%d\n",<BR> scnt);<BR> return
11;<BR> }<BR>+ tstamp[scnt-1] =
get_cycles();<BR> }<BR> if (poll == 1)
{<BR> struct ibv_wc wc;<BR>Index:
tests/perftest/write_bw/write_bw.c<BR>===================================================================<BR>---
tests/perftest/write_bw/write_bw.c (revision 1977)<BR>+++
tests/perftest/write_bw/write_bw.c (working copy)<BR>@@ -217,10 +217,10
@@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd != INVALID_SOCKET)
{<BR>+ n =
0;<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char *)
&n, sizeof n);<BR> n =
1;<BR>-<BR> setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
(char *) &n, sizeof n);<BR>-<BR> if (!bind(sockfd,
t->ai_addr,
t->ai_addrlen))<BR> break;<BR> closesocket(sockfd);<BR>Index:
tests/perftest/write_bw_postlist/write_bw_postlist.c<BR>===================================================================<BR>---
tests/perftest/write_bw_postlist/write_bw_postlist.c (revision 1977)<BR>+++
tests/perftest/write_bw_postlist/write_bw_postlist.c (working copy)<BR>@@
-220,10 +220,10 @@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd >= 0)
{<BR>+ n =
0;<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char *)
&n, sizeof n);<BR> n =
1;<BR>-<BR> setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
&n, sizeof n);<BR>-<BR> if (!bind(sockfd,
t->ai_addr,
t->ai_addrlen))<BR> break;<BR> close(sockfd);<BR>Index:
tests/perftest/write_lat/write_lat.c<BR>===================================================================<BR>---
tests/perftest/write_lat/write_lat.c (revision 1977)<BR>+++
tests/perftest/write_lat/write_lat.c (working copy)<BR>@@ -249,10 +249,10
@@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd != INVALID_SOCKET)
{<BR>+ n =
0;<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char *)
&n, sizeof n);<BR> n =
1;<BR>-<BR> setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
(char *) &n, sizeof n);<BR>-<BR> if (!bind(sockfd,
t->ai_addr,
t->ai_addrlen))<BR> break;<BR> closesocket(sockfd);<BR>@@
-711,7 +711,6 @@<BR> <BR> if (scnt <
user_param->iters) {<BR> struct ibv_send_wr
*bad_wr;<BR>- tstamp[scnt] =
get_cycles();<BR> <BR> *post_buf =
(char)++scnt;<BR> <BR>@@ -720,6 +719,7
@@<BR> scnt);<BR> return
11;<BR> }<BR>+ tstamp[scnt-1] =
get_cycles();<BR> }<BR> <BR> if (ccnt
< user_param->iters) {<BR>Index:
ulp/libibverbs/examples/rc_pingpong/rc_pingpong.c<BR>===================================================================<BR>---
ulp/libibverbs/examples/rc_pingpong/rc_pingpong.c (revision 1977)<BR>+++
ulp/libibverbs/examples/rc_pingpong/rc_pingpong.c (working copy)<BR>@@
-207,10 +207,10 @@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd != INVALID_SOCKET)
{<BR>+ n =
0;<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char *)
&n, sizeof n);<BR> n =
1;<BR>-<BR> setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
(char *) &n, sizeof n);<BR>-<BR> if (!bind(sockfd,
t->ai_addr,
t->ai_addrlen))<BR> break;<BR> closesocket(sockfd);<BR>Index:
ulp/libibverbs/examples/srq_pingpong/srq_pingpong.c<BR>===================================================================<BR>---
ulp/libibverbs/examples/srq_pingpong/srq_pingpong.c (revision 1977)<BR>+++
ulp/libibverbs/examples/srq_pingpong/srq_pingpong.c (working copy)<BR>@@
-248,10 +248,10 @@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd >= 0)
{<BR>+ n =
0;<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char *)
&n, sizeof n);<BR> n =
1;<BR>-<BR> setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
&n, sizeof n);<BR>-<BR> if (!bind(sockfd,
t->ai_addr,
t->ai_addrlen))<BR> break;<BR> close(sockfd);<BR>Index:
ulp/libibverbs/examples/uc_pingpong/uc_pingpong.c<BR>===================================================================<BR>---
ulp/libibverbs/examples/uc_pingpong/uc_pingpong.c (revision 1977)<BR>+++
ulp/libibverbs/examples/uc_pingpong/uc_pingpong.c (working copy)<BR>@@
-194,10 +194,10 @@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd != INVALID_SOCKET)
{<BR>+ n =
0;<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char *)
&n, sizeof n);<BR> n =
1;<BR>-<BR> setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
(char *) &n, sizeof n);<BR>-<BR> if (!bind(sockfd,
t->ai_addr,
t->ai_addrlen))<BR> break;<BR> closesocket(sockfd);<BR>Index:
ulp/libibverbs/examples/ud_pingpong/ud_pingpong.c<BR>===================================================================<BR>---
ulp/libibverbs/examples/ud_pingpong/ud_pingpong.c (revision 1977)<BR>+++
ulp/libibverbs/examples/ud_pingpong/ud_pingpong.c (working copy)<BR>@@
-195,10 +195,10 @@<BR> for (t = res; t; t = t->ai_next)
{<BR> sockfd = socket(t->ai_family, t->ai_socktype,
t->ai_protocol);<BR> if (sockfd != INVALID_SOCKET)
{<BR>+ n =
0;<BR>+ setsockopt(sockfd,IPPROTO_IPV6,IPV6_V6ONLY,(char *)
&n, sizeof n);<BR> n =
1;<BR>-<BR> setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR,
(char *) &n, sizeof n);<BR>-<BR> if (!bind(sockfd,
t->ai_addr,
t->ai_addrlen))<BR> break;<BR> closesocket(sockfd);<BR></FONT></SPAN></DIV></BODY></HTML>