Commit Graph

211 Commits

Author SHA1 Message Date
Karol Latecki
097e6e16b9 nvme/hotplug.sh: Copy external DPDK libs into test VM
Need to select proper path for passing libs into the VM
in case we're building with custom DPDK.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I97d301c70adee31b727c6b6673eadac3cbde9817
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4975
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-30 16:13:59 +00:00
Maciej Wawryk
c4c37f1cf1 Modifications for using universal qcow2 image in tests
We want to replace few qcow2 images with one universal.
This commit contains:
 - change password in autotest.sh
 - change image path
 - change image name
 - use snapshot mode in hotplug.sh instead of copying base image

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I75c457fe75f005b0ab43ca909be7886529ed115b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4551
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-10-28 15:07:56 +00:00
Shuhei Matsumoto
938d2ae254 test/nvme: Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async()
Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async() with
a local variable detach_ctx to detach multiple controllers.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I77cdc07ddfcd97569e31eeb245cd4e5a26289dbd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4441
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 16:55:55 +00:00
yidong0635
2e0dafb305 test/reset: put unregister_worker after unregister_controllers.
From the log we can see that it reports ns_ctx was freed before it
was used. In unregister_controller, it still need ns_ctx to do io_complete.

And now this app works as a signle worker to do something.
Just need to change the order, execute unregister_worker after
unregister_controllers.

Fixes issue #1626

tested on clearlinux.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I392ff168abb862ba236a24b775fb31bb341e2157
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4761
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 14:05:51 +00:00
Tomasz Zawadzki
d48992413c perf/nvme: simplify discover_bdevs()
This function does need to handle legacy configs and
it's single use did not request any wait_for_spdk_bdev.

Remove those arguments.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic988762c7ca622ff538aeb7bd2bb529e6e6d56e4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4616
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-16 08:15:26 +00:00
Tomasz Zawadzki
8a76c2484a event/app: allow to enable log flag for release builds
Log flags could also report on SPDK_LOG_INFO level by using
SPDK_INFOLOG() macro. Yet this did not result in additional
log due to check for debug build.

This patch allows release builds to use that flag.
Meanwhile the -L option besides turning on particular log flag
changes print log level to SPDK_LOG_DEBUG.

Applied changes to serveral applications to follow the
behaviour of event framework.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib0d6cce33263c350d6d83300d60e7d15bdfe4b64
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4557
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-15 08:23:39 +00:00
John Kariuki
057c92e3d8 test/app_overhead: fix aio make issue
AIO not working because the check for $OS==Linux
is before the $OS is set. Therefore, the binary
build does not include libaio

Change-Id: Iab862d0113d637134a5275d46252c60fe27dde5e
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4516
Reviewed-by: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-07 07:47:41 +00:00
Shuhei Matsumoto
5be704cf97 test/nvme: Use foreach_dev() macro for detach
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibf2e50e23c14929a42fff9b155907302b53a4126
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4438
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-05 08:27:56 +00:00
Shuhei Matsumoto
ba079831a2 test/nvme_reset: Replace next pointer by TAILQ and a few cleanup
Using TAILQ instead of next pointer will make the object relationship
cleaner and the asynchronous detach opearation easier to implement.

Besides, do the following minor clean up.

Rename g_workers by g_worker and register_workers() by register_worker()
because it holds only a single instance, and clean up references to g_worker.

To fix memory leak at cleanup, add unregister_worker() to free a worker
and its associated contexts.

