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

887 Коммитов

Автор SHA1 Сообщение Дата
Preston Hunt
d424be34a9
Fix --dscp (#1162)
TOS = DSCP * 4; so shift DSCP << 2
2021-11-15 11:38:29 -08:00
Bruce A. Mah
071ee915ba
Merge pull request #1153 from chenshuo/binddev
Fix --bind-dev options for TCP streams. (#1099)
2021-11-12 13:04:02 -08:00
Bruce A. Mah
805a4ce1ae
Consistify string lengths for arguments to warning(). 2021-11-11 13:57:04 -08:00
Bruce A. Mah
a071a8c8bd
Fix: Avoid spamming stdout (and JSON output) with a warning.
Fixes #1223.
2021-11-11 13:46:12 -08:00
Bruce A. Mah
aa455109cb
Follow-up to PR#1200: s/bdir/bidir/ in JSON identifiers per review comments.
This provides consistency with the CLI option name --bidir.
2021-11-08 13:55:39 -08:00
Bruce A. Mah
f39fa9c9a0
Merge pull request #1200 from davidBar-On/issue-952-bidir-json-output
Fix for issue #952 - different json object names for bidir reverse ch…
2021-11-08 13:50:08 -08:00
swlars
24753fd762
Null checks (#1216)
* Add NULL checks and comment

* Remove comment

* Change printf to iperf_err and add brackets to else

* Add test to iperf_err

* Revert iperf_err to printf
2021-10-04 17:12:30 -07:00
Bruce A. Mah
9149c64b9e
Merge pull request #1210 from esnet/issue-1157-take-2
Closes #1157.

Incorporates and closes #1180.
2021-09-30 11:34:11 -07:00
Bruce A. Mah
aeed006dcf
Factor out hostname/interface processing code into a function. 2021-09-29 08:32:03 -07:00
Bruce A. Mah
5c26626a79
Update help and manpage text. Towards #1157. 2021-09-29 08:32:03 -07:00
Bruce A. Mah
42436be796
Make -c and -B work similar with respect to "%" interface specifications.
IPv6 link-local address literals are accepted in both places.
Note that we might not work correctly in the presumably rare case
of a FQDN that resolves to an IPv6 link-local address.

"%" is always treated as a separator for a shortcut to --bind-dev,
for IPv4 and IPv6 literals as well as hostnames passed to -c and -B.
2021-09-29 08:32:02 -07:00
swlars
8bd43a2774
Merge pull request #1206 from matt9j/bugfix-api-unit-header
Add get/set test_unit_format function declarations to iperf_api.h
2021-09-28 14:21:21 -07:00
Bruce A. Mah
16d13e96fd
Merge pull request #1204 from davidBar-On/zerocopy_in_server_for_reverse_mode
Support zerocopy by Reverse mode
2021-09-27 13:19:45 -07:00
David Bar-On
b788ec0405 Per review comment, set server's zerocopy option to j_p->valueint instead of 1 2021-09-25 21:28:11 +03:00
Sarah Larsen
0b15c44989 Add comment to clean_up_and_fail 2021-09-22 18:54:39 -07:00
Bruce A. Mah
36e812992c
Merge branch 'TBD__issue-1157-support-address%interface-syntax' of ssh://github.com/davidBar-On/iperf into davidBar-On-TBD__issue-1157-support-address%interface-syntax 2021-09-20 10:22:07 -07:00
Matt Johnson
85bf6a1757 Add get/set test_unit_format function declarations to iperf_api.h
The functions were added in f2c4e2b5bd and
implicitly declared in iperf_api.c, but were never actually declared in
the api header file! External users of the api need access to the
declaration in the header file to use the function from the library.
2021-09-17 18:49:52 -07:00
David Bar-On
71525517ff Support zerocopy by Reverse mode 2021-09-15 19:24:48 +03:00
Joakim Sørensen
1ed0239d23
Don't exit in cleanup_and_fail 2021-09-13 09:35:11 +02:00
a1346054
e919e8c21b trim excess whitespace 2021-09-03 14:11:16 +00:00
a1346054
50d6cce65c fix spelling 2021-09-03 14:11:16 +00:00
Mark Feit
775341de11
Exit if idle time expires waiting for a connection in one-off mode. #1187 (#1197) 2021-09-02 14:20:26 -07:00
David Bar-On
39ec29c5cc Fix for issue #952 - different json object names for bidir reverse channel 2021-09-02 04:18:04 +03:00
Bruce A. Mah
1b577aea91
Minor editorial changes to comments from PR #1174.
No functional changes.
2021-07-16 14:30:43 -07:00
DJ Breuer (dbreue200)
0d078c4a1d Added {end}{sum_sent} and {end}{sum_received} to UDP JSON output 2021-07-16 14:22:18 -07:00
Bruce A. Mah
26fd923448 docs: Update documentation for -w to reflect what it actually does.
Fixes #1175.
2021-07-08 19:52:08 -07:00
Hamid Anvari
ba0dad3160 handling possible stat() error 2021-07-07 15:59:03 -07:00
Hamid Anvari
e65803672d Auto adjustment of test-end condition for file-transfer
In file transfer mode (-F), if no test-end condition is set,
(bytes, blocks, duration), it will automatically adjsut it to
file size (in bytes).
2021-07-07 15:59:03 -07:00
David Bar-On
f54b6b4b13 Fix issue #1157 (partial) - support bind device using 2021-07-05 20:07:33 +03:00
Bruce A. Mah
b043b4e245
fix: Consistently print target_bandwidth in the JSON start section. (#1177)
Previously we only did this for TCP tests with non-default -b.

Follow-on commit to #1168 and #776.
2021-06-30 09:02:34 -07:00
TheRealDJ
584a8d5492
Test bitrate (--bitrate) added to JSON output in {test}{test_start} (#1168)
Fixes #1167.
2021-06-30 08:45:06 -07:00
Bruce A. Mah
36a094d403
Remove fsync(2) call after every write to a receiving --file. (#1176)
This removes a performance pessimization that wasn't really
needed in the first place.

Fixes #1159.
2021-06-29 17:27:05 -07:00
Bruce A. Mah
702db979c5
Chore: regen. 2021-06-02 08:19:52 -07:00
Shuo Chen
b915645aa2 Fix --bind-dev options for TCP streams. (#1099)
netdial() honors --bind-dev option but iperf_tcp_connect() doesn't,
as a result, only the control socket is bound to the device, but not
the data socket.

Instead of duplicaing code from netdial to iperf_tcp_connect(), this
fix extracts a common util function create_socket() from netdial() and
let iperf_tcp_connect() call create_socket() to create a socket with
optional bindings.

Tested on Raspberry Pi 3 with eth0 and wlan0.
2021-05-27 14:24:07 -07:00
Bruce A. Mah
d8d827455d
Release engineering changes for iperf-3.10 (#1151)
* Draft release notes for iperf-3.10.

* iperf-3.10 version number bumps.

* Update using autoupdate-2.71 from Xcode 12 on macOS Big Sur.

* Regen.

* docs: Add release notes for recent changes.
2021-05-26 15:03:59 -07:00
Bruce A. Mah
e479d607e1
chore: Regen. 2021-05-21 15:18:39 -07:00
Shuo Chen
47985d7fc4 Add tcp_info.snd_wnd to JSON output.
tcp_info.snd_wnd is available on FreeBSD and NetBSD since TCP_INFO was
added.  It was added to Linux 5.4 in late 2019 and becomes available
in Ubuntu 20.04 and Debian 11.

Tested on:
* Debian 11 running on x86-64 with this field.
* Debian 10 armv7 running on Raspberry Pi 2 without this field.
* NetBSD 9.2 armv7 running on Raspberry Pi 3 with this field.
* FreeBSD 13 aarch64 running on Raspberry Pi 4 with this field.
2021-05-21 15:16:08 -07:00
David Bar-On
2ec43d1261 Fix issue #1143 - make sure terminating error message is inside the JSON output 2021-05-20 15:03:59 -07:00
Bruce A. Mah
787919c4b3
fix: Handle a corner case more gracefully.
If the buffer happens to be holding exactly a sending chunk size,
we no longer arbitrarily quit.

While here, use equivalent, easier-to-read tests in a couple places.

Discussed with @hanvari

Follow-up to #1115.
2021-04-16 14:59:31 -07:00
Hamid Anvari
f4a114652f diskfile_send() sent data capped at file-size
Issue: `diskfile_send()` unconditional call to `sp->snd2`
would result in sending full buffer size everytime,
regardless of the file size.

Fix: The function updated to check for end-of-file (reading 0 bytes)
and,
1. set `sp->pending_size` to appropriate data length available to be sent
2. check for end condition and avoid sending data more than file size.

Note: The fix is only for the maximum cap on the data size sent on the network.
If other parameters (-t, -n, etc.) yield smaller size or shorter time then needed,
the file will still be partially sent to the network.
2021-04-16 14:55:02 -07:00
Bruce A. Mah
466f4c187f
Make sure we don't pass in a negative buffer size.
In theory this check should always succeed, given the relative
buffer sizes as currently coded.

Suggested by @grigorescu
Related to #1134.

(cherry picked from commit c3578291ca)
Signed-off-by: Bruce A. Mah <bmah@es.net>
2021-04-14 10:21:38 -07:00
Bruce A. Mah
6b266c79e6
enh: Move iperf_printf's buffer off the stack.
(cherry picked from commit 528cea5d54)
Signed-off-by: Bruce A. Mah <bmah@es.net>
2021-04-14 10:21:24 -07:00
Bruce A. Mah
9e2006e2f0
fix: Do a better job of counting bytes in iperf_printf.
Related to #1134.

(cherry picked from commit f9bc608957)
Signed-off-by: Bruce A. Mah <bmah@es.net>
2021-04-14 10:21:04 -07:00
Bruce A. Mah
35a3ed3fb0
fix: Fix a couple of buffer overrun hazards.
Pointed out by @berkakinci.

Fixes #1134.

(cherry picked from commit 9e244bb97f)
Signed-off-by: Bruce A. Mah <bmah@es.net>
2021-04-14 10:20:27 -07:00
Bruce A. Mah
ac5fad17a9
Revert "fix: Fix a couple of buffer overrun hazards." 2021-04-14 10:16:34 -07:00
Bruce A. Mah
670a596f57
Merge pull request #1137 from esnet/issue-1134 2021-04-14 10:15:05 -07:00
Bruce A. Mah
1e33e72152
fix: Handle correctly some errors on initial client connect. (#1139)
This is a mostly-cosmetic reimplementation of pull request #1128.

Original commit log:

Fix two issues that caused an active TCP test to terminate if a new
connection request was received while in streams creation phase.
One issue was in iperf_tcp_accept() - after identifying that the cookies
of the new connection if from a new client, error was returned which
caused the active test to terminate. The other issue was in
iperf_run_server() where congestion alg was set for the new client,
although the stream to it was already closed by iperf_tcp_accept().
That also cause the active test to terminate.

Another minor issue that was fixed is that after a client received a
failure state (negative state) from the server, iperf_client_end()
still tried to send back IPERF_DONE to the server. That caused the
client to issue failure message of "unable to send control message:
Connection reset by peer" instead of "the server is busy running a test".

Originally submitted by: @davidBar-On
2021-04-14 08:31:07 -07:00
Bruce A. Mah
50638f60ce
fix: Follow-up commit for #1138 to fix a couple misspellings.
No functional changes.
2021-04-13 14:22:30 -07:00
David Bar-On
27695dc4d7
enh: do not fail when new connection is refused during a running test (#1138)
Fixes #1135.
2021-04-13 14:19:00 -07:00
Bruce A. Mah
c3578291ca
Make sure we don't pass in a negative buffer size.
In theory this check should always succeed, given the relative
buffer sizes as currently coded.
2021-04-12 13:12:11 -07:00