<!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><FONT face=Arial size=2><SPAN class=070262408-27102008>We came accross the
fact, that Windows performance tests (ib_send_bw, ib_read_lat et al) do not work
with the same tests in Linux.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=070262408-27102008><FONT size=2>The
main problem was, that Linux stores values like qpn, psn, lid in little endian
format, while Windows - in big endian one.</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=070262408-27102008><FONT size=2>The
included patch solves the problem.</DIV></FONT></SPAN></FONT>
<DIV><FONT face=Arial size=2><SPAN
class=070262408-27102008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Index:
tools/perftests/user/perf_defs.h<BR>===================================================================<BR>---
tools/perftests/user/perf_defs.h (revision 1697)<BR>+++
tools/perftests/user/perf_defs.h (working copy)<BR>@@ -54,7 +54,7
@@<BR> #include <iba/ib_al.h><BR> <BR> #define KEY_MSG_SIZE
(sizeof "0000:000000:000000:00000000:0000000000000000")<BR>-#define
KEY_PRINT_FMT "%04x:%06x:%06x:%08x:%x"<BR>+#define KEY_PRINT_FMT
"%04x:%06x:%06x:%08x:%016I64x"<BR> #define KEY_SCAN_FMT
"%x:%x:%x:%x:%x"<BR> <BR> #define VERSION 2.0<BR>Index:
tools/perftests/user/perf_utils.c<BR>===================================================================<BR>---
tools/perftests/user/perf_utils.c (revision 1697)<BR>+++
tools/perftests/user/perf_utils.c (working copy)<BR>@@ -76,8 +76,8
@@<BR> {<BR> char
msg[KEY_MSG_SIZE];<BR> PERF_ENTER;<BR>- sprintf(msg,
KEY_PRINT_FMT,my_dest->lid, my_dest->qpn,<BR>- my_dest->psn,
my_dest->rkey, my_dest->vaddr);<BR>+ sprintf(msg,
KEY_PRINT_FMT,cl_hton16(my_dest->lid), cl_hton32(my_dest->qpn),
<BR>+ cl_hton32(my_dest->psn), cl_hton32(my_dest->rkey),
my_dest->vaddr);<BR> <BR> if (send(sockfd, msg, sizeof msg,0)
!= sizeof msg) {<BR> perror("pp_write_keys");<BR>@@ -101,8
+101,12 @@<BR> return
-1;<BR> }<BR> <BR>- parsed = sscanf(msg,
KEY_SCAN_FMT, &rem_dest->lid, &rem_dest->qpn,<BR>+ parsed =
sscanf(msg, KEY_PRINT_FMT, &rem_dest->lid,
&rem_dest->qpn,<BR> &rem_dest->psn,&rem_dest->rkey,
&rem_dest->vaddr);<BR>+ rem_dest->lid =
cl_ntoh16(rem_dest->lid);<BR>+ rem_dest->qpn =
cl_ntoh32(rem_dest->qpn);<BR>+ rem_dest->psn =
cl_ntoh32(rem_dest->psn);<BR>+ rem_dest->rkey =
cl_ntoh32(rem_dest->rkey);<BR> <BR> if (parsed != 5)
{<BR> fprintf(stderr, "Couldn't parse line <%.*s > parsed
= %d %s\n",<BR>Index:
tools/perftests/user/read_bw/read_bw.c<BR>===================================================================<BR>---
tools/perftests/user/read_bw/read_bw.c (revision 1697)<BR>+++
tools/perftests/user/read_bw/read_bw.c (working copy)<BR>@@ -399,7 +399,7
@@<BR> * We do it by exchanging data over a TCP socket
connection. */<BR> <BR> my_dest[i].lid =
ctx->ca_attr->p_port_attr[ib_port-1].lid;<BR>- my_dest[i].psn =
rand() & 0xffffff;<BR>+ my_dest[i].psn = cl_hton32(rand() &
0xffffff);<BR> if (!my_dest[i].lid)
{<BR> fprintf(stderr, "Local lid 0x0 detected. Is an SM
running?\n");<BR> return 1;<BR>Index:
tools/perftests/user/read_lat/read_lat.c<BR>===================================================================<BR>---
tools/perftests/user/read_lat/read_lat.c (revision 1697)<BR>+++
tools/perftests/user/read_lat/read_lat.c (working copy)<BR>@@ -410,7 +410,7
@@<BR> * We do it by exchanging data over a TCP socket
connection. */<BR> <BR> my_dest[i].lid =
ctx->ca_attr->p_port_attr[ib_port-1].lid;<BR>- my_dest[i].psn =
rand() & 0xffffff;<BR>+ my_dest[i].psn = cl_hton32(rand() &
0xffffff);<BR> if (!my_dest[i].lid)
{<BR> fprintf(stderr, "Local lid 0x0 detected. Is an SM
running?\n");<BR> return 1;<BR>Index:
tools/perftests/user/send_bw/send_bw.c<BR>===================================================================<BR>---
tools/perftests/user/send_bw/send_bw.c (revision 1697)<BR>+++
tools/perftests/user/send_bw/send_bw.c (working copy)<BR>@@ -502,7 +502,7
@@<BR> * We do it by exchanging data over a TCP socket
connection. */<BR> <BR> my_dest[i].lid =
ctx->ca_attr->p_port_attr[ib_port-1].lid;<BR>- my_dest[i].psn =
rand() & 0xffffff;<BR>+ my_dest[i].psn = cl_hton32(rand() &
0xffffff);<BR> if (!my_dest[i].lid)
{<BR> fprintf(stderr, "Local lid 0x0 detected. Is an SM
running?\n");<BR> return 1;<BR>@@ -606,16 +606,16
@@<BR> /*********************************************<BR>
* Important note :<BR> * In case of UD/UC this is NOT the way to
measure<BR>- * BW sicen we are running with loop on the send
side<BR>- * while we should run on the recieve side or enable retry in
SW<BR>+ * BW since we are running with loop on the send side<BR>+ *
while we should run on the receive side or enable retry in SW<BR> *
Since the sender may be faster than the reciver than although<BR> *
we had posted recieve it is not enough and might end this will<BR> *
result in deadlock of test since both sides are stuck on poll cq<BR>
* In this test i do not solve this for the general test ,need to
write<BR>- * seperate test for UC/UD but in case the tx_depth is ~1/3 from
the<BR>+ * separate test for UC/UD but in case the tx_depth is ~1/3 from
the<BR> * number of iterations this should be ok .<BR> *
Also note that the sender is limited in the number of send, ans<BR>- * i
try to make the reciver full <BR>+ * i try to make the receiver full
<BR>
*********************************************/<BR> /* send
*/<BR> if (user_param->connection_type==UD) {<BR>Index:
tools/perftests/user/send_lat/send_lat.c<BR>===================================================================<BR>---
tools/perftests/user/send_lat/send_lat.c (revision 1697)<BR>+++
tools/perftests/user/send_lat/send_lat.c (working copy)<BR>@@ -488,7 +488,7
@@<BR> * We do it by exchanging data over a TCP socket
connection. */<BR> <BR> my_dest[i].lid =
ctx->ca_attr->p_port_attr[ib_port-1].lid;<BR>- my_dest[i].psn =
rand() & 0xffffff;<BR>+ my_dest[i].psn = cl_hton32(rand() &
0xffffff);<BR> if (!my_dest[i].lid)
{<BR> fprintf(stderr, "Local lid 0x0 detected. Is an SM
running?\n");<BR> return 1;<BR>Index:
tools/perftests/user/write_bw/write_bw.c<BR>===================================================================<BR>---
tools/perftests/user/write_bw/write_bw.c (revision 1697)<BR>+++
tools/perftests/user/write_bw/write_bw.c (working copy)<BR>@@ -429,7 +429,7
@@<BR> * We do it by exchanging data over a TCP socket
connection. */<BR> <BR> my_dest[i].lid =
ctx->ca_attr->p_port_attr[ib_port-1].lid;<BR>- my_dest[i].psn =
rand() & 0xffffff;<BR>+ my_dest[i].psn = cl_hton32(rand() &
0xffffff);<BR> if (!my_dest[i].lid)
{<BR> fprintf(stderr, "Local lid 0x0 detected. Is an SM
running?\n");<BR> return 1;<BR>Index:
tools/perftests/user/write_lat/write_lat.c<BR>===================================================================<BR>---
tools/perftests/user/write_lat/write_lat.c (revision 1697)<BR>+++
tools/perftests/user/write_lat/write_lat.c (working copy)<BR>@@ -419,7
+419,7 @@<BR> * We do it by exchanging data over a TCP socket
connection. */<BR> <BR> my_dest[i].lid =
ctx->ca_attr->p_port_attr[ib_port-1].lid;<BR>- my_dest[i].psn =
rand() & 0xffffff;<BR>+ my_dest[i].psn = cl_hton32(rand() &
0xffffff);<BR> if (!my_dest[i].lid)
{<BR> fprintf(stderr, "Local lid 0x0 detected. Is an SM
running?\n");<BR> return
1;<BR></FONT></DIV></BODY></HTML>