Commit Graph

666 Commits

Author SHA1 Message Date
Bruce A. Mah
165abd67b4
Add spec file to .gitignore. 2014-10-23 14:46:53 -07:00
Bruce A. Mah
29dbc41c1d Also maintain the min and mean of the RTT.
For issue #215.
2014-10-23 13:39:58 -07:00
Bruce A. Mah
c7b0726a38 Merge branch 'master' of github.com:esnet/iperf 2014-10-23 11:11:08 -07:00
Bruce A. Mah
432ef7ebb3 Retrieve RTT information on platforms supporting it.
This value is available on the sender side, expressed in
microseconds.  It's available in the JSON output.

In the JSON output we also output the maximum observed RTT
per-stream.  Note that since the observation interval is many times
the RTT, it's not clear how good this value would be at capturing the
largest computed RTT value over the lifetime of each stream.

While here, also determine the maximum observed snd_cwnd value over
the lifetime of each stream.

This all works pretty well on Linux, but on FreeBSD (which should
theoretically be supported) we don't do a good job of supporting the
tcp_info structure.  We need to make this code a lot more portable,
rather than just assuming the world of platforms is "Linux"
vs. "everything else".  Fixing this requires some rearchitecting of
the way that we retrieve, compute, and print statistics.

Part of a fix for #215.
2014-10-23 11:10:39 -07:00
Bruce A. Mah
1d85c269a6 Fix an error message. 2014-10-16 12:30:51 -07:00
Bruce A. Mah
0932b664ed Update a comment...TCP_CONGESTION works on FreeBSD. 2014-10-16 12:29:11 -07:00
Bruce A. Mah
662a7ca035 Regen. 2014-10-16 11:30:07 -07:00
Bruce A. Mah
ddf5579182 Improve SCTP detection on Solaris. 2014-10-16 11:29:41 -07:00
Bruce A. Mah
9e93dabf7a Regen. 2014-10-16 11:14:23 -07:00
Bruce A. Mah
c5cf8972a0 Merge pull request #211 from atcorner/illumos
Fix build on illumos.
2014-10-16 11:13:47 -07:00
Ante Vojvodic
a565fa6b27 Identify Solaris based OS. 2014-10-16 18:01:29 +02:00
Bruce A. Mah
bc1edbe871
Update for iperf-3.0.9. 2014-10-14 14:47:03 -07:00
Bruce A. Mah
bf22c9d192 Regen. 2014-10-14 13:45:04 -07:00
Bruce A. Mah
d1aab09209
Add iperf3.spec and autoconf goop for filling in version number.
Submitted by:	@i2aaron
2014-10-14 13:41:48 -07:00
Bruce A. Mah
96d0c77ca2 The maximum send length for UDP is the maximum size of a UDP datagram.
For UDP over IPv4, this is the maximum IPv4 packet size (65535) minus
the size of the IPv4 and UDP headers, arriving at 65507.

In theory for a system implementing IPv6 jumbogram support, there is
no maximum packet size for UDP.  In practice we've observed with
CentOS 5 a limitation of 65535 - 8, which is dictated by the size
field in the UDP header (it has a maximum value of 65535, but needs
to count both payload and header bytes, thus subtracting off the 8
bytes for the UDP header).

We take the most conservative approach and use the 65507 value
for UDP / IPv4.

This is (I believe) the last part of issue #212.
2014-10-13 08:55:41 -07:00
Bruce A. Mah
8694d1db0d Make UDP packet reception work right with non-blocking sockets and enable.
We need this to permit a UDP receiving iperf3 server to listen on its
control channel.

The fix for non-blocking sockets basically makes sure that if we do a
read on a non-blocking sockets, but there's no data, the UDP processing
code does *not* try to do the normal protocol packet processing on the
non-existent packet.

