[netperf-talk] nonsense results from windows with 2.4.x / trunk
Andrew Gallatin
gallatin at cs.duke.edu
Wed Jun 28 09:42:42 PDT 2006
Andrew Gallatin writes:
>
> I was trying to track down why netperf2.4 gives nonsense
> results on windows when built with cygwin. I think I have
> tracked it down to a glibc'ism in htond()/ntohd().
>
> The problem seems to be that __BYTE_ORDER is declared on cygwin, but
> __FLOAT_WORD_ORDER is not. This leads to falling into the /* Fixup
> mixed endian floating point machines */ code, which causes the
> problem. Plenty of other platforms (FreeBSD, Solaris, MacOSX) seem to
> define neither, so they avoided this problem.
>
> The attached patch seems to make netperf/netserver behave
> on Windows.
>
Turns out that netperf is much slower (nearly a factor of 2) when
built in cygwin. Using MS DDK way of building it makes it just as
fast (or faster) than an old netperf 2.1 binary I had laying around.
In order to get it to build, I needed to fix 2 warnings (treated
as errors) in netlib.c:access_buffer()
- dirty_totals might be used uninitialized
- adding i to *temp_buffer might result in overflow
I've attached an updated patch that gets netperf 2.4 building/running
correctly using both the cygwin and MS DDK ways of building.
Drew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winfix.diff
Type: application/octet-stream
Size: 1225 bytes
Desc: windows fixes
Url : http://www.netperf.org/pipermail/netperf-talk/attachments/20060628/b5602b94/winfix.obj
More information about the netperf-talk
mailing list