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

772 Коммитов

Автор SHA1 Сообщение Дата
Xiang Xiao
a0af1e68c8
change some file mode from 100755 to 100644
Part of #935.

Change-Id: I5c563ad0cffce1a75b6a8039aa9a2e1543763880
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
(cherry picked from commit d7e30bea791e7bcd28eebf1ca6fe39e4f00ddc3c)
Signed-off-by: Bruce A. Mah <bmah@es.net>
2020-01-02 13:16:47 -08:00
Bruce A. Mah
a294bd4ce7
fix: Copy some strings passed as API parameters for consistency with CLI. (#943)
Fixes #939.
2019-12-20 15:39:26 -08:00
Bruce A. Mah
79e1cd35b5
fix: Make prototype for iperf_set_test_extra_data() match its definition.
Fixes #938.
2019-12-20 21:57:47 +00:00
wallyatgithub
02a5f47558 add window size support for sctp (#926) 2019-11-01 12:10:15 -07:00
Ondrej Lichtner
80353b0ada fix: fix burst mode throttle checking (#898)
When burst mode is configured for unlimited rate (-b0) but with a
specific packet burst value (e.g. /1000), iperf only sends packets once,
after that the iperf_check_throttle function gets called and sets
green_light=0 due to the rate value being 0 and average calculated rate
always being higher than 0.

The iperf_check_throttle function is designed to be skipped in case the
target rate is unlimited or if a specific burst value was configured,
however this skip is only utilized in one place where the function is
called leading to the situation above.

This can be fixed by moving the "skip throttling" condition directly
inside the iperf_check_throttle function.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
2019-10-01 16:55:14 -07:00
Allen Flickinger
22da02dcfb enh: Add server authentication API functions (#911) 2019-10-01 13:28:38 -07:00
Sergey Nemov
9c69a85088 fix: Fix a bug in --bidir option processing (#903)
If --bidir option was passed before --client option on command line,
the latter would override ipt->mode parameter of the test back to SENDER
or RECEIVER making the test hang during execution.

Fix this by checking if ipt->bidirectional was set to true in
iperf_set_test_role() function.
2019-08-19 14:29:27 -07:00
Bruce A. Mah
c47e43d5a3
doc: Document --bidir option in manpage. (#893)
Fixes #890.
2019-06-24 17:37:32 -07:00
Bruce A. Mah
38bac802fa
fix: Emit appropriate error messages from getaddrinfo(3). (#888)
* fix: Emit appropriate error messages from getaddrinfo(3).

This fixes an omission likely caused when switching resolver
library calls.  Fixes #846.
2019-06-18 16:03:21 -07:00
Bruce A. Mah
c4bd56f373
fix: Fix off-by-one memory overwrite crash and memory leaks (#887)
The base64 decode will crash on musl c-library builds for OpenWRT
due to the write of the '\0' past the end of the allocated buffer.
Fix other various memory leaks on the authentication code paths.
Fix some memory-free library calls into OpenSSL.

Based heavily on PR #881 originally submitted by @acmay, 
with comments from @ralcini.
2019-06-18 15:11:32 -07:00
Andrew Cooks
098dd3cc1b
delay tearing down tcp control connections
The TEST_END message is racing with the server_timer_proc timer.
When the RTT is higher than a second, the timer wins the race
and closes the control socket before the results are exchanged.

This results in the client reporting:
"error - control socket has closed unexpectedly"
as reported in GH issue 751.

This change doesn't prevent the race, but significantly increases the
grace period based on a maximum RTT of 4 seconds and accounts for
the ten transitions in the iperf3 state machine.

(cherry picked from commit 34bdddb75194e880e6dbc6dcaa5b5386975c11b3)
(originally submitted by @acooks in #859)
2019-06-14 11:38:54 -07:00
Bruce A. Mah
6c7834629a
Fix: Don't allow --port 0 or other invalid values. (#885)
* Fix:  Don't allow --port or --cport to take 0 or other invalid values.

Fixes #884.
2019-06-14 11:21:15 -07:00
srgnk
255a9c7110 enh: Introduce iperf_set_test_logfile API function (#871)
To be able to set the test->outfile to a different file other than default
if using libiperf API.

Since logfile is now opened in iperf_parse_arguments() and this function
may not be used if running iperf using API, define a dedicated function
iperf_open_logfile() and move the opening of logfile into
iperf_run_client() and iperf_run_server() to make sure logfile will be
opened if iperf_parse_arguments() was not called.
2019-06-05 16:08:17 -07:00
Bruce A. Mah
fd46367fc4
feat: Authentication failure doesn't count for --one-off. (#877)
Fixes #864.
2019-06-05 15:54:22 -07:00
srgnk
2679640c0f fix: Don't print spurious JSON server output in bidir mode (#868)
In bidirectional mode, if option --get-server-output is set and if
both client and server have --json set to true, client would still print
the json output of server to stdout as a separate piece instead of
including it into client's json output.

This patch fixes this problem, the server's json output would be
appended to client's json field 'server_output_json' as it should be.
2019-05-28 12:02:07 -07:00
Bruce A. Mah
7c9b553c7d
enh: Properly include <sys/socket.h> for improved portability. (#874)
Fixes #821.
2019-05-17 14:14:05 -07:00
srgnk
a9af2b5127 enh: Introduce API functions for no_delay option (#870) 2019-05-17 13:39:40 -07:00
srgnk
8fc10fa34b enh: Introduce API functions for repeating_payload option (#869) 2019-05-17 13:38:58 -07:00
srgnk
e9e984de2b fix: Pass repeating_payload option to server (#867)
If client was started with --repeating-payload option, tell the
server to use the repeating_payload also.

Since repeating_payload is a client specific option at the moment and
we don't tell the server if repeating_payload was set not not,
server always uses randomized patterns in reverse and bidirectional
modes disregarding what patterns the client was told to generate.

So, if client was started with both --repeating-payload and --reverse,
the server would still send the randomized data to the client which
doesn't seem right.

This commit fixes this issue.

Signed-off-by: Sergey Nemov <sergey.nemov@intel.com>
2019-05-17 13:21:31 -07:00
Bruce A. Mah
c9bb46938c
Partially revert documentated added in 0c4d599 to reflect reality. (#866)
The bug reported in #505 seems to not exist at this time, and
the text added in this manpage change caused some other problems,
a la perfsonar/pscheduler#819.

Fixes #860.
2019-05-14 14:41:22 -07:00
Bruce A. Mah
61b82c0b25
fix: Use timezone from time formatting, not a (wrong) hardcoded string. (#857)
Fixes #838.
2019-04-12 17:21:19 -04:00
Bruce A. Mah
8b9c59b3ec
fix: Remove Linux-ism in clock_gettime(3). (#853)
Fixes build on FreeBSD.  Possible fix for #829.
2019-03-29 15:52:56 -07:00
Matt Pelland
40e7c05440 implement providing password via environment variable (#815) 2019-02-01 14:39:43 -08:00
Tommi Rantala
d607579929 Fix cpu usage calculation regression in cpu_util() (#822)
iperf reported "impossible" CPU usage percentages in JSON output:

    "cpu_utilization_percent":      {
        "host_total":   70907445.679701567,
        "host_user":    1303335.9336584355,
        "host_system":  69604109.746043131,
        "remote_total": 13580675.258652203,
        "remote_user":  540984.0827233647,
        "remote_system":        13039620.331720918
    },

Regression introduced in commit cde81d7 ("Add initial portable time
abstraction"), where "timediff" was accidentally changed from
microseconds to seconds:

  -    timediff = ((temp.tv_sec * 1000000.0 + temp.tv_usec) -
  -                (last.tv_sec * 1000000.0 + last.tv_usec));
  +    iperf_time_diff(&now, &last, &temp_time);
  +    timediff = iperf_time_in_secs(&temp_time);
2018-12-13 13:43:02 -08:00
Frank LENORMAND
901ad59c83 tcp sctp: Let the system pick the largest possible backlog value for listen() (#827)
This commit applies the same changes made by b481169 (#693), to the
TCP and SCTP server sockets.
2018-12-13 13:32:49 -08:00
Boris Okunev
0778f04c98 Bidirect mode implementation (#780)
Adds the `--bidir` flag to support simultaneous two-way tests.

Submitted by @LikHait.  Fixes #201.
2018-12-13 12:59:02 -08:00
Bruce A. Mah
64d1be0fcc
Regen. 2018-09-28 11:07:28 -07:00
Bruce A. Mah
d13fa7ce39
Merge branch 'iperf_time' of https://github.com/accelleran/iperf into accelleran-iperf_time 2018-09-28 10:35:23 -07:00
RollingSlack
197d27ac76 Show client's target bitrate (-b/--bitrate) in server output (json,verbose) (#776)
Fixes #599.
2018-09-28 09:37:38 -07:00
Bruce A. Mah
af34c411df
Flush (if appropriate) after a server-side message where we weren't before. (#795)
Also fix some stupid looking code and update a copyright.
Fixes #790.
2018-09-17 13:35:16 -07:00
Bruce A. Mah
d95891b812
Document --udp-counters-64bit in manual page. (#796)
Fixes #791.
2018-09-17 13:32:15 -07:00
Bruce A. Mah
d71efe5ff5
Fix a segmentation fault in verbose mode. (#784)
To reproduce, run the server as "iperf3 --server --verbose" and
run a client as "iperf3 --client localhost -reverse --parallel 2".
Fixes #778.

Based on https://github.com/Aquantia/iperf/commit/f1778271d2c6bed1dae09dccd33251
1b263f6871
2018-08-22 14:11:05 -07:00
Boris Okunev
da6eebb521 Fixed function implementation (#775)
* Fixed implementation of function set_test-reverse().

* Correct/improve some other checks
2018-08-14 15:47:21 -07:00
Bruce A. Mah
cf1f1a3d36
Regen. 2018-08-09 12:38:31 -07:00
RollingSlack
beac6881e6 Add libiperf api for getting iperf version (#767)
Also includes a test program.
2018-08-09 12:36:54 -07:00
Bruce A. Mah
d4dfec7874
Regen. 2018-06-29 16:25:06 -07:00
Hk
e6689a8cbb Provide a configure feature flag (--disable-profiling) to disable creation of iperf3_profile binary (#763)
Fixes #749.
2018-06-29 16:23:41 -07:00
Sam Hooke
02e16f67fb Towards issue 595 (#762)
* Add pacing timer, bytes and blocks functions to libiperf.

* Explicitly cast to uint64_t to match return type.
2018-06-28 13:30:41 -07:00
Bruce A. Mah
6e9d8525a5
Regen. 2018-06-22 14:10:41 -07:00
Bruce A. Mah
964f106a98
Change applicable http:// URLs to https://. Fix a bad URL in RPM spec. (#759) 2018-06-22 14:09:01 -07:00
Bruce A. Mah
1254e135fd
Warn if doing JSON output and either -d or -v are specified.
Debugging and/or verbose output can get in the way of producing
valid/parsable JSON.

Inspired by #737.
2018-06-08 11:55:33 -07:00
Brendan Jackman
d8f2276d70 Fix some indentation (#750)
There are lots of mixed tabs and spaces, most of them look OK if tabs are 8
characters wide, but this bit seems to have been written by someone whose editor
thinks they're 4 characters wide, so it looks all messed up.
2018-06-08 11:44:09 -07:00
Bruce A. Mah
7f883016bb
Add a forgotten cast to fix a glitch in JSON output on CentOS 6. (#744)
Fixes #727.
2018-05-30 11:32:38 -07:00
Ben Fox-Moore
cde81d7640 Add initial portable time abstraction 2018-05-17 14:09:52 +02:00
Bruce A. Mah
829d619ab4
First try at implementing --extra-data. (#729)
Towards #600.
2018-05-09 17:42:17 -07:00
edupont
48a65ff76e Adding missing word (#736) 2018-05-09 17:41:58 -07:00
Bruce A. Mah
e4cd80fa80
Update manpage date. 2018-04-27 13:50:20 -07:00
Bruce A. Mah
9787028de9
Document new authentication functions in libiperf.
Follow-up commit to #712 / #713.
2018-04-27 13:48:29 -07:00
ralcini
e28f12c788 Add authentication functions to libiperf (#713)
Fixes #712.  A subsequent commit will add some information to the libiperf manual page.
2018-04-27 13:39:28 -07:00
Phil Levchenko
cbea72b6ee Add --repeating-payload option to the client side (#726)
This option simulates payload in iperf2, which is just repetitive pattern
(ASCII '0..9' repeating), as opposed to iperf3 where payload is random.
It might help in testing and reveal problems in networking gear with hardware
compression (including WiFi access points), where iperf2 and iperf3 perform
differently, just based on payload entropy.
2018-04-20 07:25:24 -07:00