1
1
Граф коммитов

1196 Коммитов

Автор SHA1 Сообщение Дата
David Bar-On
8ffe72e24c
enh: Add --rcv-timeout option (#1125)
Enhancement to PR #1101 - add --rcv-timeout option to allow setting the timeout for receiving packet from the sender in a running test, instead of the constant 120 seconds set in #1101. This is to allow short timeout, so the server will not be "busy" for long time doing nothing. Also, the resolution is set to ms (with minimum of 100ms), as at least in fast networks that may be required.

Since both the server and the client can be a sender, the option is allowed for both. The server setting is for all tests - the client is not sending its --rcv-timeout setting to the server.

While changing the help message, few printf constants from other help lines were changed to parameters.
2021-02-26 12:39:06 -08:00
David Bar-On
e22d530e2f
fix: Remove the inclusion of tcp.h as it is included by iperf.h (#1122)
This fixes a build breakage on Alpine Linux, where tcp.h was explicitly included in src/net.c before _GNU_SOURCE was defined in iperf.h.
2021-02-25 08:22:10 -08:00
David Bar-On
49a5771af1
IP don't fragment support (#1119)
Adds an --dont-fragment flag that sets the DF flag in the header for UDP/IPv4 tests.

Co-authored-by: root <root@DESKTOP-L81E90U.localdomain>
Co-authored-by: Bruce A. Mah <bmah@es.net>
2021-02-16 14:28:54 -08:00
Bruce A. Mah
25f50c23a7
Issue 1118 (#1121)
* fix: Correctly emit JSON for --server --json.

Put extra error diagnostic information behind --verbose, to avoid putting
extra "error" members in JSON output.

Fixes #1118.
2021-02-08 14:54:11 -08:00
Hamid Anvari
410899785e
Fix/Optimize test termination condition check (#1114)
`test->done` represents the test completion.
In some modes, duration-based (-t) test, and file-transfer (-F)  in particular,
the `test->done` is set during the timeout handler or file-transfer functions.
For such configurations, and in general, `test->done` being set is sufficient
condition for terminating the test.

This commit generalizes the condition check to `test->done`,
removing the clause which limtis this condition case to duration-based test only.
2021-02-05 16:04:56 -08:00
Hamid Anvari
de33801499
Fix iperf_send() termination test in bytes/blocks mode (#1113)
In iperf_send() function, the check for termination test
in bytes/blocks mode is at the end of the iteration loop
for multisend (outer loop) and streams (inner loop).
If for any iteration of multisend (outer) loop bytes/blocks
sent reaches the desired limit, it still continues to send
data until the loop is exhausted. (The `break;` command does not
help, since it is already inside the streams (inner) loop).

This is a simple fix which brings the condition check to the
beginning of the inner loop, so it will skip the iteration if
the bytes/blocks count is already reached the target; hence
avoiding to send more data to the network.
2021-02-05 15:59:35 -08:00
Hamid Anvari
4e526a1a0b
API interface for setting/getting congestion control (#1036) (#1112)
Same restrictions/compatibility applies as
the CLI -C/--congestion options.
(Linux and FreeBSD only)

Fixes #1036
2021-02-04 15:16:38 -08:00
Bruce A. Mah
8f1efb68dc
fix: Don't write trailing NUL to pidfile.
Fixes #1120.
2021-02-04 08:47:13 -08:00
Wojciech Jowsa
fab96c1d96
Enable writing to pidfile in client mode (#1110) 2021-02-04 08:30:47 -08:00
David Bar-On
be66b57544
Server select timeout to prevent server to get stuck because of client or network errors (#1101) 2021-02-01 16:26:42 -08:00
Bruce A. Mah
d1cfda530f
chore: Copyright date bumps for 2021. 2021-01-15 11:10:06 -08:00
Bruce A. Mah
ce01004017
fix: Minor memory leak with -P. (#1103)
For every new connection we saved the name of the congestion
control algorithm, but if there were multiple connections we'd
leak all but the last name.

Fixes #1100.
2021-01-15 08:02:52 -08:00
Bruce A. Mah
21581a7216
enh: Support SO_BINDTODEVICE (#1097)
This lets iperf work better with multi-homed machines and
VRF.

Fixes #1089.

Based on a patch by Ben Greear <greearb@candelatech.com> via PR #817.

Co-authored-by: Ben Greear <greearb@candelatech.com>
2020-12-22 15:52:24 -08:00
Tony Weng
d1260e6f94
fix (tcp): Fix behavior with partial sends when using -k with TCP (#1082)
We now only count an attempted send once all of its bytes are sent
(and will perform partial sends if necessary to finish sending all the bytes).
Previously, partial sends were counted as completed, for the purpose
of the -k option.
2020-12-21 10:29:36 -08:00
jtluka
aeb0b3db11
iperf_server_api: start calculating CPU utilization right before TEST_START (#1077)
Fixes issue 1076.

Signed-off-by: Jan Tluka <jtluka@redhat.com>
2020-12-15 17:54:05 -08:00
Bruce A. Mah
d2a68e0896
Issue 1079 (#1091)
* docs: Add a few notes about RSA key formats used for auth.

* enh(auth): If we can't read key files, emit appropriate OpenSSL error.

Fixes #1079.
2020-12-07 14:10:56 -08:00
David Bar-On
91c33dcfd0
Bitrate throttling when burst is specified (#1090)
When the -b option specifies a burst value, throttling the bitrate does not work. This is because iperf_check_throttle() does not perform the check when burst value was defined.

This change removes the dependency of iperf_check_throttle() on the burst value and moves that check to the caller of that function. (Except for the call by send_timer_proc() which does not seem to be related to the change.)
2020-12-04 08:26:53 -08:00
David Bar-On
50315e7a1e
Closing server prot_listener socket after stream setup failure (#1084)
Making sure the server closes prot_listener socket at the end of a session with a client. Without this change the socket may remain open, for example when there is a failure during the UDP stream establishment because the --window value is too high. Closing the socket was added to cleanup_server() as it seems to handle all cases where the socket may remain open.
2020-12-04 08:19:08 -08:00
Bruce A. Mah
d3049a60fe
fix: Hide auth diagnostics behind --debug to avoid polluting JSON output. (#1087)
Fixes #1086.

While here, fix wording of an error message.
2020-12-01 09:14:36 -08:00
ralcini
bd1437791a
Configurable value for time drift between client/server for authentication request issue1065 (#1070)
* Issue 1065

* feat: Allow to configure a custom value for time drift between client/server for authentication

The use case is to support scenarios where it's not possible to enforce sync between client and server times.

* enh: drift redefined with skew

Co-authored-by: Francesco Marino <francesco.marino@cybaze.it>
2020-11-11 17:27:47 -08:00
Bruce A. Mah
97a1d11abd
enh: Set TCP_NODELAY on control connections. Reimplementation of #1046. (#1063)
The goal is to improve the responsiveness and/or reliability of
messages on the control connection, particularly in cases where the
test traffic fills up the path between client and server.

Originally suggested and implemented by @andrepuschmann, this version
adds some error-checking and a version for the client side as well as
the server.

Fixes #1045.
2020-10-26 12:37:41 -07:00
Bruce A. Mah
98d87bd7e8
fix: Fix regression in #997 where JSON output was free-ed too early. (#1059)
It didn't make anything crash, but API clients wouldn't be able to
access the JSON output.

Bug pointed out, and fix suggested by, @scottmsilver.  Fixes #1058.
2020-10-01 13:28:12 -07:00
Bruce A. Mah
46047be9c2
Issue 1055 (#1057)
* docs:  Clarify the optional argument to the --timestamps option.

Fixes #1055.
2020-09-30 14:30:45 -07:00
A. Wilcox
2a1309faf8
fix[auth]: Ensure 64-bit time_t works on 32-bit systems (#1056)
On a 32-bit PowerPC Linux system using musl libc (with 64-bit time_t),
the t_auth test fails because `long` is not the same type as `time_t`.

This patch uses an int64_t temporary value, which can be truncated to
32-bit if necessary.
2020-09-30 10:29:33 -07:00
Bruce A. Mah
b818ef511a
Issue 982 (#1054)
* fix: Make --reverse tests with --blockcount or --bytes actually terminate.

Note that these options still don't really give intuitive results, because
the ending conditions are evaluated on the client, which then needs to
convey to the server via the control channel to stop sending.  This
will almost never result in the desired outcome of "a test of exactly
N sends (or bytes) sent from the server to the client".

Also add test cases for --blockcount / --bytes with --reverse.

Towards #982.
2020-09-18 10:16:21 -07:00
Bruce A. Mah
52d0de3bfc
chore: Regen 2020-08-24 09:09:34 -07:00
Bruce A. Mah
c5a5992897
chore: Post 3.9 version bump. 2020-08-24 09:08:54 -07:00
Bruce A. Mah
3fa1764eb1
Update for iperf-3.9. 2020-08-17 12:21:01 -07:00
Bruce A. Mah
1f8fb13297
chore: releng 3.9 (#1041)
Version number bump for 3.9, release notes.
2020-08-14 15:08:27 -07:00
Bruce A. Mah
70c85f62df
fix: Unbreak build on CentOS 6. (#1040)
The fix eliminates a duplicate definition of the iperf_size_t datatype
when both iperf.h and iperf_api.h are included.

Fixes #1039.
2020-08-14 13:25:51 -07:00
Bruce A. Mah
e551fbcfc2
fix: Remove debugging code that shouldn't have been committed.
Thanks to @rantala for finding this.

Follow-on to #1023 / #1033.
2020-08-12 15:06:58 -07:00
Bruce A. Mah
80b7c7b271
fix: Plug various minor memory leaks (#1033)
* fix: Fix memory leaks related to --logfile.
* fix: Fix memory leaks related to loading RSA keys.
* fix: Fix some memory leaks in failure cases in the iperf3 client.

Fixes #1023.
2020-08-03 17:49:27 -07:00
Bruce A. Mah
eeaecf3534
docs: Add some text about the use of --without-sctp on static builds. 2020-07-30 13:50:05 -07:00
Bruce A. Mah
428d767d38
docs: Add an FAQ entry for troubleshooting issues with TSO enabled.
Contributed by @davidBar-On.

Fixes #1029.
2020-07-30 13:23:13 -07:00
Bruce A. Mah
de289c9500
docs: Update FAQ item on profiled executables to match reality.
(Specifically as on iperf-3.8 these aren't built by default anymore.)
2020-07-30 11:34:43 -07:00
Bruce A. Mah
a9c28038c0
fix: Emit error message for an unknown i_error, rather than an empty string. (#1030)
Suggested by @david-BarOn.

Towards #1022.
2020-07-24 17:32:00 -07:00
Bruce A. Mah
1a908ce13e
feat: Add a --timestamps flag to prepend a timestamp per output line. (#1028)
This flag takes an optional argument, which is a format specification to strftime(3)...this allows for custom timestamp formats.  Based on a suggested implementation by @davidBar-On.  Towards #909.
2020-07-23 07:52:46 -07:00
Bruce A. Mah
d5d2e2473f
fix: Correctly emit an error message when unable to get a password. (#1026)
This occurs when iperf3 is being run with authentication and it
tries to get a password interactively, but there's no tty available.

Fixes #1024.
2020-07-10 16:31:41 -07:00
Bruce A. Mah
223da98090
Issue 999 follow up (#1025)
* doc: Add manpage text for --server-bitrate-limit.

While here, normalize the manpage text for all command-line options
that take [KMGT] scaling suffixes (there were about three different
strings in use).

* doc: Bump manpage date.

* fix: Fix printf format string warnings on macOS.

* fix: Fix compatibility definition of PRIu64 in iperf_udp.c to match iperf.h.
2020-07-10 15:29:47 -07:00
David Bar-On
a0c6f0eca9
feat: Issue #937 - Add a server option to limit total allowed throughput (#999) 2020-07-10 08:36:40 -07:00
Yun Jiang
5e7ea0bd1e
fix: Prevent 100% CPU usage when --bidir option is enabled. (#1011) 2020-07-07 08:01:35 -07:00
Alexandru-Sever Horin
215acfe7aa
fix: Fix enable/disable-profiling flag (#1018)
The variable enable_profiling exists just because AC_ARG_ENABLE([profiling] is defined.
If it is redefined in the exist condition, the both enable and disable flags will enable the profiling,
just if the flag is missing it will be disabled.
Reference in Warning here: https://autotools.io/autoconf/arguments.html
2020-06-22 07:59:46 -07:00
Bruce A. Mah
e8ba3caae8
Merge branch 'master' of github.com:/esnet/iperf 2020-06-15 08:49:43 -07:00
Bruce A. Mah
c9edcb6713
doc: Fix silly typo in a version number.
Pointed out by:	@FuzzyStatic
2020-06-15 08:47:31 -07:00
David Bar-On
3888e044c3
chore: Change applicable function arguments from 'char *' to 'const char *' (#1006)
Fixes #946.  Should not present any functional changes.
2020-06-12 10:03:30 -07:00
Stefano Garzarella
0b0aa349fa
Fix warning: "HAVE_SCTP" redefined (#1010)
The netinet/sctp.h header file defines HAVE_SCTP, so we have this
warning while building:

    In file included from ../../src/iperf.h:30,
                     from ../../src/iperf_sctp.c:46:
    ./iperf_config.h:44: warning: "HAVE_SCTP" redefined
       44 | #define HAVE_SCTP 1
          |
    In file included from ../../src/iperf_sctp.c:43:
    /usr/include/netinet/sctp.h:56: note: this is the location of the previous definition
       56 | #define HAVE_SCTP
          |

This patch replaces our HAVE_SCTP definition with HAVE_SCTP_H to avoid
this warning.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
2020-06-12 09:28:15 -07:00
Bruce A. Mah
8c8ef21f67
doc: Update project news for iperf-3.8.1. 2020-06-10 10:18:23 -07:00
Bruce A. Mah
3dfdffd9c4
Release notes and version number bump for iperf 3.8.1 (#1015) 2020-06-10 08:18:27 -07:00
Bruce A. Mah
51a4c631a4
fix: Make installing of shared libraries work again. (#1014)
Addresses a regression in #989.

Fixes #1013.
2020-06-10 07:34:14 -07:00
Bruce A. Mah
37aba7944d
Update for iperf 3.8. 2020-06-08 16:55:51 -07:00