The prefix, spdk_reset, was not necessary as function name. Rename
spdk_reset_free_tasks() by free_tasks().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0da11108222491e3290ffa5e405eb3ebe70a91bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4435
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-05 08:27:56 +00:00
Shuhei Matsumoto
57a4b0f179 test/nvme_overhead&startup: Replace next pointer by TAILQ
This will make the object relationship cleaner and the asynchronous
detach operation easier to implement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3095d59b632ea2fc29fc44f8da330cb98c50bed1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4434
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-10-05 08:27:56 +00:00
wanghailiangx
adb7cf05d3 test/deallocated : Fix memory leak about context.
Here code returns but context isn't freed.
And we can change to break here also.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I8f2173ae3599c13c99c7d70c19e2f8ce0c023f38
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4396
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-28 08:30:38 +00:00
Karol Latecki
fa1cfaa659 test/nvme_perf: print used bdev.conf
Print bdev.conf we're going to use in test
after generating it.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I8b74b8afb9c4fca200b961d0d0d9818578ef1307
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4281
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-24 09:44:04 +00:00
Karol Latecki
bb54b617e2 test/nvme_perf: use polling for io_uring mode
Setting should be "-1" for polling, otherwise "0"
works as hybrid-polling.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I5f1fb602f750162a7c164703859f2e74c9092146
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4280
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-09-24 09:44:04 +00:00
Karol Latecki
e4ff3a5bf1 test/nvme_perf: add iodepth_batch options for fio tests
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ia029df5c8c75eff6ba8db9f21756b91a8a0d9720
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4104
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-15 07:14:26 +00:00
Karol Latecki
67d4ef8dab test/nvme_perf: remove "case" blocks from results parsing
These were not really needed and parsing functions had to
be unnecessarily called multiple times.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I277125bbb3d598a348164e8834843d0d04f1434c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4098
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-15 07:14:26 +00:00
Karol Latecki
c2f804d753 test/nvme_perf: fix kernel fio results maths
Calculating kernel fio results did not take
number of workload retries into account for latency
stats.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I418845d2f6be328827e4217c2eca761b0c211504
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4096
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-09-15 07:14:26 +00:00
Karol Latecki
20df041193 test/nvme_perf: use float arithmetics
Using only Bash for calculation in this script
results in operating only on integers, which lead
to wrong results being saved after test run.

For example - submission latency of 0.175usec was
saved as 0usec.

Change-Id: I6f9924d12189631ab6d0bdc5385e642b6c2aa34f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4013
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-15 07:14:26 +00:00
Michal Berger
b80667550f scripts/setup remove flakiness from tests
This removes all the sleeps called after setup.sh reset. These
sleeps were meant to wait for devices given tests depend on.

Change-Id: Ibb86c9f6f8d5f1b05d165e84d9019530af84f9ea
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4035
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-09 07:19:43 +00:00
Tomasz Zawadzki
ccdbd2ed51 nvme/cuse: fix nblocks and block_size in rw path
nblocks is zero based, so read path was missing the increment.

NVMe device that cuse represents can be of any block_size,
so rather than hardcoding 512 - actually verify it.
Both paths didn't request enough of a buffer from cuse.

Reported-by: Niklas Cassel
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I228dc2572bc94ecbcb913e950d912a7ab5be9434
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4037
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-04 08:13:56 +00:00
Karol Latecki
103147241b test/nvme_perf: add p90 latency to gathered metrics
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ic642b7cc7a26a086dbd6da783caf5ca19a5cd95d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4011
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-03 07:43:35 +00:00
WANGHAILIANG
f6727316d7 test/opal: add a trap for opal_revert_and_init()
When opal_revert_and_init() is interrupted for some reason,
the spdk_tgt still exists, but it should be killed at the same time.

Change-Id: I8546d3b0b4d6a0fda1687558a664decb535ef2b4
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3830
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-19 07:30:04 +00:00
WANGHAILIANG
c4e1d35c13 test/opal: fix a typo for P4510 devices ID
Change-Id: Ic30fe63a60d2a151a47444fa84e1c99d9b69a454
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3829
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-19 07:30:04 +00:00
Tomasz Zawadzki
ba3c468647 test/cuse: do not disable exit on error
Originally the idea was to disable error checking,
to match output from Kernel and SPDK NVMe cuse.
This includes passing test commands and failures.

Any discrepancy would be caught by log output diff
at the end.

Flaw in this logic is that test command itself might
be incorrect. We shouldn't depend on that, nor
attempt to cover up some of the failures even if
they occur on both interfaces.

Most probable cause for this at all, was NVMe emulated
in QEMU not really working with all the nvme-cli commands
from this test.

Since the original creation of this test, CUSE executes
on physical devices (to be able to support namespace management).

The behavior there is predictable and works with current
test commands, thus the test exits on any error with this patch.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I086faf38b2cbbb6225935cc50d4fad14e81f1972
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3032
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-08-17 08:28:56 +00:00
Tomasz Zawadzki
102f6256b8 test/cuse: replace sleep with waitforfile
We can do better than "sleep 5". Instead use waitforfile(),
that will wait until the namespace is available.

