This makes SCTP with default parameters work on CentOS 6; formerly
it was just using the TCP default (128KB) and failing with
a "message too long" error. It might be possible to fix this with
some manipulation of other default values, so that TCP and SCTP
can use the same default message size, but I haven't figure out
what this would be.
This ties up one loose end from Issue 131.
Note this option only has a long option flag; we're running out of
letters for short options.
Based heavily on a patch submitted in Issue 131 (SCTP support for
iperf); I added support for FreeBSD and did some other packaging and
documentation improvements.
We probably shouldn't tie SCTP support to looking specifically for
Linux or FreeBSD; we probably leave support enabled all the time if
possible, possibly with some configure-time checks.
We were computing and printing this in JSON output mode anyway; this
change just exposes this quantity in a human-friendly manner (better
than the first attempt at this) when doing normal output.
Resolves Issue 99 (Additional TCP_INFO items).
The bug and solution are very similar to Issue 126 (fixed in
d7e0c1445c0a). Basically a setsockopt(IPV6_V6ONLY) call had a bogus
level argument, but we never checked the return value so we never
noticed this.
As with the prior issue, the fix is to unbreak the setsockopt() call,
and add some error checking to detect future breakage.
This bug was on a codepath that only got called if non-default values
were set for the socket buffer size, the MSS, or the NODELAY parameter.
It might have affected some FreeBSD tests, but really only got noticed
when debugging some other code that was (probably) cut-and-pasted
from this code.
mapped_v4_to_regular_v4() committed the sin of doing strcpy(3) on
overlapping buffers. This caused an abort on MacOS X 10.9. Fix this
to use memcpy(3) instead, which handles overlapping buffers correctly.
Issue: 135 (Crash on OS X when using IP address)
Apparently older kernels don't support TCP_CONGESTION, so we can't
just test for defined(linux) to know if we can use this sockopt or not.
This change unbreaks the build on (notably) CentOS 5.
Mostly this change consists of adding FreeBSD-specific code to handle
this feature. The concepts and system calls are very similar to what's
already done for Linux. One difference is that on FreeBSD, the CPU
affinity mask is saved before -A processing and restored afterwards.
This causes a slight change to the function signatures for
iperf_setaffinity() and iperf_clearaffinity() (these functions
however are not documented as a part of the libiperf3 API).
Slightly improve some of the documentation for the -A command line
option, to hopefully stave off some of the questions about this
feature.
Mostly based on a submitted patch.
Issue: 128 (better error message for CPU affinity failure)
Submitted by: Susant Sahani <ssahani@redhat.com>
Allow optional specification of a version string (the intended use of
this to be able to roll a tarball from a source tree / repo that's not
the exact version being released).
Compute and display SHA256 hash of the tarball on Linux, FreeBSD, and
MacOS.
Don't exclude make_release from the tarball (no point in hiding it)
but do try a little harder to get rid of .hg\* files.
Comment out some debugging code.
When the client process gets interrupted, both the client and server
dump out accumulated interval statistics, as well as a partial set of
summary statistics (basically each side dumps what it has, but without
the exchange of information that usually happens at the end of a
normal run).
If the server process gets interrupted, the server dumps out its
accumulated interval and summary statistics as above. The client does
this as well in the -R case, but exits with a "Broken pipe" in the non
-R case (this behavior was present all along; it was not introduced in
this change). More investigation will be needed to understand the
client behavior.
Bump copyright dates in a few places.
Issue: 132 (signal handler for API calls)
Discussed with: aaron@internet2.edu
In -R mode, the test consists of the server sending to the client
until the client tells it to stop by setting the test state to
TEST_END via the control socket. However once the client changes the
test state, it stopped reading the incoming test data from the server.
In many (but not all) scenarios this could result in the server
filling up its send window (thus blocking on writes) before the
TEST_END message arrived from the client. At this point the server
was hanging waiting for the client to drain its data connection(s),
and the client was waiting for the server to send a state change
message for EXCHANGE_RESULTS.
Bump copyright date while here.
This fix handles at least part of...
Issue: 129 (iperf3 hangs with -R and -Z flags)
Also remove a couple of places where we were saving and restoring errno
where we didn't need to.
Submitted by: Susant Sahani <ssahani@redhat.com>
Issue: 121 (TCP congestion control algorithm support for client)
(It remains in the JSON output.)
We have some issues we need to resolve about the formatting and
representation of this (and other future values that we might be
adding).
Rip out the tcpi_sacked support...it doesn't really keep a cumulative
total of SACKs received like we thought it did (it's instantaneous
state).
Convert tcpi_snd_cwnd (originally expressed in segments) to octets before
printing.
Re-work internal APIs for functions to get stuff out of tcp_info...rather
than doing a getsockopt() call per value, grab the values out of a
saved copy of the tcp_info structure (which we were getting in almost
every case anyway).
Issue: 99 (Additional TCP_INFO items)