This is part of an ongoing fix for issue #212 but also should have been
a part of the fix for issue #125.
2014-10-13 04:28:58 -07:00
Bruce A. Mah
78033c4359 Fix a crash when we try to print ending stats but no tests were run.
This can happen if the server gets into a weird state (see the test
cases for reproducing issue #212).  We need to do a couple of checks
to make sure we're not dereferencing NULL pointers (yay C).

While here, also fix up a couple of related output glitches, where
in this case we can emit some invalid JSON (NaN values, such as what
you get if there's a division by zero, are not valid JSON).

Part of a fix in progress for #212.
2014-10-13 01:50:04 -07:00
Ante Vojvodic
165d10de0f Fix build on illumos. 2014-10-06 18:38:17 +02:00
Bruce A. Mah
bcd038dd93
Gah. 2014-09-30 14:06:39 -07:00
Bruce A. Mah
8344b69872
Update for 3.0.8, fix minor error in release engineering checklist. 2014-09-30 14:04:30 -07:00
Bruce A. Mah
8634b34804
Regen. 2014-09-29 14:03:04 -07:00
Bruce A. Mah
da9f046f19
Update license and copyright text to conform to LBNL standards.
Note that the license remains a 3-clause BSD license; the only
license changes were to add the name of the program and to add
some punctuation.
2014-09-29 14:00:46 -07:00
Bruce A. Mah
8365c3d003
Don't pass NULL when we really mean to pass 0.
Fixes a warning on MacOS.
2014-09-22 15:11:59 -07:00
Bruce A. Mah
9fc0149e1c
Fix a couple of printf format warnings.
Also if we try to compile on an unsupported platform, emit some code
in portable_endian.h that at least has a chance of compiling, rather
than erroring out right away.

For #191.
2014-09-22 15:06:27 -07:00
Bruce A. Mah
738c4dc68f Make this work on FreeBSD.
From my understanding this should make it work on NetBSD and Dragonfly
as well.

Part of #191.
2014-09-19 15:11:02 -07:00
Bruce A. Mah
529aeacfd2 Make portable_endian.h more portable.
Add a minimal amount of stuff so we can compile on Solaris 11.

Fixes (sort of) #191.
2014-09-19 11:14:29 -07:00
Bruce A. Mah
236dcb0b2a Use HAVE_STDINT_H to prevent a recurrence of #175. 2014-09-19 11:12:49 -07:00
Bruce A. Mah
d0d17267a7 Merge pull request #206 from duyaokun/fix-compile-cjson-error
Fixed compilation error in src/cjson.c observed in Visual Studio 2013.

This problem didn't cause breakage on any other platform, but this change should have been present anyway.

(cherry picked from commit dd2968f21e)
Signed-off-by: Bruce A. Mah <bmah@es.net>
2014-09-16 13:00:58 -07:00
Bruce A. Mah
1f29ffe70d Fix build on OpenBSD (tested on 5.4).
Breakage was introduced with commits for Issue #191.
2014-09-15 15:09:50 -07:00
Bruce A. Mah
df9230810f Merge branch 'kevinconstantine-master' 2014-09-15 14:31:20 -07:00
Bruce A. Mah
ac468c8bc0 Comment fix: Fix the option associated with iperf_test.bind_port.
No functional change.
2014-09-15 14:30:33 -07:00
Kevin Constantine
517321138a Support --cport and --parallel
When running multiple parallel streams, the specified port number
is incremented for each successive stream.

Signed-off-by: Kevin Constantine <kevin.constantine@gmail.com>
2014-09-15 14:15:04 -07:00
Kevin Constantine
90f317355d Fix declaration of iperf_test.bind_port
Signed-off-by: Kevin Constantine <kevin.constantine@gmail.com>
2014-09-15 14:14:10 -07:00
Bruce A. Mah
5fef310cdf Merge branch 'kevinconstantine-master' 2014-09-15 13:22:10 -07:00
Bruce A. Mah
de1683975b
Minor documentation updates for new --cport option.
For #207.
2014-09-15 13:11:15 -07:00
Bruce A. Mah
785c8a42c9 Merge branch 'master' of github.com:kevinconstantine/iperf into kevinconstantine-master 2014-09-15 12:58:01 -07:00
Bruce A. Mah
fbd89512af Add some text to the README about info that's useful in bug reports.
A couple of other minor wording tweaks here and there.
2014-09-15 11:00:08 -07:00
Kevin Constantine
023fb45e7a specify client-side port: UDP support
--cport can be specified for udp connections

Signed-off-by: Kevin Constantine <kevin.constantine@gmail.com>
2014-09-15 10:57:43 -07:00
Kevin Constantine
499b122230 specify client-side port: Only support --cport
Remove support for short-option -e

Signed-off-by: Kevin Constantine <kevin.constantine@gmail.com>
2014-09-15 10:55:09 -07:00
Bruce A. Mah
b09e51eb40
Regen. 2014-09-15 10:45:03 -07:00
Bruce A. Mah
a1861d5f87
Rename locale.{c,h} to iperf_locale.{c,h} to avoid filename collision
with system header <locale.h>.

This apparently fixes problems on an ARM build, but this was generally
broken anyway.  It's slightly amazing this didn't cause problems before;
perhaps we never used <locale.h> before?

Addresses #203.
2014-09-15 10:42:36 -07:00
Kevin Constantine
b7b1b32afe Add support for specifying client-side epemeral port
-e/--cport now allows a user to specify the client-side port
used for data transfer.

Signed-off-by: Kevin Constantine <kevin.constantine@gmail.com>
2014-09-09 16:31:57 -07:00
Bruce A. Mah
bd9e3ae5bf D'oh. Note a problem I had when sending out the most recent release. 2014-08-28 15:38:23 -07:00
Bruce A. Mah
e067e9ac6b Update for iperf-3.0.7 release. 2014-08-28 13:58:16 -07:00
Bruce A. Mah
329523a557
Add a --udp-counters-64bit feature to support very long UDP tests.
UDP tests store a packet sequence number in the packets to detect loss
and ordering issues.  This sequence number is a 32-bit signed integer,
which can wrap during very long-running UDP tests.  This change adds
an option (defaulting to off) which uses a 64-bit unsigned integer to
store this quantity in the packet.  The option is specified on the
client side; the server must support this feature for proper
functioning (older servers will interoperate with newer clients, as
long as --udp-counters-64-bit is not used).

The default might be changed in a future version of iperf3.

As a part of this change, the client sends its version string to the
server in the parameter block.

Uses a public-domain compatibility shim for 64-bit byte order
conversions.  There are probably some additional platforms that need
to be supported, in particular Solaris.  We might add some
configure-time checks to only enable this feature on platforms where
we can support the byte-order conversions.

This change is not well-tested.

Towards issue #191.
2014-08-28 08:59:32 -07:00
Bruce A. Mah
d30a2c8d04 Update release notes for recent fixes. 2014-08-27 15:54:27 -07:00
Bruce A. Mah
40d45dcf34 Fix a problem that could disrupt existing tests.
By design, an iperf3 server only runs one test at a time.  New
connections from other clients (during an existing test) are
rejected.  A problem is that the server code that rejects the test
tries (for some reason) to read the cookie from the client, even
though it's going to reject the connection anyway.

A way to break an existing test is:  With a test running, make a TCP
connection to the server's control port (this can easily be done with
a telnet client).  The server will hang in a blocking read call trying
to read the cookie from a non-existent client, while the test is
essentially frozen.

The fix is to remove the attempted read of the cookie.

Fixes #202.
2014-08-27 14:48:09 -07:00
Bruce A. Mah
aea943c31a
Add Links section with links to community-contributed content. 2014-08-26 14:31:23 -07:00
Bruce A. Mah
5628e0afae
Update LICENSE to reflect new bootstrap.sh. 2014-08-26 14:21:29 -07:00
Bruce A. Mah
f50627706f
When parsing the -b (bandwidth) argument, use 10-based suffices.
We support using k, m, and g as suffices on input values.  In most
cases these are 2-based suffixes (i.e. K == 1024) because they are
sizes of objects.  In the case of rates, we need to use 10-based
suffices (i.e. K == 1000).

We do this by implementing (using copy-and-paste) a unit_atof_rate()
subroutine that parses strings similarly to unit_atof but using
10-based suffices instead.

Fixes #173.
2014-08-25 16:43:46 -07:00