Moved around the variables with names and checks for the ctrlr/ns
existence after all the tests complete.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8326c2cec0d0cf5aec88b5f80c1126c81eb09436
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2951
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-12 10:39:29 +00:00
Tomasz Kulasek
549b9f31c6 lib/nvme: implement SPDK_NVME_DATA_NONE data transfer in CUSE
Change-Id: Ifb2a53bdbaabd74b7f412923a97d79b44afde861
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1744
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-08-12 10:39:29 +00:00
Karol Latecki
ed2a57a353 test/nvme_perf: add option for dpdk mem measurements
Allow to dump DPDK mem stats mid-test.

Change-Id: I5769bca9b3b10eb9a4114c29ae112d82066511aa
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3374
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-24 17:09:03 +00:00
Karol Latecki
f4e27ffa14 test/nvme_perf: add option to enable gtod_reduce
Optionally enable gtod_reduce for fio workload.
Results in greatly decreased latency metrics, but
improved IOPS/BW.

Change-Id: Ibe70d8e9a13a18a31e55b60b5cec7b353e2862c3
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3379
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-07-24 09:40:49 +00:00
Karol Latecki
0e897f08a6 test/nvme_perf: add option to set cpu frequency
If intel_pstate is disabled in boot options, allow to
change CPU frequency using "userspace" cpu governor.

Change-Id: I390492c7be28df408f3cbb774ba5360859649fe0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3376
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-24 09:40:49 +00:00
Karol Latecki
88b991768d test/nvme_perf: add option for perftop measurements
Enable perf record during tests and create a report
file afterwards.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: If6951ad7425d8c1d4d2935c8af9f40245c1adbf7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3371
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-07-24 09:40:49 +00:00
Karol Latecki
6330ee8fb5 test/nvme_perf: unify fio job section for kernel and spdk
For some reason the routine for generating fio
job/filename sections was different for kernel and
spdk fio modes. This made fio results hard to compare
because even configuration files themselves were not
comparable.
The function was modified to create the same fio
configuration files for kernel and spdk.

While at it, iodepth calculation has been slightly
modified as well. It is now being calculated for each
[ ] job section, so that each "filename" gets the
actual iodepth value specified in test run parameters.

While generating the config file the script will add
NUMA node information as a comment for "cpus_allowed"
and "filename" sections, so that it's clearly visible
how resources are aligned. In case of cross numa
configuration additional warnings will be printed to
screen as well.

For example, a configuration file for running test with
7 NVMe drives, 3 CPUs and effective (per filename) queue
depth of 32 would look like this:

run_perf.sh --cpu-allowed=0,1,2 --iodepth=32
  --driver=kernel-classic-polling [...other params...]
--------
[filename0]
iodepth=96
cpus_allowed=0 #CPU NUMA Node X
filename=/dev/nvme0n1 #NVMe NUMA Node X
filename=/dev/nvme1n1 #NVMe NUMA Node X
filename=/dev/nvme2n1 #NVMe NUMA Node X

[filename1]
iodepth=64
cpus_allowed=1 #CPU NUMA Node X
filename=/dev/nvme3n1 #NVMe NUMA Node X
filename=/dev/nvme4n1 #NVMe NUMA Node X

[filename2]
iodepth=64
cpus_allowed=2 #CPU NUMA Node X
filename=/dev/nvme5n1 #NVMe NUMA Node X
filename=/dev/nvme6n1 #NVMe NUMA Node X
--------

Change-Id: Ida2f781fbb93c4a8c62154e711151152843ab997
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3370
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-24 09:40:49 +00:00
Karol Latecki
b9150897d9 test/nvme_perf: move fio config generation into one place
Configuration file generation was split into multiple
places/functions in scripts. Move it into a single
function. "time_based" fio parameter has been moved to
fio config template file as it is not configurable.
There is still a lot of room for improvement here, because
create_fio_config() function uses mixed local variables
(as function arguments) and global variables.

Change-Id: Ica3717d0d28692d24c861c2d32e729761c5c8647
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3345
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-24 09:40:49 +00:00
Darek Stojaczyk
814072fa4e env_dpdk/pci: delay device initialization on hotplug
A workaround for kernel deadlocks surfaced in #1275.

