Commit Graph

741 Commits

Author SHA1 Message Date
Havard Eidnes
621a152b7c Include <sys/time.h> for struct timeval definition. 2015-02-12 15:04:16 +01:00
Havard Eidnes
081ad7c08c Add casts for the two remaining tolower() uses, since
tolower() is undefined for negative character values
(except for -1).

Also simplify the existing casts for tolower() usages.
2015-02-12 14:58:54 +01:00
Bruce A. Mah
6bd4e258d0 Make the combination of -B and -P but not --cport work
The case where we should have been binding the client sockets to
ephemeral ports at a specific address for parallel tests was broken.

Fixes #239

Submitted by:  @jfitzgibbon
2015-01-14 08:40:26 -08:00
Bruce A. Mah
20bd2a6efa
Generate sha256 file automatically so we don't have to copy-and-paste it. 2015-01-09 10:53:03 -08:00
Bruce A. Mah
c4719dd165
Update for 3.0.11. Also...
Move old news to a lower section level to avoid cluttering up the
table of contents.  Update copyrights and some other version numbers.
2015-01-09 10:52:11 -08:00
Bruce A. Mah
bf32d9de66
Regen. 2015-01-06 10:40:04 -08:00
Bruce A. Mah
8fb86886a4
Really make sctp_assoc_value test work correctly, at least on FreeBSD. 2015-01-06 10:34:41 -08:00
Bruce A. Mah
3b60f09017 Unbreak (partially) SCTP on Solaris.
Solaris implements an (older?) version of the API for SCTP_MAXSEG,
which takes an integer argument rather than a struct sctp_assoc_val.
We need to test for that and handle it appropriately.  There are some
signs it doesn't even work correctly if we do this, so quietly ignore
errors that happen if the OS complains it's unsupported.

Also, Solaris doesn't support SCTP_DISABLE_FRAGMENTS even though it
defines the preprocessor symbol for this.  Rather than aborting when
we try to unsuccessfully unset this option, just ignore the error.

Lightly tested with SCTP over IPv6 on localhost.
2015-01-06 10:22:00 -08:00
Bruce A. Mah
4874c4a88b
Regen. 2015-01-05 15:23:07 -08:00
Bruce A. Mah
e142062572
Add -X to restrict SCTP binding to a subset of interfaces.
Contains an alternate implementation of previously-submitted patches
to set the maximum segment size and no-delay options.

As a result of this change, SCTP functionality on Linux will generally
require the libsctp library (on CentOS and similar distributions this
is provided by the lksctp-tools RPM).

Part of #131.

Submitted by:	Bruce Simpson <bs48@st-andrews.ac.uk>
2015-01-05 15:19:57 -08:00
Bruce A. Mah
eb9a2c07c3 Unbreak master builds on CentOS 5.
The problem is that the new byte-ordering macros adopted on master
don't support CentOS 5 because they assumed that any Linux system had
endian(3) support.  CentOS 6 (and presumably newer) do, but CentOS 5
doesn't.

So instead we only do glibc endian(3) support if we're on a system
with glibc 2.9 or higher (which is when this functionality was
introduced).

For any other platform that we don't detect (which now includes older
glibc such as CentOS 5), bring back our homebrewed htonll and ntohll
implementation from iperf 3.0.x.

Fixes #224.
2015-01-05 10:42:09 -08:00
Bruce A. Mah
59e1c29f49 Merge branch https://github.com/candlerb/iperf/tree/candlerb-multisend in #232 to master
* candlerb-candlerb-multisend:
  Drop out of multisend loop if none of the streams are accepting data
2015-01-02 10:34:13 -08:00
Bruce A. Mah
bebb7dea76 Merge branch 'candlerb-multisend' of https://github.com/candlerb/iperf into candlerb-candlerb-multisend 2015-01-02 10:00:37 -08:00
Bruce A. Mah
c0f4fa6ac0 Merge pull request #231 from candlerb/candlerb-sendfile-stats
Fix calculation of sendfile throughput on OSX and FreeBSD.
2015-01-02 09:54:34 -08:00
Bruce A. Mah
d275f166c8 Merge pull request #222 from hasso/timeout-udp
Timeout if UDP port isn't reachable.

This handles the case that a control connection succeeds but UDP packets are blocked by a firewall.
2014-12-23 10:39:11 -08:00
Brian Candler
a80368bb7f Drop out of multisend loop if none of the streams are accepting data 2014-12-23 09:38:50 +00:00
Bruce A. Mah
dba611dbe4 Add one-off mode, where the server serves exactly one request.
Primarily useful for bwctl integration, this is enabled with the -1
and/or --one-off flags.

Fixes #230, based on a patch by @i2aaron.

Signed-off-by: Bruce A. Mah <bmah@es.net>
2014-12-22 14:45:40 -08:00
Bruce A. Mah
4450b1b86d Merge pull request #233 from candlerb/candlerb-zerocopy-force
Ignore set_test_zerocopy if host does not support it
2014-12-22 13:24:47 -08:00
Brian Candler
8961016f90 Ignore set_test_zerocopy if host does not support it 2014-12-22 18:04:56 +00:00
Brian Candler
588ee5223e Fix calculation of sendfile throughput on OSX
Note that sendfile can return -1 for EINTR whilst having already sent
partial results; these were not being counted previously.
2014-12-22 10:38:59 +00:00
Bruce A. Mah
fab3e1dd85
Update documentation site for 3.0.10. 2014-12-16 14:37:03 -08:00
Hasso Tepper
b83791882d Add ifdef to the SO_RCVTIMEO code
Not all platforms have a SO_RCVTIMEO socket option.
2014-12-11 12:59:02 +02:00
Hasso Tepper
9b9dd03096 Timeout if UDP port isn't reachable
Add timeout to the UDP socket. Without it client would block infinitely
if creating a control connection succeeds, but UDP packets are dropped
by firewall.
2014-11-24 10:02:37 +02:00
Bruce A. Mah
72ac83e7f2 Make UDP tests honor the -w option for setting the socket buffer
size.

This appears to be necessary on some long, high-bandwidth paths
to get sane results, either by reducing packet loss or by somehow
allowing the sending host of a test to go faster.

Fixes #219.
2014-11-12 13:58:23 -08:00
Bruce A. Mah
d65986030a Document how we use UDP sockets.
Comment changes only, no functional changes.
2014-11-12 12:10:33 -08:00
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