Commit Graph

20 Commits

Author SHA1 Message Date
Tim Crawford
9347cfebf2 Replace file variables with .dir-locals.el
Signed-off-by: Tim Crawford <tcrawford@datto.com>
2019-02-21 11:54:02 -05:00
optimistyzy
63cfcd3384 iscsi-perf: fix overflow issue in fill_read_queue
If with int defintion, this statement:

num_blocks = client->num_blocks - client->pos;

May not get the exact value we want.

Signed-off-by: optimistyzy <optimistyzy@gmail.com>
2017-01-09 18:38:59 +08:00
Peter Lieven
19a3412d58 iscsi-perf: add a logging parameter
if specified the perf output will log the perf data once per second.

Signed-off-by: Peter Lieven <pl@kamp.de>
2016-07-07 10:44:24 +02:00
Ronnie Sahlberg
99a5f99527 Add some emacs defaults. Tabs are 8 spaces.
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2016-02-18 21:34:43 -08:00
Sitsofe Wheeler
403ec4493a iscsi-perf: Add ULL suffix to large integer literals
Add ULL to all the large integer literals. Without this they can be
treated as being signed by the compiler (at least on 32 bit machines)
leading to underflow problems and strange output when calculating the
elapsed time.
2016-01-30 09:44:45 +00:00
Sitsofe Wheeler
831b222917 iscsi-perf: Allow a better clock to be used
7c6a3e4a0b wound up always forcing the
usage of gettimeofday (even when the more accurate CLOCK_MONOTONIC was
available) because the define to indicate its availability is in
config.h which wasn't included.

Fix this by including config.h, correct the misnamed variable in the
CLOCK_MONOTONIC branch and rename VERSION to PERF_VERSION to avoid the
naming conflict.
2016-01-30 09:44:34 +00:00
Ronnie Sahlberg
1c9792941f iscsi-perf: use uint64_t instead of u_int64_t
because portability

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-05-10 10:55:27 -07:00
Peter Lieven
e219f1bb97 utils/examples: avoid busy waiting on wait for reconnect
Signed-off-by: Peter Lieven <pl@kamp.de>
2015-04-13 10:26:28 +02:00
Peter Lieven
2c1b88e9e7 iscsi-perf: add a max reconnects switch and fix double CTRL-C
this adds a switch to define max_reconnects instead of just aborting
after a NOP timeout. It is now also possible to force an exit
if CTRL-C is pressed twice.

Signed-off-by: Peter Lieven <pl@kamp.de>
2015-03-31 15:44:46 +02:00
Peter Lieven
b9dc3749c9 iscsi-perf: add a switch to send requests of random size
Signed-off-by: Peter Lieven <pl@kamp.de>
2015-03-27 12:18:58 +01:00
Peter Lieven
9d6f0690f8 iscsi-perf: add NOPs to the perf stream and account for timeouts
Signed-off-by: Peter Lieven <pl@kamp.de>
2015-03-27 11:08:37 +01:00
Peter Lieven
44b1a2e1e0 iscsi-perf: use a common iovec for all requests
this avoids a lot of unnecessary mallocs and frees.

Signed-off-by: Peter Lieven <pl@kamp.de>
2015-03-26 11:08:31 +01:00
Peter Lieven
2955b2c616 init: apply settings to context in iscsi_parse_url
if iscsi_context is not NULL we apply the parsed settings
to the context.

Signed-off-by: Peter Lieven <pl@kamp.de>
2015-03-26 10:37:39 +01:00
Peter Lieven
2fc538c8be iscsi-perf: add SCSI_STATUS_BUSY and SCSI_STATUS_CHECK_CONDITION handling.
this also fixes abort on errors and time output.

Signed-off-by: Peter Lieven <pl@kamp.de>
2015-03-24 14:32:00 +01:00
Stefan Weil
86adf5847c Fix wrong checks for username
The variable user in struct iscsi_url is a character array, not a pointer.
Therefore its address will never be NULL.

When libscsi is built using clang instead of gcc, those errors are reported:

iscsi-perf.c:256:17: error:
 comparison of array 'iscsi_url->user' not equal to a null
 pointer is always true [-Werror,-Wtautological-pointer-compare]
iscsi-dd.c:272:17: error:
 comparison of array 'iscsi_url->user' not equal to a null
 pointer is always true [-Werror,-Wtautological-pointer-compare]
iscsi-dd.c:331:17: error:
 comparison of array 'iscsi_url->user' not equal to a null
 pointer is always true [-Werror,-Wtautological-pointer-compare]
ld_iscsi.c:99:18: error:
 comparison of array 'iscsi_url->user' not equal to a null
 pointer is always true [-Werror,-Wtautological-pointer-compare]

Fix those errors and also similar code patterns in aros/iscsi-ls.c and
test-tool/iscsi-support.c.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-03-07 09:54:38 +01:00
Stefan Weil
d7a8ab0f1e Remove trailing blanks
The files touched here need a bug fix which is applied with the
following patch.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-03-07 09:54:38 +01:00
Ronnie Sahlberg
7ffce43dc9 iscsi-util.c: use PRIu64 instead of llu
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2015-03-02 19:46:46 -08:00
Sitsofe Wheeler
7c6a3e4a0b iscsi-perf: Use gettimeofday if clock_gettime is unavailable
clock_gettime doesn't existing on OS X
(http://stackoverflow.com/questions/5167269/clock-gettime-alternative-in-mac-os-x
) so add an autoconf test to check if the platform has it and fall back
on gettimeofday if not.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2015-03-01 16:15:51 +00:00
Sitsofe Wheeler
04ff9584ee iscsi-perf.c: Use %llu format string.
Compiling with clang gives a format warning like
iscsi-perf.c:98:53: error: format specifies type 'unsigned long' but the
argument has type 'uint64_t' (aka 'unsigned long long')
      [-Werror,-Wformat]
so replace %lu with %llu where appropriate.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
2015-03-01 16:12:13 +00:00
Peter Lieven
433b3384e6 util: introduce iscsi-perf
this adds the very first version of iscsi-perf to measure throughput
to and performance of an iscsi LUN.

Signed-off-by: Peter Lieven <pl@kamp.de>
2014-11-25 16:08:29 +01:00