1
1

Merge pull request #1198 from a1346054/fixes

Spelling and shellcheck fixes
Этот коммит содержится в:
swlars 2021-09-10 16:36:03 -07:00 коммит произвёл GitHub
родитель 775341de11 e919e8c21b
Коммит 332c31ee65
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
38 изменённых файлов: 380 добавлений и 393 удалений

Просмотреть файл

@ -366,7 +366,7 @@ iperf 3.2 2017-06-26
is primarily a cosmetic change to prevent these fairly meaningless is primarily a cosmetic change to prevent these fairly meaningless
intervals from showing up in the output (#278). intervals from showing up in the output (#278).
* Compatiblity note: Users running iperf3 3.2 or newer from the * Compatibility note: Users running iperf3 3.2 or newer from the
bwctl utility will need to obtain version 1.6.3 or newer of bwctl. bwctl utility will need to obtain version 1.6.3 or newer of bwctl.
Note that bwctl, a component of the perfSONAR toolkit, has been Note that bwctl, a component of the perfSONAR toolkit, has been
deprecated in favor of pScheduler since the release of perfSONAR deprecated in favor of pScheduler since the release of perfSONAR
@ -871,7 +871,7 @@ iperf 3.0b3 2010-07-23
* Better error handling * Better error handling
* All errors now handled with iperf_error() * All errors now handled with iperf_error()
* All functions that can return errors return NULL or -1 on error and set i_errno appropriately * All functions that can return errors return NULL or -1 on error and set i_errno appropriately
* Iperf API intruduced * Iperf API introduced
* Support for adding new protocols * Support for adding new protocols
* Added support for callback functions * Added support for callback functions
* on_connect - executes after a connection is made to the server * on_connect - executes after a connection is made to the server

Просмотреть файл

@ -34,4 +34,3 @@ plot "40Gto10G.old.dat" using 1:3 title '3.10 kernel' with linespoints lw 3 pt 5
#plot "iperf3.old.dat" using 1:3 title '3.10 kernel' with linespoints lw 3 pt 5, \ #plot "iperf3.old.dat" using 1:3 title '3.10 kernel' with linespoints lw 3 pt 5, \
# "iperf3.new.dat" using 1:3 title '4.2 kernel' with linespoints lw 3 pt 7 # "iperf3.new.dat" using 1:3 title '4.2 kernel' with linespoints lw 3 pt 7

Просмотреть файл

@ -24,4 +24,3 @@ help to run ``./bootstrap.sh`` first from the top-level directory.
By default, the ``libiperf`` library is built in both shared and By default, the ``libiperf`` library is built in both shared and
static forms. Either can be suppressed by using the static forms. Either can be suppressed by using the
``--disabled-shared`` or ``--disable-static`` configure-time options. ``--disabled-shared`` or ``--disable-static`` configure-time options.

Просмотреть файл

@ -116,7 +116,7 @@ How can I build on a system that doesn't support profiled executables?
And then run ``./bootstrap.sh``, that will regenerate the project And then run ``./bootstrap.sh``, that will regenerate the project
Makefiles to make the exclusion of the profiled iperf3 executable Makefiles to make the exclusion of the profiled iperf3 executable
permanant (within that source tree). permanent (within that source tree).
I'm seeing quite a bit of unexpected UDP loss. Why? I'm seeing quite a bit of unexpected UDP loss. Why?
First, confirm you are using iperf 3.1.5 or higher. There was an First, confirm you are using iperf 3.1.5 or higher. There was an
@ -252,5 +252,3 @@ I have a question regarding iperf3...what's the best way to get help?
We discourage the use of the iperf3 issue tracker on GitHub for We discourage the use of the iperf3 issue tracker on GitHub for
support questions. Actual bug reports, enhancement requests, or support questions. Actual bug reports, enhancement requests, or
pull requests are encouraged, however. pull requests are encouraged, however.

Просмотреть файл

@ -68,4 +68,3 @@ Indices and tables
* :ref:`genindex` * :ref:`genindex`
* :ref:`modindex` * :ref:`modindex`
* :ref:`search` * :ref:`search`

Просмотреть файл

@ -485,4 +485,3 @@ the executable.
The iperf3 manual page will typically be installed in manual The iperf3 manual page will typically be installed in manual
section 1. section 1.

Просмотреть файл

@ -410,6 +410,5 @@ https://github.com/esnet/iperf
During development, there were various distributions of the source During development, there were various distributions of the source
code unofficially released carrying a 3.0.0 version number. Because code unofficially released carrying a 3.0.0 version number. Because
of the possiblity for confusion, this first public release of iperf3 of the possibility for confusion, this first public release of iperf3
was numbered 3.0.1. was numbered 3.0.1.

Просмотреть файл

@ -103,4 +103,3 @@ rm -rf $RPM_BUILD_ROOT
* Sat Mar 26 2011 G.Balaji <balajig81@gmail.com> 3.0b4-1 * Sat Mar 26 2011 G.Balaji <balajig81@gmail.com> 3.0b4-1
- Initial Version - Initial Version

Просмотреть файл

@ -10,7 +10,7 @@ tag=`awk '/IPERF_VERSION / {
print $3 }' src/version.h` print $3 }' src/version.h`
fi fi
dirname=`echo $tag $proj | awk '{ dirname=`echo "$tag $proj" | awk '{
gsub(/-ALPHA/, "a", $1); gsub(/-ALPHA/, "a", $1);
gsub(/-BETA/, "b", $1); gsub(/-BETA/, "b", $1);
gsub(/-RELEASE/, "", $1); gsub(/-RELEASE/, "", $1);
@ -21,14 +21,14 @@ dirname=`echo $tag $proj | awk '{
do_tag () do_tag ()
{ {
git tag -s -m "tagging $tag" $tag git tag -s -m "tagging $tag" "$tag"
} }
do_tar () do_tar ()
{ {
tarball=${dirname}.tar.gz tarball=${dirname}.tar.gz
rm -f ${tarball} rm -f "${tarball}"
git archive --format=tar --prefix ${dirname}/ ${tag} | gzip -9 > ${tarball} git archive --format=tar --prefix "${dirname}/" "${tag}" | gzip -9 > "${tarball}"
# Compute SHA256 hash # Compute SHA256 hash
case `uname -s` in case `uname -s` in
@ -37,7 +37,7 @@ do_tar ()
Darwin) sha="shasum -a 256" ;; Darwin) sha="shasum -a 256" ;;
*) sha=echo ;; *) sha=echo ;;
esac esac
${sha} ${tarball} | tee ${tarball}.sha256 ${sha} "${tarball}" | tee "${tarball}.sha256"
} }
usage () usage ()

Просмотреть файл

@ -79,7 +79,7 @@ typedef uint64_t iperf_size_t;
struct iperf_interval_results struct iperf_interval_results
{ {
iperf_size_t bytes_transferred; /* bytes transfered in this interval */ iperf_size_t bytes_transferred; /* bytes transferred in this interval */
struct iperf_time interval_start_time; struct iperf_time interval_start_time;
struct iperf_time interval_end_time; struct iperf_time interval_end_time;
float interval_duration; float interval_duration;
@ -146,7 +146,7 @@ struct iperf_settings
int blksize; /* size of read/writes (-l) */ int blksize; /* size of read/writes (-l) */
iperf_size_t rate; /* target data rate for application pacing*/ iperf_size_t rate; /* target data rate for application pacing*/
iperf_size_t bitrate_limit; /* server's maximum allowed total data rate for all streams*/ iperf_size_t bitrate_limit; /* server's maximum allowed total data rate for all streams*/
double bitrate_limit_interval; /* interval for avaraging total data rate */ double bitrate_limit_interval; /* interval for averaging total data rate */
int bitrate_limit_stats_per_interval; /* calculated number of stats periods for averaging total data rate */ int bitrate_limit_stats_per_interval; /* calculated number of stats periods for averaging total data rate */
uint64_t fqrate; /* target data rate for FQ pacing*/ uint64_t fqrate; /* target data rate for FQ pacing*/
int pacing_timer; /* pacing timer in microseconds */ int pacing_timer; /* pacing timer in microseconds */
@ -350,7 +350,7 @@ struct iperf_test
iperf_size_t bitrate_limit_stats_count; /* Number of stats periods accumulated for server's total bitrate average */ iperf_size_t bitrate_limit_stats_count; /* Number of stats periods accumulated for server's total bitrate average */
iperf_size_t *bitrate_limit_intervals_traffic_bytes; /* Pointer to a cyclic array that includes the last interval's bytes transferred */ iperf_size_t *bitrate_limit_intervals_traffic_bytes; /* Pointer to a cyclic array that includes the last interval's bytes transferred */
iperf_size_t bitrate_limit_last_interval_index; /* Index of the last interval traffic insrted into the cyclic array */ iperf_size_t bitrate_limit_last_interval_index; /* Index of the last interval traffic inserted into the cyclic array */
int bitrate_limit_exceeded; /* Set by callback routine when average data rate exceeded the server's bitrate limit */ int bitrate_limit_exceeded; /* Set by callback routine when average data rate exceeded the server's bitrate limit */
int server_last_run_rc; /* Save last server run rc for next test */ int server_last_run_rc; /* Save last server run rc for next test */

Просмотреть файл

@ -96,7 +96,7 @@ test by specifying the --get-server-output flag.
Either the client or the server can produce its output in a JSON Either the client or the server can produce its output in a JSON
structure, useful for integration with other programs, by passing it structure, useful for integration with other programs, by passing it
the -J flag. the -J flag.
Because the contents of the JSON structure are only competely known Because the contents of the JSON structure are only completely known
after the test has finished, no JSON output will be emitted until the after the test has finished, no JSON output will be emitted until the
end of the test. end of the test.
.PP .PP
@ -137,7 +137,7 @@ In addition, on the client side you can override the server's
affinity for just that one test, using the \fIn,m\fR form of affinity for just that one test, using the \fIn,m\fR form of
argument. argument.
Note that when using this feature, a process will only be bound Note that when using this feature, a process will only be bound
to a single CPU (as opposed to a set containing potentialy multiple to a single CPU (as opposed to a set containing potentially multiple
CPUs). CPUs).
.TP .TP
.BR -B ", " --bind " \fIhost\fR" .BR -B ", " --bind " \fIhost\fR"

Просмотреть файл

@ -1676,7 +1676,7 @@ iperf_check_throttle(struct iperf_stream *sp, struct iperf_time *nowP)
} }
} }
/* Verify that average traffic is not greater than the specifid limit */ /* Verify that average traffic is not greater than the specified limit */
void void
iperf_check_total_rate(struct iperf_test *test, iperf_size_t last_interval_bytes_transferred) iperf_check_total_rate(struct iperf_test *test, iperf_size_t last_interval_bytes_transferred)
{ {
@ -1688,7 +1688,7 @@ iperf_check_total_rate(struct iperf_test *test, iperf_size_t last_interval_bytes
if (test->done || test->settings->bitrate_limit == 0) // Continue only if check should be done if (test->done || test->settings->bitrate_limit == 0) // Continue only if check should be done
return; return;
/* Add last inetrval's transffered bytes to the array */ /* Add last inetrval's transferred bytes to the array */
if (++test->bitrate_limit_last_interval_index >= test->settings->bitrate_limit_stats_per_interval) if (++test->bitrate_limit_last_interval_index >= test->settings->bitrate_limit_stats_per_interval)
test->bitrate_limit_last_interval_index = 0; test->bitrate_limit_last_interval_index = 0;
test->bitrate_limit_intervals_traffic_bytes[test->bitrate_limit_last_interval_index] = last_interval_bytes_transferred; test->bitrate_limit_intervals_traffic_bytes[test->bitrate_limit_last_interval_index] = last_interval_bytes_transferred;
@ -2386,7 +2386,7 @@ get_results(struct iperf_test *test)
sp->peer_packet_count = pcount; sp->peer_packet_count = pcount;
sp->result->bytes_received = bytes_transferred; sp->result->bytes_received = bytes_transferred;
/* /*
* We have to handle the possibilty that * We have to handle the possibility that
* start_time and end_time might not be * start_time and end_time might not be
* available; this is the case for older (pre-3.2) * available; this is the case for older (pre-3.2)
* servers. * servers.
@ -2871,7 +2871,7 @@ iperf_free_test(struct iperf_test *test)
} }
} }
/* Free interval's traffic array for avrage rate calculations */ /* Free interval's traffic array for average rate calculations */
if (test->bitrate_limit_intervals_traffic_bytes != NULL) if (test->bitrate_limit_intervals_traffic_bytes != NULL)
free(test->bitrate_limit_intervals_traffic_bytes); free(test->bitrate_limit_intervals_traffic_bytes);
@ -3175,7 +3175,7 @@ iperf_print_intermediate(struct iperf_test *test)
/* /*
* If the interval is at least 10% the normal interval * If the interval is at least 10% the normal interval
* length, or if there were actual bytes transferrred, * length, or if there were actual bytes transferred,
* then we want to keep this interval. * then we want to keep this interval.
*/ */
if (interval_len >= test->stats_interval * 0.10 || if (interval_len >= test->stats_interval * 0.10 ||
@ -3447,7 +3447,7 @@ iperf_print_results(struct iperf_test *test)
* the streams. It's possible to not have any streams at all * the streams. It's possible to not have any streams at all
* if the client got interrupted before it got to do anything. * if the client got interrupted before it got to do anything.
* *
* Also note that we try to keep seperate values for the sender * Also note that we try to keep separate values for the sender
* and receiver ending times. Earlier iperf (3.1 and earlier) * and receiver ending times. Earlier iperf (3.1 and earlier)
* servers didn't send that to the clients, so in this case we fall * servers didn't send that to the clients, so in this case we fall
* back to using the client's ending timestamp. The fallback is * back to using the client's ending timestamp. The fallback is

Просмотреть файл

@ -246,7 +246,7 @@ int encrypt_rsa_message(const char *plaintext, EVP_PKEY *public_key, unsigned ch
BIO_free(bioBuff); BIO_free(bioBuff);
if (encryptedtext_len < 0) { if (encryptedtext_len < 0) {
/* We probably shoudln't be printing stuff like this */ /* We probably shouldn't be printing stuff like this */
fprintf(stderr, "%s\n", ERR_error_string(ERR_get_error(), NULL)); fprintf(stderr, "%s\n", ERR_error_string(ERR_get_error(), NULL));
} }
@ -273,7 +273,7 @@ int decrypt_rsa_message(const unsigned char *encryptedtext, const int encryptedt
BIO_free(bioBuff); BIO_free(bioBuff);
if (plaintext_len < 0) { if (plaintext_len < 0) {
/* We probably shoudln't be printing stuff like this */ /* We probably shouldn't be printing stuff like this */
fprintf(stderr, "%s\n", ERR_error_string(ERR_get_error(), NULL)); fprintf(stderr, "%s\n", ERR_error_string(ERR_get_error(), NULL));
} }
@ -385,5 +385,3 @@ ssize_t iperf_getpass (char **lineptr, size_t *n, FILE *stream) {
return nread; return nread;
} }

Просмотреть файл

@ -436,7 +436,7 @@ iperf_strerror(int int_errno)
snprintf(errstr, len, "skew threshold must be a positive number"); snprintf(errstr, len, "skew threshold must be a positive number");
break; break;
case IEIDLETIMEOUT: case IEIDLETIMEOUT:
snprintf(errstr, len, "idle timeout parameter is not positive or larget then allowed limit"); snprintf(errstr, len, "idle timeout parameter is not positive or larger than allowed limit");
break; break;
case IENOMSG: case IENOMSG:
snprintf(errstr, len, "idle timeout for receiving data"); snprintf(errstr, len, "idle timeout for receiving data");

Просмотреть файл

@ -274,7 +274,7 @@ iperf_tcp_listen(struct iperf_test *test)
} }
/* /*
* If we got an IPv6 socket, figure out if it shoudl accept IPv4 * If we got an IPv6 socket, figure out if it should accept IPv4
* connections as well. See documentation in netannounce() for * connections as well. See documentation in netannounce() for
* more details. * more details.
*/ */

Просмотреть файл

@ -62,7 +62,7 @@ main(int argc, char **argv)
// XXX: Setting the process affinity requires root on most systems. // XXX: Setting the process affinity requires root on most systems.
// Is this a feature we really need? // Is this a feature we really need?
#ifdef TEST_PROC_AFFINITY #ifdef TEST_PROC_AFFINITY
/* didnt seem to work.... */ /* didn't seem to work.... */
/* /*
* increasing the priority of the process to minimise packet generation * increasing the priority of the process to minimise packet generation
* delay * delay

Просмотреть файл

@ -173,4 +173,3 @@
#endif #endif
#endif #endif

Просмотреть файл

@ -33,7 +33,7 @@
* Note that this is only really useful on Linux. * Note that this is only really useful on Linux.
* XXX: only standard on linux versions 2.4 and later * XXX: only standard on linux versions 2.4 and later
# #
* FreeBSD has a limitted implementation that only includes the following: * FreeBSD has a limited implementation that only includes the following:
* tcpi_snd_ssthresh, tcpi_snd_cwnd, tcpi_rcv_space, tcpi_rtt * tcpi_snd_ssthresh, tcpi_snd_cwnd, tcpi_rcv_space, tcpi_rtt
* Based on information on http://wiki.freebsd.org/8.0TODO, I dont think this will be * Based on information on http://wiki.freebsd.org/8.0TODO, I dont think this will be
* fixed before v8.1 at the earliest. * fixed before v8.1 at the earliest.

Просмотреть файл

@ -8,7 +8,7 @@
if [ $# -ne 1 ] if [ $# -ne 1 ]
then then
echo "Usage: `basename $0` hostname" echo "Usage: `basename "$0"` hostname"
exit $E_BADARGS exit $E_BADARGS
fi fi
@ -17,59 +17,57 @@ set -x
host=$1 host=$1
# basic testing # basic testing
./src/iperf3 -c $host -V -t 5 -T "test1" ./src/iperf3 -c "$host" -V -t 5 -T "test1"
./src/iperf3 -c $host -u -V -t 5 ./src/iperf3 -c "$host" -u -V -t 5
# omit mode # omit mode
./src/iperf3 -c $host -i .3 -O 2 -t 5 ./src/iperf3 -c "$host" -i .3 -O 2 -t 5
# JSON mode # JSON mode
./src/iperf3 -c $host -i 1 -J -t 5 ./src/iperf3 -c "$host" -i 1 -J -t 5
# force V4 # force V4
./src/iperf3 -c $host -4 -t 5 ./src/iperf3 -c "$host" -4 -t 5
./src/iperf3 -c $host -4 -u -t 5 ./src/iperf3 -c "$host" -4 -u -t 5
# force V6 # force V6
./src/iperf3 -c $host -6 -t 5 ./src/iperf3 -c "$host" -6 -t 5
./src/iperf3 -c $host -6 -u -t 5 ./src/iperf3 -c "$host" -6 -u -t 5
# FQ rate # FQ rate
./src/iperf3 -c $host -V -t 5 --fq-rate 5m ./src/iperf3 -c "$host" -V -t 5 --fq-rate 5m
./src/iperf3 -c $host -u -V -t 5 --fq-rate 5m ./src/iperf3 -c "$host" -u -V -t 5 --fq-rate 5m
# SCTP # SCTP
./src/iperf3 -c $host --sctp -V -t 5 ./src/iperf3 -c "$host" --sctp -V -t 5
# parallel streams # parallel streams
./src/iperf3 -c $host -P 3 -t 5 ./src/iperf3 -c "$host" -P 3 -t 5
./src/iperf3 -c $host -u -P 3 -t 5 ./src/iperf3 -c "$host" -u -P 3 -t 5
# reverse mode # reverse mode
./src/iperf3 -c $host -P 2 -t 5 -R ./src/iperf3 -c "$host" -P 2 -t 5 -R
./src/iperf3 -c $host -u -P 2 -t 5 -R ./src/iperf3 -c "$host" -u -P 2 -t 5 -R
# bidirectional mode # bidirectional mode
./src/iperf3 -c $host -P 2 -t 5 --bidir ./src/iperf3 -c "$host" -P 2 -t 5 --bidir
./src/iperf3 -c $host -u -P 2 -t 5 --bidir ./src/iperf3 -c "$host" -u -P 2 -t 5 --bidir
# zero copy # zero copy
./src/iperf3 -c $host -Z -t 5 ./src/iperf3 -c "$host" -Z -t 5
./src/iperf3 -c $host -Z -t 5 -R ./src/iperf3 -c "$host" -Z -t 5 -R
# window size # window size
./src/iperf3 -c $host -t 5 -w 8M ./src/iperf3 -c "$host" -t 5 -w 8M
# -n flag # -n flag
./src/iperf3 -c $host -n 5M ./src/iperf3 -c "$host" -n 5M
./src/iperf3 -c $host -n 5M -u -b1G ./src/iperf3 -c "$host" -n 5M -u -b1G
# -n flag with -R # -n flag with -R
./src/iperf3 -c $host -n 5M -R ./src/iperf3 -c "$host" -n 5M -R
./src/iperf3 -c $host -n 5M -u -b1G -R ./src/iperf3 -c "$host" -n 5M -u -b1G -R
# conflicting -n -t flags # conflicting -n -t flags
./src/iperf3 -c $host -n 5M -t 5 ./src/iperf3 -c "$host" -n 5M -t 5
# -k mode # -k mode
./src/iperf3 -c $host -k 1K ./src/iperf3 -c "$host" -k 1K
./src/iperf3 -c $host -k 1K -u -b1G ./src/iperf3 -c "$host" -k 1K -u -b1G
# -k mode with -R # -k mode with -R
./src/iperf3 -c $host -k 1K -R ./src/iperf3 -c "$host" -k 1K -R
./src/iperf3 -c $host -k 1K -u -b1G -R ./src/iperf3 -c "$host" -k 1K -u -b1G -R
# CPU affinity # CPU affinity
./src/iperf3 -c $host -A 2/2 ./src/iperf3 -c "$host" -A 2/2
./src/iperf3 -c $host -A 2/2 -u -b1G ./src/iperf3 -c "$host" -A 2/2 -u -b1G
# Burst mode # Burst mode
./src/iperf3 -c $host -u -b1G/100 ./src/iperf3 -c "$host" -u -b1G/100
# change MSS # change MSS
./src/iperf3 -c $host -M 1000 -V ./src/iperf3 -c "$host" -M 1000 -V
# test congestion control option (linux only) # test congestion control option (linux only)
./src/iperf3 -c $host -C reno -V ./src/iperf3 -c "$host" -C reno -V