DPDK basically offers two APIs for hotplugging all PCI devices:
rte_bus_scan() and rte_bus_probe(). Scan iterates through
/sys/bus/pci/devices/* and creates corresponding rte_pci_device-s,
then rte_bus_probe() tries to initialize each device with the
supporting driver.

Previously we did scan and probe together, one after another, now
we'll have an intermediate step. After scanning the bus, we'll
iterate through all rte_pci_device-s and temporarily blacklist any
newly detected devices. We'll use devargs->data field to a store
a timeout value (integer) after which the device can be un-blacklisted
and initialized. devargs->data is documented in DPDK as "Device
string storage" and it's a char*, but it's not referenced anywhere
in DPDK. rte_bus_probe() respects the blacklist and doesn't do
absolutely anything with blacklisted ones.

The timeout value is 2 seconds, which should be plenty enough
for an NVMe device to reset, leave the critical lock sections in
kernel, and let us initialize it safely.

Note that direct attach by BDF doesn't respect the blacklist,
so an NVMe attach RPC won't be delayed in any way, it will continue
to work as it always did. Only the automatic discovery & enumeration
is deferred.

Change-Id: I62b719271bd0755bc2882331ea33f69897b1e5e5
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1733
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-23 20:48:47 +00:00
Karol Latecki
ddba021eea test/nvme_perf: move getopts to main script
There's no reason to keep usage and getopts
outside of the main script.
Other small changes while at it:
- use small letters for all "dir" variables
  (consistent with most of other test scripts)
- try to move default & global variables into
  one place.
- remove long comment from top of the main script.
  It was basically the same as "help" for getopts.

Change-Id: Ic99f4bb1808b55dea80b534f7b4e0a65595ed053
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3335
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-23 07:28:53 +00:00
Karol Latecki
6cebf49243 test/nvme_perf: make fio log_avg_msec configurable
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I92c7af88713ff4aa9e4a7cdf347ca06a303e5a07
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3334
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-23 07:28:53 +00:00
Karol Latecki
30491c4675 test/nvme_perf: allow CPU list from file
Read CPU list to use in test directly from option
value of from a file if it's an existing path.
This will make running tests in CI a bit easier.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I174a38ab615c2f2cd2c3b4a95e0ebf886c478a51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3333
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-23 07:28:53 +00:00
Karol Latecki
ae4c75b20d test/nvme_perf: add bdev io cache and pool size option
Allow to set custom size of bdev IO cache and pool
sizes.

Change-Id: I574d1e949f705d8f834539d5879f0a1e72865e00
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3297
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-23 07:28:53 +00:00
Karol Latecki
a7972f0a54 test/nvme_perf: use config file to select test disks
Use a simple config file to select NVMes for test
instead of selecting them all via gen_nvme.sh.
HW platforms may differ significantly in setup and
capabilities, so using all disks in sequential order
is not always a good way.
(e.g. using "first" four available NVMes for test
may yield not optimal results if it turns out that
NVMes are connected to oversubscibed PCIe switch)

Change-Id: I55dd85799a5859c4764e94e1d8058e01ad9b84f0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3296
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Karol Latecki
20995d370b test/nvme_perf: remove --disk-no option from perf script
Script was written in such a way that tests would be
performed starting with all found NVMe disks in configuration.
Then the number of disks for the workload would be reduced in
loop until reaching 1. This is the scenario used in test
case 1, described in SPDK NVMe Performance Benchmark document.

--disk-no allowed to avoid running test in loop, and specify
just a single value for the number of disks to be tested.

Both loop logic and --disk-no are no longer required as
tests are scheduled and run via CI system which picks the
parameters for each test run.

Change-Id: Iad0f4d0d259ac64680fd5bb69d7cbb7e0afff79c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3295
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Karol Latecki
0655f92a0f test/nvme_perf: improve fio results parsing
- Change divisor in nsec to usec calculation to "1000".
- Ignore MIX param when rw mode is set to 100% read or
  100% write.
- Use MIX param as number in 0.0-1.0 range for calculating
  summary read+write latency.
- Use jq "//" alternative operator when querying for fields
  which might not exist in JSON object. Assume "0" for
  non-existent fields, otherwise jq reports "null", which
  in turn results in script errors.

Change-Id: Ibc8f91f058d9ae31ee1b60f4b253c42b743ae22f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3294
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Karol Latecki
da5c4e093d test/nvme_perf: reorganize fio config generation
Previous changes moved some of the fio CLI parameters into
a bash heredoc to save into a text file, but it was put in
wrong place in the script.

Move global fio parameters a couple lines up so that the
resulting fio config file has the correct form of:
[global]
  global_params
[testjob]
  testjob_params

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3a958fe5ce880ab63a079c345e6b24fd1d3bae32
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3293
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Karol Latecki
3ef00ffb99 test/nvme_perf: fix nvme perf app directory
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I7f2b5bc3f25b444e1be8050a5ec74e884ff13068
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3292
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-22 12:22:46 +00:00
Maciej Szwed
e63eb0375d hw_hotplug: Fix HW hotplug test
Add missing exports

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I35fe3d12ff278aaff62a19e4ce1ac95a96cc4ffa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3377
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-21 09:23:09 +00:00
Changpeng Liu
919fdece12 test/nvme: enable OPAL test
Due to the firmware response time for REVERT action, currently
we only enable this test with P4510 drives.

Change-Id: I4b02008ec0b7d2caeba20c566b1cf1b69404ae12
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2816
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-07-16 07:30:36 +00:00
Tomasz Zawadzki
14ce25ab00 test/cuse: wait for device after reset
This patch adds waitforblk() after rebinding the driver.
If timing was unfortunate, it was possible to issue
id-ctrlr command to a device that was not yet ready.
Meaning the support for fw command was not read properly.

No error was reported due to "set +e", so this patch moves
it till after id-ctrlr.

Example of the error:
# get_nvme_ctrlr_from_bdf 0000:82:00.0
# readlink -f /sys/class/nvme/nvme9
# grep 0000:82:00.0/nvme/nvme
# bdf_sysfs_path=/sys/devices/pci0000:80/0000:80:03.0/0000:82:00.0/nvme/nvme9
# [[ -z /sys/devices/pci0000:80/0000:80:03.0/0000:82:00.0/nvme/nvme9 ]]
# basename /sys/devices/pci0000:80/0000:80:03.0/0000:82:00.0/nvme/nvme9
# printf '%s\n' nvme9
# nvme_name=nvme9
# [[ -z nvme9 ]]
# set +e
# ctrlr=/dev/nvme9
# ns=/dev/nvme9n1
# /usr/local/src/nvme-cli/nvme id-ctrl /dev/nvme9
# grep oacs
# cut -d: -f2
/dev/nvme9: Resource temporarily unavailable

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5728a5062cd553eb39d18d9869fdf56319a27777
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2950
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-08 07:55:33 +00:00
Tomasz Zawadzki
f9122e9054 test/common: move nvme-cli compilation to common script
NVMe tests compiled the nvme-cli, but turns out that
NVMe-oF did not. This patch moves compilation to
common script. Meanwhile next one will use it in other tests.

Additionally return to the original directories with
pushd & popd.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ica60775a9b8e4347bed28d4c9dfae1acab2cae9f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2969
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-06 23:22:59 +00:00
Tomasz Zawadzki
9803ad73ea test/nvme-cli: clean all previous artifacts from builds
There are a lot of files in the nvme-cli repo on system that
either build up (*.core) or produce misleading logs (*.gcda).

This patch cleans the nvme-cli repository before compiling.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8f169b9eaef2dc91b14b324a63b338611f82a6a5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2949
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-06 23:22:59 +00:00
Tomasz Zawadzki
af761ab167 test/nvme-cli: exit early when not running on Linux
Tests do not work on OS other than Linux, instead of
going through whole script - exit early with error.

Took this chance to move staring the stub, till after
nvme-cli compilation succeeds.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5659888527bc2c25ab10bd871f7820b13f02e3fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2947
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-07-06 23:22:59 +00:00
Seth Howell
40d20acb72 autotest: always test against SPDK shared objects
We aren't going to run into any runtime issues when
linking against static libs, but we will when linking
against shared objects, so always test against shared
objects in autotest.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2d3d6e90f5fa4c38b3f44cf35e24b4f7e43b60ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2980
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-01 07:50:27 +00:00
Seth Howell
3852afd6d8 test/nvme: in hotplug test copy lib files.
This gets us ready for the case where we want to run with
shared objects.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I84d22cf9def30a27aeb11fcf18eb80080a002ef9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3021
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-01 07:50:27 +00:00
Karol Latecki
8e8864f27e test/cuse: use 512B block size on namespace revert
Use 512B block size when running nvme_namespace_revert
routine. Need to use this block size because of
vhost_boot.sh test case.

Fixes #1452

Change-Id: I5f41cf2bf9d63b811849a99de6cba9b7b5a1d97d
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3003
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-23 08:04:05 +00:00