Commit Graph

940 Commits

Author SHA1 Message Date
Tomasz Zawadzki
30a31a16eb sock/vpp: remove VPP implementation
This patch removes implementation of VPP socket abstraction
along with ways to compile it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I089f7703cfc4fb517f8f80f4368e544bced549b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3734
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-17 08:19:46 +00:00
Tomasz Zawadzki
1f543eef54 examples/perf: add back VMD help print
Patch (0f895bbd) accidentally removed the help
print for VMD.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I460440ebab33c6a9f24340fab30f8e4ca87ba044
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3594
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-12 07:51:55 +00:00
Monica Kenguva
a70d01d6f7 nvme/identify : print ana log page information
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibdd87ea946c2d7c665779e365c1acfa46f9049e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2919
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-12 07:50:44 +00:00
Ben Walker
991a56f85d fio: Continue polling spdk_threads on the init thread after shutdown
When fio wants to shut down a thread, it stops polling it immediately.
Some SPDK threads need to continue to be polled for a period of time
to allow the message passing to all complete, so this behavior in fio
could lead to a hang. Instead, when fio wants to shut down a thread,
place that thread onto a global list that's polled by the init thread
which lives for the duration of the program. The init thread will
continue polling the spdk_thread until it has exited.

Change-Id: I07292d5ba389167c45a14aa8ffbe72b49e88d17d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3682
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: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-11 08:29:39 +00:00
Ziye Yang
d2a194c4f0 nvme/perf: Do not use IORING_SETUP_IOPOLL
This flag only works for local device. If the device from the kernel
is getting from remote (e.g., /dev/nvme2n1 is from NVMe-oF target),
then it will not work for those kernel devices while using
IORING_SETUP_IOPOLL flag.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ide396de9f53b884c4d12af64693293d57fac9523
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3531
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-29 08:06:11 +00:00
paul luse
0cecfcb19b examples/accel/perf: replace mempool of tasks with lists of tasks
For performance.  Also allocate the accurate number of tasks instead
of just blindly doubling to account for batching.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4e5accfd97477f908368f16d3fc1d8f47896a4d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3321
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-24 19:38:46 +00:00
paul luse
e8463f873f examples/accel_perf: updates to match the new accel_fw API
No longer allocate accel_tasks or convert to and from application
tasks and accel tasks.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id2d598d79bebcef522c76c125e65b100266ced57
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3210
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: Ben Walker <benjamin.walker@intel.com>
2020-07-24 19:38:46 +00:00
paul luse
ee7e31f9ae lib/accel: remove the need for the app to allocate an accel_task
This was sort of a clunky interface requiring a couple of inline
functions in every app that wants to use the accel_fw moving
forward. By having the accel_fw public API accept a callback arg
instead of an accel_task combined with adding a pool of accel_tasks
in the accel_fw engine we can eliminate this.

After changing the parm to a cb_arg, changes were made to all accel_fw
interfaces to put cb_fn and cb_arg as the last parms in public and
private function calls.

Related bdev_malloc changes need to be in this patch in order to pass CI.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2b75764e534562d91484a094c3352266156d8425
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3209
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: Ben Walker <benjamin.walker@intel.com>
2020-07-24 19:38:46 +00:00
paul luse
f295f5b31a module/accel/ioat: add support for batching IOAT accelerated ops
Also remove the batching check in accel_perf as all 3 engines
now support it.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib4cf4b148b50df50a4fc7be9e861cc83f355623a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3155
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-23 22:26:39 +00:00
paul luse
8cee297c3f lib/idxd: add batching support for compare command
Also one small bug fix w/compare in accel_perf as a result
of changes made in accel_perf sicne base compare was added.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id8e67bd9de9cbd006ac148f4a77807cc3e8e662b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2958
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>
Community-CI: Mellanox Build Bot
2020-07-22 23:01:45 +00:00
paul luse
e54f14a52b lib/accel: add batch prep for crc32c to accel fw and sw engine
Also update accel_perf to support it.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ida7b863de02c64239ec4cfbdc3b0235d4e0521f9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2954
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-22 23:01:45 +00:00
paul luse
d207237fc4 lib/accel: add batch functionality for fill command
Also as a minor drive-by, added verify capability for fill that
wasn't there before, useful in making sure the prep function
was working and really should have been there anyway.

idxd support for prep fill will follow.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib54311c1fb98abd2fb61df6603cf3c5300b71161
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2952
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-07-22 23:01:45 +00:00
paul luse
a7dfca5b45 lib/accel: have the accel fw default to use sw at times
When an engine has not filled out an entry point for an accel_fw
function, call the sw implmentation that's built into the accel_fw
transparently.

Also update the accel_perf app to no longer block attempts to use
capabilities not reported as supported by the selected engine but
instead to print an informational message.

The exception is batch related commands as their implementation
is specific to the engine.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0b3971d075ced20182f97e95147e8887103e68cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2930
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
2020-07-22 23:01:45 +00:00
paul luse
d137ba3033 examples/accel/perf: add support for batching compare cmd
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I3e26ad0fe873ea3e6157cf4f0b8570929457d309
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2929
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-22 15:02:06 +00:00
paul luse
ec086e6f3f lib/accel: add support for batch dualcast to fw and sw engine
Includes a few related changes:

* slight refactor to have common prep function for batch prep
commands in the sw engine
* added support for dualcast batching in accel_perf example app

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If9f078a0f8eb509d296e60a94331c92a72f8cb10
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2913
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: Ben Walker <benjamin.walker@intel.com>
2020-07-22 12:20:27 +00:00
paul luse
a34fc12be3 examples/accel_perf: adding batching capability for copy
This patch uses the IDXD batch feature for initial queue depth loading.
As there is a good amount of code needed to support batching on a per
command basis, this starts with only copy.  As other commands are
enabled for batching, they will be added to accel_perf.  If batching is
not available, the perf tool will simply submit the initial queue depth via
a loop, the same way it did before batching.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2669936e4da9b31a1d8fa8f0c71e9f5a6fcae412
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2745
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-07-22 12:20:27 +00:00
Shuhei Matsumoto
ca1b318f07 example/nvme: add application to test NVMe I/O abort
Add a new sample application to test I/O abort for NVMe backend,
both PCIe and over Fabrics. And enable it to test pool by NVMe-oF
+ delay bdev + malloc bdev.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5aa28b523bdb2c1d4d8c7af05f925c4dd01dda86
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2661
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-17 07:21:13 +00:00
Ziye Yang
0f895bbdc3 nvme/perf: Enable the uring support to drive kernel based local devices.
This patch will add the uring support to test kernel based
local devices, e.g., files or local NVMe devices.

To make one binary can support both uring and aio mode when --with-uring
is complied. We also introduce a new global variable g_use_uring to switch
the mode to use liburing or libaio.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I72851168cb377751313d7aa09040ef2a7eb76594
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3214
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-17 07:20:58 +00:00
paul luse
6726defce9 examples/accel/perf: fixup Makefile following earlier patch
that missed this application...
See: https://review.spdk.io/gerrit/c/spdk/spdk/+/614

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I11ffb3e3e89bf2b0093cfc703043bfe73cfe5483
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3319
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Eugene Kochetov <evgeniik@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-17 07:20:07 +00:00
Evgeniy Kochetov
c5c9a150a3 make: Create variable for event_bdev dependencies
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I7468dd242b83af8b41d72e503c212c1ffac1abd1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/614
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-07-08 07:56:46 +00:00
Ziye Yang
d50cbd30b1 nvme/perf: Update the makefile.
We must include nvme.libtest.mk first, because
OS variable is defined in spdk.common.mk referened in
nvme.libtest.mk.

Without this patch, AIO library will not be compiled
because OS variable is NULL.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I760310ab80252237d211a855d18d80ed88119a43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3217
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-07-08 07:56:15 +00:00
Evgeniy Kochetov
b1074c4905 sock/rpc: Add sock_impl_get/set_options RPC methods
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: If1193ef647c85b045d7f14a03a9942783583f553
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/612
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-07 07:32:32 +00:00
yidong0635
c75dfb4201 nvme/perf: Free resources when abnormal exit.
There are anbormal cases, from callocated nvme qpairs until
connect io qpairs successfully .
We should free these resources when abnormal exit, and codes
just return there.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I08de9c1fe1757a11a118ebedc326d81e2c68b077
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2985
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: Changpeng Liu <changpeng.liu@intel.com>
2020-06-30 07:55:33 +00:00
WANGHAILIANG
a1c00096dd example/hello_blob: Drop .ini config in favor of json
Change-Id: Iea222f4ef072676cbb5e9014a7d98ac08a4e617a
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2967
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-25 07:16:19 +00:00
ntsaravana
8c710c9d63 nvme/fio_plugin: Add Weighted Round Robin(WRR) Support
Added code to enable WRR support in fio plugin

Signed-off-by: ntsaravana <saravanan.ns@hcl.com>
Change-Id: Ie82554538c720e0a956d38716293f45a0fdc709c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2759
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: Changpeng Liu <changpeng.liu@intel.com>
2020-06-23 08:58:39 +00:00
Changpeng Liu
6366e361fe test/nvme_arbitration: use extended block size API
spdk_nvme_ns_get_extended_sector_size() is same with
spdk_nvme_ns_get_sector_size() if the drive wasn't
formatted to extended LBA format, but if the drive
was using extended LBA format, it will cause error
without this patch.

Change-Id: Ie845453949c65a9f1d1370227fe3363648f0d0d9
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2934
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-19 07:19:38 +00:00
Changpeng Liu
bd7689bd18 test/nvme_arbitration: don't print inactive namespace information
There are many log prints such as:
Controller INTEL SSDPF2KX012TZ  (PHAC0016001N1P2EGN  ): Skipping inactive NS 0
Controller INTEL SSDPF2KX012TZ  (PHAC0016001N1P2EGN  ): Skipping inactive NS 0
for inactive namespaces, so here we just register active namespaces for tests.

Change-Id: Idbb89c4e5610b4c725dbc211acaefd1897cceeb5
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2933
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-19 07:19:38 +00:00
paul luse
89495464b1 examples/accel_perf: add option to provide fill parameter
Before the value was hardcoded, provide it as a user option.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I841a3da266b7ab6e7d71503f2872338d07c8bead
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2139
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2020-06-17 07:21:05 +00:00
paul luse
0ef079c6e5 examples/accel_perf: add support for dual cast
Dual-cast copies the same source to two separate destination buffers.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0535720b2b167ee8191e90998e55c2d5ac4ce6ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2130
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: Ben Walker <benjamin.walker@intel.com>
2020-06-17 07:21:05 +00:00
paul luse
40ec8e97fe examples/accel/perf: check engine ret values and don't stop on fail
A subsequent patch brought me to realize that I was not checking the
return values from operational calls to the engine. Also, noticed
that on any failure we'd stop submitting IO but still wait until the
timer expired to exist. To match what other perf tools do, now
continue to submit even after an error and run until the clock is
out giving an accurate count of transient failures and successes.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I5e6a0f382f9090e428ee67fbdfb60926e9c85917
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2879
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-17 07:21:05 +00:00
Ben Walker
ff24db746f nvmf: spdk_nvmf_tgt_accept no longer takes a new_qpair pointer
Calling spdk_nvmf_tgt_accept() now automatically assigns new qpairs
to the best available poll group.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I3df2a2c5a28dba45c5ba0cbd1e8c28dd7e56cf9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2813
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-16 07:44:49 +00:00
Ben Walker
85bdd43b40 build: Example applications build to build/example
This mirrors build/bin and build/lib

Change-Id: Ide1d17dfc8b425adfbe67f381c93c236653bd301
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2380
Community-CI: Broadcom CI
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-15 15:27:16 +00:00
Ben Walker
c3b5ae0c60 build: Place fio plugins into build/fio
This makes them easier to find. They are now named
spdk_nvme and spdk_bdev.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I1f6736d8f7f5b9669583731fb0b710ba54f0d50a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2679
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-15 15:27:16 +00:00
Seth Howell
8cad1a9d15 nvme/fio_plugin: allow for not supplying a namespace.
This will open up the way for probing and connecting to
all of the namespaces on a pci controller.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8fa3dde9f249ce826659882e66f630b8c25e2701
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2779
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-06-12 15:39:20 +00:00
Shuhei Matsumoto
44ab133f70 example/nvmf: Fix the case when thread is terminated by communicating with other threads
As we have done for SPDK reactor, SPDK thread termination needs communication
among SPDK threads. So At application shutdown, create the while loop
until all threads are destroyed and in the loop, check each thread
is exited, and destroy the thread if exited or mark it as exiting
and retry checking after traversing other threads.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7a1008b95f3303de17449d574e917eb47cbe54b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2660
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-09 07:37:50 +00:00
Seth Howell
bd06eb2c4c nvme/perf: use the poll group API in perf.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8dda8c048467fd814225a13c31386676609354be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2009
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-04 07:20:16 +00:00
Seth Howell
8cd855f3a7 nvme/perf: actually poll unused qpairs.
I think the main point of having unused qpairs in
the perf application is to simulate the performance
drag of having active qpairs sitting idle on an application.

If we don't poll these unused I/O qpairs, there is no real performance
effect (in terms of cache evictions, wasted cycles or otherwise).

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie67223eae57a9bfbfaa703a401b0960f88552e11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2008
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-04 07:20:16 +00:00
Changpeng Liu
38b80ba531 examples/fio_plugin: only enable Bit Bucket SGL with READ commands
We only enable this feature for READ commands in the NVMe driver, so
also ignore the WRITE commands in fio plugin tool.

Change-Id: Iecf43326e1a2a3b3540a1391e09a33d2443bd546
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2730
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-03 07:38:12 +00:00
Changpeng Liu
d9c6b6bb64 test/nvme_reserve: move examples/nvme/reserve to test/nvme/reserve
This only covered one test case for NVMe reservation feature, so remove
it to test directory.

Change-Id: I7920679ce14dd4d6a9164cb7663016bc7a3a4929
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2732
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-03 07:38:08 +00:00
Changpeng Liu
4088860a03 examples/nvme_reserve: unregister the registrant key at last
When testing the application, after release the reservation, the
registrant is still there, so we need to unregister the registrant
at last to restore the drive to a clean state.

Also set the CPTPL to 10b, it means Reservations are released
and registrants are cleared on a power on, we will move the tool
to test/nvme directory in following patch as this is only one
test case for NVMe reservation feature.

Change-Id: I271a61985940958b9f36887f9cd97841841ba2d6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2731
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-03 07:38:08 +00:00
paul luse
b9218b7ac6 examples/accel perf: add compare workload
Optionally let the user specify what % into the buffers there should
be a miscompare if desired.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I3a5524de5e0f7cb91fcf92e76f937bdf280a515b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2109
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-01 09:21:32 +00:00
Shuhei Matsumoto
3d857e3611 nvme/arbitration: Increment current_queue_depth only if I/O submission succeeded
current_queue_depth should have been incremented only if I/O submission
succeeded.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibdcae2d4e8d5b804faaac2392226252c95dfb634
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2586
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-29 14:58:30 +00:00
Shuhei Matsumoto
777bd353d2 example/nvmf: Add periodic round robin poll group migration
Add simple periodic round robin poll group migration to the example
application to exercise SPDK thread dynamic scheduling.

Add CLI option to enable the feature manually. Default setting is
disabled, and the period is specified as micro second.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4639e94ce00611a600ff068e754ee6f31905565c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2556
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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-05-27 07:35:11 +00:00
Shuhei Matsumoto
8b93c646ae example/nvmf: Support dynamic SPDK thread rescheduling
Add the flag, resched, to struct nvmf_lw_thread.

Add an new function nvmf_request_spdk_thread_reschedule() to set
the resched flag of the current thread to true.

nvmf_reactor_run() checks the resched flag and call
nvmf_schedule_spdk_thread() and clear it if it is true.

Enable the thread operation SPDK_THREAD_OP_RESCHED and add
nvmf_request_spdk_thread_reschedule() to the case of
SPDK_THREAD_OP_RESCHED in nvmf_reactor_thread_op().

Following patch will add repeated calls to spdk_thread_set_cpumask()
to exercise the feature.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I60a4213c139b3e6f16ccb7065dea34ffe760de13
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2541
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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-05-27 07:35:11 +00:00
Shuhei Matsumoto
ab6dbff72a example/nvmf: Replace locked linked list by lockless ring for run queue
Replace mutex and linked list by lockless ring for nvmf_reactor->threads.

If we create event call, we will be able to keep linked list and
remove only mutex. However, simple replacement of locked linked list
by lockless ring will be enough for now.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I590a385ff018ad20c7d6752b0a3a5562e3b68510
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2579
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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-05-27 07:35:11 +00:00
Shuhei Matsumoto
10190302d2 example/nvmf: Create only a single SPDK thread on the master core at startup
Stop creating the default lightweight thread per POSIX thread. Additionally,
substitute the created master thread into g_init_thread directly as a
preparation to the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I09643491e6b5aaf91d9958481f05e264a2ac5f7d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2542
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-27 07:35:11 +00:00
Shuhei Matsumoto
a9430856b6 example/nvmf: Deprecate spdk_thread_lib_init() by spdk_thread_lib_init_ext()
Replace spdk_thread_lib_init() by spdk_thread_lib_init_ext() to
support dynamic SPDK thread scheduling in this sample application.

Add nvmf_reactor_thread_op() and nvmf_reactor_thread_op_supported(),
and then pass them by spdk_thread_lib_init_ext().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9498d45d74757d8893b2b415fe28bf65f8fd02d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2540
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-05-22 10:43:30 +00:00
Shuhei Matsumoto
bda55ddb6b example/nvmf: Create and destroy lightweight thread per poll groups dynamically
By following the SPDK NVMe-oF target application, create and destroy
a lightweight thread per poll group instead of assuming a pool of
lightweight threads already exist at start up time. Each poll group
is only accessed from the associated lightweight thread.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0a221594d51373237f4ead07a3f5592dbbffa7a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2539
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-05-22 10:43:30 +00:00
Shuhei Matsumoto
2a6ce9e2ce exapmle/nvmf: Destroy dynamically exited thread at nvmf_reactor_run()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6782e8c59df5f20cb6c368482633875d6e9b7235
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2538
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-22 10:43:30 +00:00
Shuhei Matsumoto
8753fdb645 example/nvmf: Run SPDK threads by FIFO to avoid deadlock
if spdk_thread_poll() calls spdk_thread_create() to create SPDK
thread dynamically, it will acquire nvmf_reactor->mutex and will
cause deadlock because the queue nvmf_reactor->threads is accessed
by any POSIX thread by holding nvmf_reactor->mutex.

If any non-owner POSIX thread manipulate nvmf_reactor->threads by
holding nvmf_reactor->threads, like general priority based scheduler,
running SPDK threads by FIFO will be better.

Change nvmf_reactor_run() to dequeue a SPDK thread from the head, run
it, and then enqueue it to the tail. Release nvmf_reactor->mutex
while spdk_thread_poll() is executed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9b4040cc4d995beaf4a1f9ed8260bb1254d7d7fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2537
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-22 10:43:30 +00:00
Shuhei Matsumoto
9bea56c004 example/nvmf: Enlarge critical section guarded by g_mutex in nvmf_schedule_spdk_thread()
nvmf_schedule_spdk_thread() is not so performance critical but
should work as designed. Guard the whole operation to decide the target
core by g_mutex. This matches the reactor's _reactor_schedule_thread().

If _reactor_schedule_thread() is refined, change this accordingly too.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9382230577442897d4d2d22b85b1ae4edd77aa98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2536
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-22 10:43:30 +00:00
Maciej Wawryk
a36e9605c0 Change fio version to 3.19
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I8b50640db9b832f35a6f8fb9c2a151bea2f084a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2370
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-21 09:20:01 +00:00
Changpeng Liu
b2947f528f nvme/opal: deprecate spdk_opal_supported()
The spdk_opal_supported() is redundant with spdk_opal_dev_construct(),
because we only return the spdk_opal_dev structure when the drive
can support OPAL feature.

Change-Id: Ieadf271a0c8530f2440cded05ad139483a8c5937
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2383
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-20 14:16:44 +00:00
paul luse
e69375bff3 examples/accel_perf: Add CRC-32C workload type
This is more to exercise the various CRC-32C back ends than anything
else but will calc a CRC on the source data and if -y is
specified it will also calculate SW (ISA-L)f defined CRC-32C and
compare every operation against what the accel engine came up
with using whatever back-end was enabled.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I5ecd3c474717bce4e46d75875a784f888052993e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2073
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-15 08:12:13 +00:00
GangCao
af0081f706 Tool/identify: correct the capacity size in byte
The capacity is calculated without single block size.

Correct the calculation.

Change-Id: I039e4dbdfc00f5d29148efc2c2a553535b7daf70
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2367
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 08:11:52 +00:00
Tomasz Zawadzki
d306693130 Revert "nvme/opal: deprecate spdk_opal_supported()"
This reverts commit 669985172f.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Icadca660c1d245f53d3ce1812a811732df0bff0e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2376
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-11 16:58:03 +00:00
Changpeng Liu
669985172f nvme/opal: deprecate spdk_opal_supported()
The spdk_opal_supported() is redundant with spdk_opal_dev_construct(),
because we only return the spdk_opal_dev structure when the drive
can support OPAL feature.

Change-Id: I2a8b70aa92828cf60d168dcf2985759e0eb9a6e3
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2217
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>
2020-05-11 12:35:43 +00:00
paul luse
514be889ca examples/accel perf: Use new accel engine capabilities API
Make sure the selected engine supports the attempted operation.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib8e0835b8d05fbd309f36749c7740c5ec7239c02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2026
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-04-30 17:51:19 +00:00
Seth Howell
e5c4b63382 nvme/examples: fix potential memory leak in reconnect.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib410cde580dc903f7185d001dbd434e6db64c57d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1987
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-04-24 07:07:43 +00:00
paul luse
3667603765 examples/accel perf: fix small issue with params
Need to check that a valid workload type was specified and print
usage if not.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib956e28f9049e49f19adcc09e861db42034799b8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1900
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-04-22 09:20:50 +00:00
Changpeng Liu
c34f224f56 nvme/cmb_copy: disable submission queue in CMB
Recent CMB changes disable using the CMB copy and submission queue
at the same time, so disable use_cmb_sqs by default.

Also spdk_nvme_ctrlr_map_cmb() changed the "size" parameter used as
size of buffer that was mapped, so change it here too.

Change-Id: If957674042b7f4a08e272bf5f9f2ee29f50805cb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1955
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-04-22 09:18:22 +00:00
Changpeng Liu
22a1acce97 fio_plugin/nvme: add Bit Bucket SGL with READ support
For the purpose to enable the stress test with Bit Bucket SGL,
here we added one new parameters: "bit_bucket_data_len".
For testing it, user should set "enable_sgl=1" and
"bit_bucket_data_len=4096".  This means total 4096 Bytes of
data will be described by Bit Bucket SGL, note that the value
should be less than block size specified in the fio command
line.

We will count the Bit Bucket data from the beginning of each
I/O for simplification.

Currently it's only valid for READ test. User can see the
performance improvement when enabled the Bit Bucket.

Change-Id: Ia481a324c25942d6ca051c71cb90f87d21955259
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1623
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-04-20 07:41:50 +00:00
Ben Walker
265a8436f4 nvme: Change mapping semantics of controller memory buffer
Instead of creating an allocator where the driver manages the space,
now, since using the CMB for queues and data has already been
disallowed, just create functions to map and unmap the entire CMB.
The user can manage the space.

Change-Id: I023994deda3b517e14d2ba464c7375bf22b58456
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/785
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
2020-04-16 08:14:18 +00:00
paul luse
2a0c66d03d examples/accel/perf: Add support for fill operation
Usable with both ioat and upcoming idxd modules.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ie25743854aa6a05d1b5f580ea64fb5c7d7c722d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1720
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>
2020-04-16 08:10:33 +00:00
Shuhei Matsumoto
ab0bc5c254 lib/thread: Use function name as poller name by using macro SPDK_POLLER_REGISTER
We will be create fine name for each poller but it will need large
effort. Replacing spdk_poller_register by the macro SPDK_POLLER_REGISTER
will provide better name than function address with minimum effort.

Following patches may improve function name for clarification.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If862a274c5879065c3f7cb04dcb5ca7844523e68
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1781
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Community-CI: Broadcom CI
2020-04-15 07:23:09 +00:00
Tomasz Zawadzki
454ff1726b test/ioat: ioat_perf app will exit with error code
This change will make sure that ioat_perf application
exits with error code 1 whenever there was
no test performed.

Mainly by checking number of ioat channels available.
Other changes made to align with returning 1 on error.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id94fa947fd097d5085285d3348aeb41ff280e731
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1672
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-10 07:07:11 +00:00
Tomasz Zawadzki
5a48cd9690 test/ioat: verify app will exit with error code
This change will make sure that verify application
exits with error code 1 whenever there was
no test performed.

Mainly by checking work_fn return code.
Other changes made to align with returning 1 on error.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I28a36dd5d5adb50bb4f54b1cc724c80da96af564
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1671
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-04-10 07:07:11 +00:00
Richael Zhuang
13d6d00347 examples/blob: skip '\0' when dump xattr's value
In show_blob(), value_len of xattr contains terminator '\0',
which is printed as '.' when calling spdk_log_dump().
For example, we set key/value pair as <key1,xattr value>, we get
"xattr value." but not "xattr value" when showing blob info.
Skip '\0' will fix this.

And "data[BUFSIZE]" seems redundant here, remove it.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I4e7c3276e51f14badf43b660b80b24ae85bb0900
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1745
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-04-09 08:08:07 +00:00
Shuhei Matsumoto
e7ead00b53 lib/thread: Wait until thread_is_exited() is true by thread_poll() after thread_exit()
Following patches will require thread termination so that thread_exit()
will move thread to exiting, thread_poll() will move thread from
exiting to exited, thread_is_exited() will detect the threadis exited,
and then call thread_destroy().

So change all places as a preparation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6b2e8aee5ed7cd160a88b4c9aaed7d90bd9dac07
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1640
Community-CI: Broadcom CI
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-04-08 06:43:05 +00:00
Darek Stojaczyk
410bdfdbe3 bdev/fio_plugin: accept wildcard (*) as fio target
FIO in our scripts is usually run as follows: (more or less)

fio_bdev /path/to/job.fio --spdk_json_conf=/path/to/spdk.json
--filename="$(discover_bdevs /path/to/spdk.json --json)"

The bdev names are usually hardcoded in the json config, but still,
they have to be provided to fio again. Not anymore - just use
--filename=* and FIO will use all available bdevs as I/O targets,
just as if all filenames were provided.

The above command could be now simplified to:
fio_bdev /path/to/job.fio --spdk_json_conf=/path/to/spdk.json --filename=*

Change-Id: I56a02e56877b138429d68fb24f1a383c6700c4f4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1542
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-04-06 07:56:11 +00:00
Changpeng Liu
ebb01092a3 nvme/opal: use secure erase API again
Commit 8c1d107 added a new erase API and renamed the original
API with "secure_" prefix according to the specification, as the
secure one will not cryptographically erase user data, due to
the limitation from the drive, only the secure API can be
supported, so changing the caller to use the original again.

Change-Id: I25cb054e728065d9ae9c6c30aa0ab374d60cf6f6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1519
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>
2020-04-01 01:08:39 +00:00
Seth Howell
91003e5287 make: don't link vpp into fio plugins.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I96e29cd0681d767d22e31973950655b974ce9031
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1397
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-03-26 08:12:04 +00:00
Jin Yu
89519ebc49 fio: make the ctrlr send keep alive in time
In spdk_fio_setup when the connections are too many,
for example 16 subsystems, it would take too much time to
complete the probe. And it takes the mutex that makes the
poll_ctrlr function can't send the keep alive cmd which
causes the target timeout. Split the mutex so the poll_ctrlr
has the chance to sent keep alive.

Fixes issue: #1286

Change-Id: I300513b5e8761d9eaadb4c5cbc8ed97fe84d02df
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1407
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-25 07:53:06 +00:00
Changpeng Liu
a3363de3c2 nvme/opal: consolidate two get_locking_ranges APIs into one
Actually we can just use one API to finish the requirement.

Change-Id: Ia0d3d589755e8c92f636d3d090ec642299511401
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1280
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-25 07:52:28 +00:00
Changpeng Liu
3502a45db2 nvme/opal: remove unnecessary NULL checks and a API
The APIs even don't have a chance to be called if the drive can't
support OPAL feature, so just remove the NULL check, and we will
store level 0 discovery descriptors after initialization, so
spdk_opal_cmd_scan() isn't necessary here, remove it as well.

Change-Id: I24f12f2c352996d9ebe76dc015cd0b7502798359
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1231
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-25 07:52:28 +00:00
Shuhei Matsumoto
2fa51eeb46 lib/nvmf: Make spdk_nvmf_poll_group_destroy() asynchronous
The next patch will create poll group threads dynamically for
NVMe-oF target, and will need to wait for completion of poll group and
I/O channel destroy. This is a preparation for the next patch.

Add callback function and its argument to spdk_nvmf_poll_group_destroy(),
and to struct spdk_nvmf_poll_group, respectively.

The callback has not only cb_arg but also status as its parameters even
if the next patch always sets the status to zero. The reason is to follow
spdk_nvmf_tgt_destroy's callback and to process any case that the status
is nonzero in future.

spdk_nvmf_poll_group_destroy() sets the passed callback to the passed
poll group.

Then spdk_nvmf_tgt_destroy_poll_group() calls the held callback in the
end.

This change will ensure all pollers are being unregistered and
all I/O channels are being released.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifb854066a5259a6029d55b88de358e3346c63f18
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/495
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-03-17 08:49:00 +00:00
paul luse
9f51cf3238 examples/accel/perf: perf tool using the accel framework
Supports SW accel engine, CBDMA accel engine and eventually the DSA
accel engine through common API.  Basic functions only are included
here, subsequent patches will add more features as needed. For
example, the verify function is very crude right now.

Tool output was compared to the ioat perf tool w/CBDM and results
are very close although there a small penalty for using the
framework.

For CBDMA, start the app with --wait-for-rpc and run the ioat scan
RPC with desired whitelist. If there are not enough channels
(channels are not a concept in the framework) then SW accel engine
will be used for cores that could not get a channel.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I9c5ab33e74db7bdbc5bfe5d7a08cc7ffaeab625b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/883
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>
2020-03-16 08:45:13 +00:00
Changpeng Liu
0cd8b2927e nvme/opal: move maximum password size definition to opal_spec.h
The macro is defined by the spec, so place this value to where
it should belong.

Change-Id: I23f91662fd4ab279aa4285212fc8cbd2ed42245b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1126
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>
2020-03-11 11:36:08 +00:00
Changpeng Liu
c61b70c3d5 nvme/opal: rename spdk_opal_init_dev() and spdk_opal_close() with construct/destruct suffix
Since the OPAL here is just for NVMe device, so we don't need to use dev_handler as common
handler, just rename it to spdk_nvme_ctrlr.  And we don't exit the initialization if
OPAL construnction had a failure.  Also move the timeout initialization to construct().

Change-Id: I11f0aea961eaa3da0c6253eb03d0227f7e7e5f11
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1101
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-11 11:36:08 +00:00
Changpeng Liu
01ddd1120a nvme/opal: refactor level 0 discovery data structures
No actual logic change except re-define some data structures.

Change-Id: Id0a483071591beee675cbc3ef368ac1fb723cfe0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1099
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-11 11:36:08 +00:00
Alla Kiseleva
14db3c7e4b perf: Add NSID in perf output information
Currently an option is implemented to monitor a correlation between the
core and namespace.

Previously:
==================================================================
Device Information
RDMA (addr:1.1.75.2 subnqn:nqn.2016-06.io.spdk:cnode1) from core  0:
RDMA (addr:1.1.75.2 subnqn:nqn.2016-06.io.spdk:cnode1) from core  0:
==================================================================

Now:
========================================================================
Device Information
RDMA (addr:1.1.75.2 subnqn:nqn.2016-06.io.spdk:cnode1) NSID 1 from core 0:
RDMA (addr:1.1.75.2 subnqn:nqn.2016-06.io.spdk:cnode1) NSID 2 from core 0:
========================================================================

Signed-off-by: Alla Kiseleva <c_allaki@mellanox.com>
Change-Id: I35e39c62bbdac05152f35e11eb1d560eb0e50404
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/955
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-03-06 10:27:39 +00:00
Alexey Marchuk
32c6f860d5 reconnect: Add transport ack_timeout and retry_count parameters
These parameters can be enabled using -A (ack_timeout) and
-R (retry_count) cli options

Change-Id: I0c262f93c664a69aa952d6926fd7b0d02acf9e30
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/503
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-27 10:16:00 +00:00
Seth Howell
2b43f6353f test/nvmf: add verify_backlog to fio SGL tests.
On newer versions of FIO, there is an issue with heavy verify workloads
where one of the headers (rand_seed) gets incorrectly generated by fio
during verify. This can be circumvented by using the verify_backlog
flag.

This is needed because it will enable testing this workload on the tcp
transport using fio in the SPDK test pool.

Change-Id: I028be3fdb72a76733b4226a37b6332cd45d0f774
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/988
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-02-25 15:59:21 +00:00
dongx.yi
044704995d nvme/cmb_copy: Carriage return between return type and function name.
Meanwhile,  checking new gerrit for committing a new patch.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: I33c0f5bf5b13a147777a9831c9c6e6079b90590f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/999
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-02-25 10:32:01 +00:00
paul luse
8e16979b21 examples/fio_plug-in: update README to clarify licensing
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I720533fe79942cc76bf3c7c0781ad7cb7085242d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/836
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-20 09:48:11 +00:00
paul luse
aa7a13afc7 global: rename copy to accel
The copy engine library, modules and public APIs have been renamed.
Use of the word `copy` has been replaced with the word `accel`
short for accelerator in preparation for adding new capabilities
in the future. Additionally, APIs for what was previously called
the `memcpy` engine have been renamed to identify the engine as a
software accelerator.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia607aa718416146fbba1e6792b8de0f66bd8a5de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/576
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-02-18 08:05:34 +00:00
Karol Latecki
71efe5db24 Fix Markdown MD026 linter warnings - trailing punctuation in header
MD026 Trailing punctuation in header

This rule is triggered on any header that has a
punctuation character as the last character in the line

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3ab4894092ef6b5f920d89b74e43c2e46e9581c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/657
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>
2020-02-17 10:07:21 +00:00
Karol Latecki
93be26a51d Fix Markdown MD022 linter warnings - headers blank lines
MD022 Headers should be surrounded by blank lines

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I768324b00fc684c254aff6a85b93d9aed7a0cee5
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/656
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>
2020-02-17 10:07:21 +00:00
Karol Latecki
a41c031609 Fix Markdown MD012 linter warnings - multiple blank lines
MD012 - Multiple consecutive blank lines

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3f48cdc54b1587c9ef2185b88f608ba8420f738b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/654
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>
2020-02-17 10:07:21 +00:00
Karol Latecki
c344dac9cc Fix Markdown MD003 linter warnings - header style
MD003 - Header style
Triggered when inconsistent header styles are used accros file.

Also adjust other headers in file to fix
MD022 - Headers should be surrounded by blank lines
MD025 - Multiple top level headers in the same document

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I1937abc0d29dc8a21a8eac54d0af2427ebf95bdc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/653
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>
2020-02-17 10:07:21 +00:00
Seth Howell
5145195533 nvme/perf: simplify variable handling in parse_args
Make the two non-global conf variables global (this will be needed when
we switch to the app framework) and only assign globals with an initial
value if that value is Non-zero.

Change-Id: I141c32cb2eb614861f62ec6a7662252a33a101ec
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/824
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:05:35 +00:00
Seth Howell
b67112368f nvme/perf: switch opt args -m and -n to -C and -P
This is preparatory to switching the application over to using the app
framework which will require us to avoid any overlap between the app arg
string and the other arg string.

Change-Id: I692d4ec9d078acfc4c28aa7b0f40c0acd7c8af12
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/756
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:05:35 +00:00
paul luse
04f7bfe057 examples/blob/hello_world: fix a few typos
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iac7857bddbed0721d108e9f986afeab4d5911fef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/882
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>
2020-02-17 10:05:02 +00:00
Darek Stojaczyk
8e7d6e1b0c app: added --json-ignore-init-errors
If set, SPDK will continue loading the JSON config even if
some commands caused an error. This can be useful when loading
RPC config from spdk_tgt into e.g. bdevperf, which supports
only a subset of RPC commands and would usually fail with
"Method not found" message.

Resolves #840

Change-Id: I070fea862fd99e5882d870e11e6a28dc9d0c8ba6
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/620
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:53:02 +00:00
Ziye Yang
17cdadf5a9 test/hello_sock: Refactor the program and add -N option
This option is used to make hello_sock can use the
designated sock implementations. We need this patch
since we will provide another uring implementation.

So better to pass the name. Otherwise if the users have
many different implementations, VPP implementation
could not be the highest priority for test.

Change-Id: Ibb3862e9e6588743ec9c01074904ed4f7c9c06a5
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/478
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-13 09:51:46 +00:00
Darek Stojaczyk
9ad234a121 examples/fio_plugin: don't allow starting in daemonized fio server
A nice message about not supporting fio daemon mode is
better than seeing CRC errors.

Resolves #1118

Change-Id: I274e7a053e2fa464e26a19bf2b8b76395ad40e7c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/575
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-13 09:51:28 +00:00
Seth Howell
f6e682af75 nvme/perf: simplify parse args.
the workload parsing didn't need to be that complex.

Change-Id: I28627a430834eb48a7c3921ac655d80e348c66ea
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/755
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-12 12:08:09 +00:00
Seth Howell
806d411693 nvme/perf: remove extra check_io function.
This function was just a wrapper for a one line call.

Change-Id: If91338f917a110fda2493da4022c0a18281418ca
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/754
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-12 12:08:09 +00:00
Konrad Sztyber
ce6171d465 lib/vmd: detach devices during shutdown
Added spdk_vmd_fini(), which detaches all PCI devices acquired by the
VMD subsystem.

Fixes #1148

Change-Id: I43218ef5f9a764546b655c28688897fb91b779cb
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482852
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-04 16:50:25 +00:00
Tomasz Zawadzki
3f5728fe83 example/fio: add option to load json_config
Added new configuration option to bdev fio_plugin
called 'spdk_json_conf'. When provided the SPDK
subsystems are loaded using this JSON configuration.

Only single type of configuration can be provided at
a single time.

While here, added bdev_rpc in Makefile to support all bdev
related RPC that can now be issued via json config.

Change-Id: I5f45fe2d8331034ef4becca43bbaedebd6b20c5a
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463979
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-02-04 15:15:46 +00:00
paul luse
03e96be67d examples/bdev: add bdev_rpc to Makefile for hello_world
Fixes issue #1178

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2bf53e398e10f1a8c4b4418fbf8f940f5861d7bf
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483562
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-02-03 12:47:14 +00:00
Darek Stojaczyk
15d92f6a12 examples/hello_bdev: allow running without ini config file
Remove the config file check explicitly preventing hello_bdev
from starting and also update the docs not to reference config
files at all.

Change-Id: Ieefb629ef16d75a43c2c1fad2ac442f6e37cc16d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483386
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-01-31 12:37:12 +00:00
Changpeng Liu
ca073ef3ac nvme/fio_plugin: also set appmask/apptag when PRACT is enabled
Previously we only initialize the DIF context when PRACT is 0, because
the DIF library can only support that case, but when end-to-end data
protection feature is enabled and PRACT is set to 1, the controller
will help to check the metadata, but we still need to pass
appmask/apptak to controller.  This patch will fix this case.

Change-Id: Ia62d4f8a7adf822b75541f69ce57aeff8f9eb505
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482047
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-22 13:54:06 +00:00
Karol Latecki
917976766d autotest.sh: add hello_blob to BlobFS tests
Hello_blob example was never run before in autotest.

Change-Id: I1f858bed816471efed947f06107cec981dd562a4
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481570
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-22 13:52:22 +00:00
Ivan Betsis
9a21cb5772 perf: Log error if mandatory parameters are missing
If "-o" (block size), "-q" (query size), "-t" (time in seconds),
 "-w" (io pattern) is absent, per doesn't report
 any message.

Change-Id: Icfe8e7136e41b9e4698e0553def8f8f386742e56
Signed-off-by: Ivan Betsis <c_ivanb@mellanox.com>
Signed-off-by: Alla Kiseleva <c_allaki@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481706
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-16 09:20:39 +00:00
Ziye Yang
0bfaaace8f sock: Add impl_name parameter in spdk_sock_listen/connect.
Purpose: With this patch,

(1)We can support using different sock implementations in
one application together.

(2)For one IP address managed by kernel, we can use different method
to listen/connect, e.g., posix, or uring. With this patch, we can
designate the specified sock implementation if impl_name is not NULL
and valid. Otherwise, spdk_sock_listen/connect will try to use the sock
implementations in the list by order if impl_name is NULL.

Without this patch, the app will always use the same type of sock implementation
if the order is fixed. For example, if we have posix and uring together,
the first one will always be uring.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic49563f5025085471d356798e522ff7ab748f586
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478140
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-16 09:11:32 +00:00
Seth Howell
f6cf92a31f lib/nvme: make transport.c use fn tables.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ida58785784b4ed50393e1d43a9cd902de74a2eaa
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478873
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>
2020-01-16 09:10:38 +00:00
Seth Howell
771d759312 lib/nvme: add spdk_nvme_transport_available_by_name
This new api function will enable us to work with custom transports.

This is needed to enable properly parsing and comparing custom transport
IDs that may all resolve to the same enum value.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I26aa3cb8f76f8273f564799d9b2af8041ea0d219
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478752
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>
2020-01-16 09:10:38 +00:00
Seth Howell
241d04467d example/nvmf: always return after spdk_subsystem_init
When the call to spdk_subsystem_init returns synchronously, calling the
callback results in double iterating over states in the state machine.
Returning after calling spdk_subsystem_init allows us to reliably begin
executing after the callback function is executed with no double
execution.

Change-Id: Ieb9003acece7483c956f19be4f131c8d4f64fbaa
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/480007
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-13 01:47:30 +00:00
JinYu
ada795302a nvmf_example: add the acceptor poller
Add acceptor poller to handle all the connections.

Change-Id: I3228547d63a5812b90fe4394641cf124d9e64d12
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468660
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:16:05 +00:00
JinYu
095fef2f45 nvmf_example: start subsystems
Change-Id: Ic1aa1ad9c2cbd637fd1b6d5609a36a63f5f8a698
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468659
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:16:05 +00:00
JinYu
8d601b077f nvmf_example: create the poll groups
Create the poll groups of the nvmf target.

Change-Id: I56a7add994927245ef5984574fa6230821276b7f
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468658
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2020-01-07 12:16:05 +00:00
JinYu
b63e47f237 nvmf_example: construct the nvmf target
Construct nvmf target.

Change-Id: I126d2f6b9f96840975fbc8fb833d0d7bc03b35fd
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468657
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2020-01-07 12:16:05 +00:00
JinYu
c871ee40e6 nvmf_example: add the signal handler
Add the same handler for SIGINT and SIGTERM so that
the working thread can exit.

Change-Id: If1ce617ddd778e92bed6f95089c48caf841e256f
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468661
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-07 12:16:05 +00:00
Anil Veerabhadrappa
3022d2f83b example/nvmf: fix nvmf example compilation with fc transport
Add fc library path if FC transport is configured.

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: Ifca51aed9cfde6fda347bbe9e331026bd7246a97
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478771
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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: Ben Walker <benjamin.walker@intel.com>
2019-12-30 11:45:24 +00:00
dongx.yi
fe7f865315 perf: Unify the unit name of IOPS.
There's one left has not been changed.
That's be ignored ever.
Change IO/s to IOPS.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: I1555cc02644b238e8d4fece31f932a480c20121d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478399
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-23 08:43:53 +00:00
Changpeng Liu
3f2660d73f nvme: add queue priority mask and maximum arbitration burst macro defintion
Change-Id: I864fed43fa1519d5bdd07222313a3ba148fab6b2
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478260
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>
2019-12-20 10:06:22 +00:00
Changpeng Liu
d7b9a14c8d example/nvme: use the union cdw11 structure for arbitration feature bits
Change-Id: I7a28c9f649c26ba8f7c8e166fa1196842a2a3b86
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478259
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>
2019-12-20 10:06:22 +00:00
Jin Yu
1c53379bdf nvmf_example: initlize the bdev layer
Change-Id: I92f6c03f944ef51b2a325b64055861d8376e5134
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475414
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-20 10:03:34 +00:00
JinYu
ebad2567ac nvmf_example: initlize the thread layer
Change-Id: Ic00e7f5b557b657f18b0b510987c682363be1da8
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468656
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-20 10:03:34 +00:00
JinYu
b9793e6809 nvmf_example: add an nvmf example
use the nvmf lib to add an nvmf example which
doesn't use the spdk app framework. It can show
how to use the nvmf lib to build your own nvmf target.

We encouage you to use the RPC cmds so this example will
not supply the configuration file. You can read the
README.md to get the steps how to build your nvmf target
and test the IO status.

Change-Id: I8d175934f7364d40fb44d36e85c31d8ea5063654
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468457
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2019-12-20 10:03:34 +00:00
Tomasz Kulasek
d5ee14af37 examples/nvme: report fused operations in indentify example
Change-Id: I401078cffd3b328fd784d55882fca0fff6646ce0
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476770
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-12 15:30:22 +00:00
Jin Yu
77d3ca7b47 perf: fix makefile
The OS defines in the spdk.common.mk. nvme.libtest.mk include
the spdk.common.mk.

Fixes the issue #1106

Change-Id: If37e0f6508ce116a4df6d96d72bea0c693fb53a5
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477449
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-12 14:50:55 +00:00
Evgeniy Kochetov
ffc7c4a9a9 nvme: Rename 'delay_pcie_doorbell' to 'delay_cmd_submit'
'delay_pcie_doorbel' parameter in 'spdk_nvme_io_qpair_opts' structure
was renamed to 'delay_cmd_submit' to make it suitable for every
transport. Old name is also kept for backward compatibility.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I09ef8028133c4a3d4a5bbc5329ced1f065bcaa46
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475305
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-12-10 17:32:10 +00:00
Maciej Wawryk
2951c1010e Change fio version
Whole autotest fails on VM Fedora31
GH #1081
Fio version update to fio-3.15

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I3b91c426050eb30af6b58434b6219090c61a48ba
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476893
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-06 14:50:59 +00:00
Changpeng Liu
0c9057f031 nvme: replace cdw11 with specific union strucutre
Change-Id: I1152b5d6d5f8e3c2f96dcca1353d85a410924fb4
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475467
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-06 14:43:41 +00:00
Changpeng Liu
1fea1fccf5 nvme: replace cdw10 with specific union command
Change-Id: Ibdbc6d0356749795db26f58aa5c5e68739d5df5e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475465
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-12-06 14:43:41 +00:00
Seth Howell
c4d4800a46 test/nvmf: add a test for bad discovery ctrlr.
Make sure we don't crash or do any other bad memory accesses when we
fail to connect to a discovery controller.

Change-Id: I7c3e25899bc78f4beff9ad017612bacf286d52c7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474153
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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>
2019-11-18 13:06:49 +00:00
Seth Howell
b35dfa2bd2 nvme/perf: Make it possible to disable keep alive.
There was an assignment in perf that prevented the user from actually
disabling keep_alive. If the user specified 0, it would get overridden
by the default opts value. So set the global in perf to a reasonable
value, and always use that value when setting the keep alive timeout.

Change-Id: I2eba14525613d679d7def29cc9ed312851cae156
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473059
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-11-15 20:26:46 +00:00
Wojciech Malikowski
6c3f93c7fb lib/vmd: Documentation and user guide
Add VMD documentation to driver modules section.

Change-Id: I806058d897586780b8be73f90df3d0df152f6a84
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473526
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
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>
2019-11-15 18:21:23 +00:00
Jim Harris
9d9a90faa0 nvme/perf: print periodic stats to stdout every 1s
This is sort of like the periodic stats that fio
prints every second or so.  We can add more to this
later, but this by itself is a nice improvement I
think.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4ac588c8301bae9924dd6541cbc386ffe8d06b5d

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473339
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-11-13 15:03:33 +00:00
GangCao
fcf4c5e426 bdev/fio: always set the engine_data to NULL
When initiating the io_u strcture from FIO, always
set the engine_data to NULL first as the io_u structure
is just malloced from FIO without specifically setting
to zero.

In the io_u free path, the engine_data field is checked
whether to NULL or not. To avoid mischeck issue, explicitly
set the engine_data to NULL at the beginning of the io_u
init path.

Change-Id: I52c8c251f36925650a44d14e35781bd8494ff358
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472916
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-06 14:49:00 +00:00
Jim Harris
3f2002eaba nvme/perf: store master core as global variable
This will be used in a future patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie88daa20842f5f166b4a7a5abccafd6683d6da64

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473338
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2019-11-06 14:47:05 +00:00
Jim Harris
437dce1a5b nvme/perf: remove unnecessary logging
There's little use to the "Starting thread on core XX"
messages - they may have served a purpose at some point,
but the other messages showing where each controller
is associated is sufficient.

Also remove the "Attaching to..." message - the
"Attached to..." message is sufficient here too.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9543e8f3f6d7b6e28238cba27fc1e4194908f3b7

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473337
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2019-11-06 14:47:05 +00:00
Jim Harris
2a8dc3e943 nvme/perf: fix alignment of final data
The core number may be 1 or 2 characters, and the
printf format wasn't accounting for that.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3c87466df1014fb6c0a4e7db1a9b6f6054559eae

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473065
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2019-11-06 14:47:05 +00:00
Jim Harris
766ef001f3 nvme/perf: remove bad warning message
When we specify a queue depth that may be higher than
the io_queue_size, we print a warning indicating this.
But it was also setting the g_warn flag which would
result in this message also getting printed:

WARNING: Some requested NVMe devices were skipped

But we don't actually skip any SSDs in this case.  So
remove setting of that flag in this case.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic63209f1a96990dac9664ce245c6406c37248494

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473064
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-06 14:47:05 +00:00
Seth Howell
eb2dee2444 test/nvmf: add a test case for trid failover.
Modifying the target_disconnect.sh test to include an example of
transport_id failover for an NVMe-oF controller.

Change-Id: I746ed737ab56c7dec6ee99e840c631ba46ee359e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472230
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 23:46:39 +00:00
Seth Howell
ecd108eb4b examples/nvme: add a reconnect example.
This is simply a dumbed down version of perf so that we don't add extra
functionality to perf that might impact its performance.

Change-Id: Ia2716a61abcc5269dafcda394d40517d156fdb2a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471661
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>
2019-10-24 17:36:31 +00:00
Konrad Sztyber
7135856e6d examples/vmd/led: LED management app
Added application allowing for probing and changing the state of the
LEDs of the devices behind the VMD.

Change-Id: I6c513c556d8e3de8ecf9b5783d7c66ac3b9c6a71
Signed-off-by: orden smith <orden.e.smith@intel.com>
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470652
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-24 17:04:04 +00:00
Konrad Sztyber
4f011ef7c3 examples/lsvmd: list VMD devices
This example application only enumerated VMD devices but didn't do
anything else.  Now it goes over all PCI devices and prints those behind
the VMD.

Change-Id: I6134088e820a90c203200294540cb8174b1a492e
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471480
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
2019-10-24 17:04:04 +00:00
Konrad Sztyber
2872e958c2 examples/lsvmd: added debug switch
Added -d flag to lsvmd enabling debug logs from libvmd.

Change-Id: I1a9e87341b51082d815a25880f05b951a78e456b
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470647
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-08 15:47:34 +00:00
Ziye Yang
f76d16efe7 nvme/perf: enable the trace for nvme perf
The puprose is to print some trace info. We support
it in nvme identitfy. Also -L is occupied by other usage,
so we use -T instead.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I29f018c2a5951e5e3aad04dbeaa7ee74a2d7e3f4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469919
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
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>
2019-10-02 15:35:59 +00:00
Seth Howell
de1f019edf nvme/perf: remove unused variable.
Change-Id: I3a1d237b7a7a25511d476d7612221537bf283ddd
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469633
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-09-27 07:42:44 +00:00
Jim Harris
dc6c3e08fb examples/sock: make hello_sock leverage net subsystem
hello_sock was taking responsibility for initializing
the net framework by calling spdk_net_framework_init
directly.  But since this application is already
using the spdk app framework, it's much easier to
just link in the event_net and net libraries which
will activate the "net" subsystem automatically.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I08af9d088980106cbb5fb22878be59da77b0520c

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466953
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-26 15:22:21 +00:00
Jim Harris
e8ecfe1711 examples/sock: remove default conf filename from hello_sock
This is not used anywhere.  If someone has a reason to specify
something via a config file in the future, they can use the
standard spdk_app command line arguments to do so.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I49126b2ebaf1a4b20b55e29d4958001380f3c99a

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466952
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-26 15:22:21 +00:00
Shuhei Matsumoto
8253ed5e31 nvme/perf: Fix the wrong block size when metadata size is 8 bytes and PRACT is set
When PRACT is set, if metadata size is 8 bytes, PI is stripped
(read) or inserted (write). Hence block size must not include
metadata size for extended LBA payload. This patch fixes the issue
by reducing metadata size from block size for this case.

On the other hand, When PRACT is set, if metadata size is larger
than 8 bytes, PI is passed (read) or replaced (write). So block
size is not necessary to change for this case.

The wrong block size didn't cause any visible issue but should be fixed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3351e3e3b7816f726752e85604cf557251d9870c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468018
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-17 19:41:32 +00:00
Shuhei Matsumoto
062a5503ae nvme/perf: Use g_metacfg_pract_flag to bring PRACT setting
g_metacfg_prchk_flags had been used to pring PRACT setting. This
didn't cause any issue but will lead to misread.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2f6c48b12ffa511afa2663d31dc9467cec980c9c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468017
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-17 19:41:32 +00:00
Shuhei Matsumoto
a766dd00f4 nvme/fio_plugin: Fix the issue that PRACT doesn't work when metadata size is 8 bytes
When PRACT is set, if metadata size is 8 bytes, PI is stripped
(read) or inserted (write). Hence block size must not include
metadata size for extended LBA payload. This patch fixes the issue
by reducing metadata size from block size for this case.

On the other hand, When PRACT is set, if metadata size is larger
than 8 bytes, PI is passed (read) or replaced (write). So block
size is not necessary to change for this case.

Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I930c8a07519a4742c44240801b068fac2c4802a7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465708
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-17 19:41:32 +00:00
Shuhei Matsumoto
cc539da903 nvme/fio_plugin: Fix the issue that PRACT is not set in NVMe command
If PRACT is enabled, DIF context was not initialized. However it was
expected that PRACT is passed through DIF flags of the DIF context.
Hence PRACT was not set in NVMe command even if user set PRACT.

This patch fixes the issue by passing fio_qpair->io_flags instead
of dif_ctx->dif_flags.

Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibcb74fc8f74f863d8b53d53484fdea66f4b5db8e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468016
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: James Bergsten <jrb@thebergstens.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-16 05:28:10 +00:00
Shuhei Matsumoto
e97148d5dd nvme/fio_plugin: Fix the issue that DIF context is initialized only for write I/O
DIF context has to be initialized both for read and write I/O. However,
it had been initialized only for write I/O unintentionally after
refining error processing.

This patch fixes the issue.

Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I363da40ddba186e52fd0dfce37cfb0dea325040d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468015
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: James Bergsten <jrb@thebergstens.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-16 05:28:10 +00:00
Changpeng Liu
2a65e28e56 examples/nvme/identify: display Arbitration Burst for round robin arbitration
Arbitration Burst is valid for both round robin and weighted round robin
arbitration.

Change-Id: I0046194ef510bf255ac0527bc6b1d2dc0648b7cb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466686
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-09 01:55:18 +00:00
Jim Harris
89bdba564a nvme/identify: clarify total and active namespaces
As SSDs with namespace management become more prevalant,
improve the identify utility to clarify things like the
total number of namespaces, and that data is printed out
for active namespaces only.

While here, change an active namespace check to an
assert.  The print_namespace() function is only
called for active namespaces, so the check and print
was a bit confusing since it is never seen with SSDs
with inactive namespaces.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib21772579b94c5bcd1c518adb9d3341f4bf824f6

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466818
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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>
2019-09-09 01:30:51 +00:00
Jim Harris
760ecb0a6f nvme/hello_world: don't print message for inactive namespaces
Some SSDs have inactive namespaces under normal circumstances,
especially those that support namespace management.  Printing
error messages for these can be confusing to users.  So just
remove that log message.

This removes the only usage of cdata in register_ns().  But
that cdata assignment was prefaced with a useful comment for
readers of this example code.  So move that comment to
attach_cb() and restructure the code there a little bit.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I844e860ea0856d73ca535b6fcbd14279b96da4f1

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466797
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tom Nabarro <tom.nabarro@intel.com>
2019-08-30 03:01:01 +00:00
Jim Harris
d71cfefcba Revert "example/perf: remove libaio from perf example"
perf is under the examples directory, but it's much more than
an example application and probably needs to be moved.  We use
the libaio functionality extensively as part of benchmarking
and comparing the SPDK driver with the kernel driver.  So we
need to keep this functionality.

This reverts commit b3d9ebae21.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifb9a1df919d32a98c328101029cc22e91915a976
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466795
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-08-30 03:01:01 +00:00
Tomasz Zawadzki
02aa7d925b example/fio: call subsystem initialization directly
spdk_subsystem_init() no longer depends on spdk_event
or app.c part of the event framework.

This makes it possible to directly call subsystem
initialization, instead of invoking each used library.

Change-Id: I53550850d54e2397e2719fdeb559ed50aa81e704
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464177
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-08-28 15:26:12 +00:00
Chunyang Hui
0fae4f64c4 Opal: Add support for erase locking range
Change-Id: Ie40ea642bc266f84ad5a3dbad8012b9eac178360
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465244
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-08-20 20:38:54 +00:00
Changpeng Liu
87b7f28695 examples/nvme/perf: enable no_shn_notification option
Users can use '-N' option to disable shutdown notification
for faster shutdown process.

Change-Id: I227dc4da3aa2f89d23f9b235e979cb6d3e25d635
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463950
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-08-13 22:50:03 +00:00
John Kariuki
4c77b0059a doc/fio_plugin: remove fio version 3.3 reference
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Change-Id: I717084b7c08a10b8fd88cf2cdb1863ea4782dc7f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463942
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-08-07 12:36:45 +00:00
Changpeng Liu
5a8033a5f3 examples/nvme/arbitration: only do the arbitration get/set_features for supported controllers
Change-Id: Ia34564688bdc0dca95d337519b80ef92ef90239d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463488
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-08-02 00:10:10 +00:00
Changpeng Liu
b97aa6dace examples/nvme/arbitration: clear old global feature valid flag for new command
In case the previous controller already initialize the valid flag to TRUE.

Change-Id: I2896e5a8bd2bca6c0d67bba412b859e96f73d28f
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463487
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-08-02 00:10:10 +00:00
Changpeng Liu
3630f4774d examples/nvme/arbitration: resize global features variable
Only SPDK_NVME_FEAT_ARBITRATION feature bit was used.

Change-Id: Ic81ae6d63716d648aee13dc656ff4172deaba898
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463486
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-08-02 00:10:10 +00:00
Changpeng Liu
14d2324805 examples/nvme/identify: only print arbitration information if the drive can support WRR arbitration
Some drives can return get features with Arbitration feature ID successfully even
the drive can't support this feature, so we will not print this information for
the drives which can't support this feature.

Change-Id: Ife8a40120de7adcacd99d8513cfbcae1c15330dd
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463481
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-29 17:52:45 +00:00
Changpeng Liu
0d9279c596 examples/nvme/identify: set features valid flag to false before getting new value
features are global variable and can be used for different controllers, e.g: there
are 2 controllers, the first one can support Arbitration feature, and the second
controller can't support Arbitration feature, the value from features[fid].valid
may contain the first drive's old value.

Change-Id: If020a0413a8a32e2be25ecccb5baf0a82d99371b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463480
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-29 17:52:45 +00:00
Tomasz Zawadzki
b3d9ebae21 example/perf: remove libaio from perf example
Original intention most likely was to compare nvme lib to
aio, but since then aio bdev was developed.

There should be no need to keep the support for AIO in
perf example app.

Change-Id: I716f2164b8eaef16db05b4fffa35393c7d916e0b
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461593
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-07-23 00:13:35 +00:00
Chunyang Hui
07f432641a opal: Fix memory leakage
Change-Id: I37f1468a41d568f7313143f0270f854f73bc4000
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461560
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-22 04:32:59 +00:00
Chunyang Hui
defe09d3ef nvme_manage: clean for opal command input and output
Change-Id: Ifb927f9537991e6987be22fd644937258b301f7c
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461179
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-22 04:32:59 +00:00
Chunyang Hui
8522624d03 opal: Add multiuser support
Admin can enable user and add user to locking range.
Then the user can lock/unlock his range.

Change-Id: Ifc5a8cf5c6b5febeb59c86333981f0cf5b938500
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460891
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-22 04:32:59 +00:00
Chunyang Hui
63133871d2 opal: Set terminal attribute for secure input
Previously we use getpass. But it looks like this
is obsolete, this patch is to fix this.

Change-Id: If3b667cea8e09aab170bfdb75b8d51e6855bb0b0
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461151
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-22 04:32:59 +00:00
Tomasz Zawadzki
a2664e7491 example/nvme_manage: change ranges to correct type on scanf()
scanf format specification '%ld' expects type 'long int *' for 'd',
but parameter 2 had a different type 'uint64_t*'.
Changed to SCNu64 to reflect the type for range_length and range_start.

Change-Id: I1637b2f7e982a33b45bc765a3e16f7f1302d84cb
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462481
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-07-19 01:34:28 +00:00
Tomasz Zawadzki
45dd91af39 example/perf: remove unused HAVE_URING CFLAG
This patch removes HAVE_URING CFLAG that was unused by
the perf.c

Change-Id: I8af85324db147989e0d3b9bd48faa9587c23be06
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461592
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-17 05:09:16 +00:00
James Bergsten
5acf617c6e nvme: add functions to pretty-print commands and completions
This change attempts to address the Trello request to decode I/O errors in
NVMe hello_world example.

See https://trello.com/c/MzJJw7hM/2-decode-io-errors-in-nvme-helloworld-example

As part of this change, spdk_nvme_cpl_get_status_string was declared
in nvme.h, and spdk_nvme_qpair_print_command and
spdk_nvme_qpair_print_completion were renamed and added to nvme.h,
allowing all three to used "externally."

To test the failing paths, two compile time defines were added to force a
write or read error (bad LBA) respectively.

As the example does a read after write, if the write fails, the example fails.

Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Change-Id: Ib94b4a02495eb40966e3f49517a5bdf64485538a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457076
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-15 07:47:03 +00:00
Changpeng Liu
3b279697ca nvme/fio_plugin: optimize metadata buffer usage
Fio will allocate metadata buffers for each request, even the NVMe namespace
wasn't formatted to separate metadata, it's not an error to set the metadata
pointer to NVMe command, but still it's better to set it with real cases.

Change-Id: I1d29b6be65cfa6ba1c20d31906bcee5e8e2decf8
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461349
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-15 03:43:45 +00:00
Konrad Sztyber
02f147567c identify: print metadata type regardless of PI type
Print the type of metadata (extended LBA / separate buffer), even if
protection information is disabled. Changed the way protection
information's location is reported to be more accurate (previous
"Metadata Location" wasn't precise enough). Aligned all of the namespace
information fields, so that all values start from the same column.

Change-Id: Ia736db233cbcfdddcfd4a1437907e528f2b8947b
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459623
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-07-12 12:39:38 +00:00
Chunyang Hui
fbd2f3fd2e opal: add support for getting locking range info
Change-Id: I8e3e39673c260f823a9703e86006b5334dedc987
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457576
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-05 02:23:28 +00:00
Chunyang Hui
505dbf59ff Opal: Add locking range support
Change-Id: I4974d4134aed3b63e204b79c9292ce940e32d40c
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455175
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-05 02:23:28 +00:00
Chunyang Hui
755b4390f9 Opal: Add activate locking SP method
Change-Id: I4189bdefdb5a6651bb73bd32e61c16e899b2ae5a
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454211
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-07-05 02:23:28 +00:00
Ziye Yang
b09bd95ad3 sock: update spdk_sock_group_add_sock
And also add spdk_sock_group_get_ctx function

Change-Id: I2a2a58b0588ff7d99d3538ea0a633a3b8c7a234b
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454538
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2019-07-04 08:21:05 +00:00
Chunyang Hui
5228002c13 nvme_manage: Use getpass for secret input
Change-Id: Ie13f3d4284971fc832a45df2c5bc474d746fb530
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459956
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-07-02 08:33:40 +00:00
Wojciech Malikowski
9822f60293 examples/bdev/hello_world: Optional VMD enumeration
VMD section with Enable flag set to true
need to be defined in config file to
enumerate devices behind VMD.

Change-Id: I8d1ef23768ee9c643c6b0f2f10eaf2c54eee8d71
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459767
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-01 03:53:06 +00:00
Wojciech Malikowski
d8ad0a98bb examples/blob: Optional VMD enumeration
VMD section with Enable flag set to true
need to be defined in config file to
enumerate devices behind VMD.

Change-Id: I814b0a34f87f9e063ded40e1dfb801a2c5fbe4af
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459766
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-01 03:53:06 +00:00
Chunyang Hui
7bf3ac17f7 Opal: close dev in nvme_manage
free resources when error was triggered in nvme_manage

Change-Id: Ibdc020ffb5abd3d614fe85e54788b1818ef5af1e
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458342
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-24 13:13:30 +00:00
JinYu
5446c541d3 examples/nvme: fix memory leaks of arbitration case
The ns_ctxs of worker_thread are organised as a list, so they
should be freed totally.

Change-Id: I348cacb12c338dfe0df100e1dc3de7b9f95bfda1
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458036
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-19 03:48:16 +00:00
Tomasz Zawadzki
9b96749f66 fio_plugin: Use CLOCK_MONOTONIC for FreeBSD
In order for fio_plugin to compile a replacement is needed
for CLOCK_MONOTONIC_RAW, since FreeBSD does not support it.
In that case CLOCK_MONOTONIC is used.

Change-Id: I234ce4d932baf9c5399a46f9f4676315351e720c
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458072
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-06-19 03:39:04 +00:00
Wojciech Malikowski
cda27398e5 examples/nvme/hello_world: Optional VMD enumeration
New flag -V was added for VMD enabling.

Change-Id: I2d090a70b9d9b2bd996467a9b3da908f6eed1062
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457601
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-18 03:59:36 +00:00
Wojciech Malikowski
de6a68e031 examples/nvme/fio_plugin: Init VMD during spdk_fio_setup()
Try to enumerate VMD devices in fio_plugin.
New flag enable_vmd was added to fio config.

Change-Id: I5546665719e4ef2b169d403db8bf0398e834dbc4
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456992
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-18 03:59:36 +00:00
Wojciech Malikowski
8b29e8bc7f examples/nvme/identify: Optional VMD enumeration
New flag -V was added for VMD enabling.

Change-Id: I0a31994acd5fd677366e8d5e49ad9a3583670c2c
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456967
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-18 03:59:36 +00:00
Wojciech Malikowski
9d92b9d420 examples/nvme/perf: Optional VMD enumeration
New flag -V was added for VMD enabling.

Change-Id: Ie0feae1bdfce39ad246f57411d00587c6417d21d
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450926
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-18 03:59:36 +00:00
Shuhei Matsumoto
73204fe2e5 dif: Add data offset to DIF context separately from start block address
Data offset are intended to correspond to DATAO in NVMe/TCP and
Buffer Offset in iSCSI.

Previously for iSCSI, buffer offset had been merged to start block
address, but passing buffer offset separately from start block address
clarifies the logic more.

On the other hand, for NVMe/TCP, passing DATAO separately from start
block address will be critically important because DATAO will bave any
alignment and will be necessary to use for not only reference tag
but also guard computation.

This patch adds data_offset to struct spdk_dif_ctx and adds it to the
parameters of spdk_dif_ctx_init(). ref_tag_offset is also added to struct
spdk_dif_ctx and it is computed by dividing data_offset by data_block_size
and is used to compute reference tag.

The next patch will use this change when getting DIF context in SCSI.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id0e12ca9b1dc75d0589787520feb0c2ee0f844a5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457540
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-11 18:53:58 +00:00
Wojciech Malikowski
ef084d199e lib/vmd: Hooking devices behind VMD endpoint to PCI subsystem
Create PCI hook for each detected PCI device
behind VMD endpoint.

Change-Id: I0bec674b859b02e5338eb407dc6c5f83cf1e8978
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Signed-off-by: Orden Smith <orden.e.smith@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456632
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-06-11 04:35:31 +00:00
Wojciech Malikowski
4a3d5418c5 lib/vmd: Replace spdk_vmd_probe(bdf) with spdk_vmd_init()
spdk_vmd_init() will attach all VMD devices that were
unbinded from system. There is not need to specify VMD
bdf in VMD public interface since it can be controlled
by setup.sh script.

Change-Id: Ifc45c32dc7e11b59429a41ddfdd596db30e27731
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456631
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-11 04:35:31 +00:00
Wojciech Malikowski
fa64709373 examples/vmd: VMD device usage example
This example enumarates NVMe disks behind VMD.

Change-Id: I2e38aa3b3b73db1cc3b3bc79128071800cbf5fa9
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Signed-off-by: Orden Smith <orden.e.smith@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455829
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-11 04:35:31 +00:00
Chunyang Hui
9f988238fc Opal: Refactor and clean functions
Delete opal_next, introduce opal_add_tokens.
Delete spdk_opal_cmd, seperate cmds to new APIs.

Change-Id: Ide56817eec7fde7b110818966ebf10e65a952fc9
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454433
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-06-11 01:12:24 +00:00
Tomasz Zawadzki
37b5912545 fio_plugin: fix io completion queue leak in nvme plugin
fio_thread->iocq allocated on line 403 was leaked when
fio finished its run.

Change-Id: I740dcaa1e0037283d099ddf4bc125cec57cfdbcc
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456623
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-06-06 05:17:16 +00:00
Jim Harris
66514a0042 nvme/perf: mark task_complete as inline
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9d1f376f3f0629413c74cbf35fd49c668174e8fe

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456269
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-03 03:11:08 +00:00
Jim Harris
ce31ec390b nvme/perf: add some spdk_unlikely calls in the I/O path
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibc289905ea8d00146b50e7697c49b0670ef6102a

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456250
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-30 23:09:16 +00:00
Jim Harris
2632229b9d nvme/perf: only call verify_io when md_size > 0
verify_io is a function pointer, so avoiding the
call altogether is beneficial.  We know that no
verification is possible if md_size == 0, so use
this to determine if the call should be made.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I75f01e4f56aacb0f7babd2342efc6014f886667d

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456249
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-30 23:09:16 +00:00
Jim Harris
e68ea1cebe nvme: explicitly inline submit_single_io
The compiler wasn't always inlining this.  Inlining
results in a small optimization.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I34240d85439b7329fab7151ae4f8b02f44c4d7d5

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456248
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-30 23:09:16 +00:00
subash.rajaa
aeebea7e0d examples/hello_bdev: fail if configfile not provided
The hello_bdev example does not work without configfile, hence
displaying appropriate error when config file is not specified

Change-Id: I1f00f27674a29b6e8c0a9222589ad1d631693111
Signed-off-by: subash.rajaa <subash.rajaa@iophysics.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456326
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-30 22:01:23 +00:00
Jim Harris
7dcd9c8d37 nvme/perf: adjust column width based on name length
Now that we print the addr/nqn for fabrics controllers,
adjust the column width in the output so that it prints
the full information for fabrics, but keeping a smaller
width when it is only PCIE controllers.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3532a8928a806b8084047f6686c37cd02d015983

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456079
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-29 20:27:10 +00:00
Jim Harris
71400dd3ee nvme/perf: show transport id instead of serial number
The serial number doesn't provide much value - but the
transport id can sometimes be helpful though to correlate
performance of different devices to their PCI BDF.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I529f111311108a6efc1ba23129963bb4383d3bdd

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456078
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-29 20:27:10 +00:00
Jim Harris
96f0e3f889 nvme/perf: create helper function to build names
These are the names displayed in the output.  Some
upcoming patches will modify these names, so making
this a common function now will reduce the work
later.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I11cb8f607a66523becdcf621d8d6c911aec4427d

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456077
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-05-29 20:27:10 +00:00
Jim Harris
a9b174e71e build: fix duplicate spdk.common.mk includes
mk/nvme.libtest.mk includes mk/spdk.common.mk, but all
of the Makefiles including mk/nvme.libtest.mk were
also including mk/spdk.common.mk unnecessarily.  So
remove the spdk.common.mk include from all of the
offending Makefiles.

This was relatively harmless, although it would cause
weird things like CFLAGS and LDFLAGS getting duplicated
when building.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie60637db3c19a2ead097562b2adf6573dbe27472

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455321
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-22 14:51:01 +00:00
Jim Harris
9018dd60c6 examples: rename ioat perf tool to ioat_perf
This avoids conflict with the nvme perf tool.  PGO
gets confused during building - we may have data for
nvme/perf which it then tries to use when building
ioat/perf.  Renaming the ioat perf tool fixes that
problem.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib1084d56d671e44027ea05f453075a723f067580

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455320
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-22 14:51:01 +00:00
Ben Walker
e036215fe9 thread: Add a mechanism to exit a lightweight thread
Lightweight threads may now be exited by calling
spdk_thread_exit() within the thread. The framework
polling the thread can release the resources associated
with that lightweight thread by calling
spdk_thread_destroy().

Change-Id: I6586b9d22556b3874fb113ce5402c6b1f371786e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455319
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-22 04:23:17 +00:00
Piotr Pelplinski
c4d9daeb7b Makefile: Add possibility to uninstall spdk.
Add uninstall target to makefiles to be able to perform
reverse of install target.
Fixes #464

This patch adds 'uninstall' target to makefile.
'make uninstall' will remove spdk_tgt app, headers, libraries
and shared libraries from system directories defined by $DESTDIR.
Additionaly, if there will be any empty directories left after
this operation, they will be removed as well.

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I7b07fb4b81081d3914ff09165991fbe3a26b9067
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/431471
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>
2019-05-16 20:56:18 +00:00
Chunyang Hui
6b48e743a3 Opal: Add revert tper cmd option
Reset the device to its factory defaults.

Change-Id: I43f7dc8fb7bd5226283a4762beac0e2cf016f698
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445253
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>
2019-04-25 18:20:42 +00:00
Tomasz Zawadzki
8bab99fb6e nvme_manage: assert ns not being NULL when displaying namespaces
Assert that spdk_nvme_ctrlr_get_ns() does not return NULL.
If display_namespace() would proceed with ns == NULL,
functions below will segfault since the input is not verified there.

Change-Id: I12c4b617aca703f07275fbc6ab593b42c25e2ccd
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451830
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-25 14:34:53 +00:00
Chunyang Hui
7250ec64db Opal: add take ownership cmd options
Also make some modification for invoking process in
nvme_manage tool.

Change-Id: Ib54db43d7336d3e839e7d9317c292b9a57b38f80
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445059
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>
2019-04-24 22:40:04 +00:00
Ben Walker
5d0b5e2ce9 thread: Add cpumask parameter to spdk_thread_create
Allow users to optionally specify an affinity mask when
creating a thread. This isn't currently used, but we want
the API to be in its final form for the next release.

Change-Id: I7bd05e921ece6d8d5f61775bd14286f6a58f267f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451683
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>
2019-04-23 20:22:55 +00:00
Liang Yan
2210eaa9ca examples/nvme/perf: use MiB/s to show bandwidth data
The perf tool's bandwidth data is MiB/s, not MB/s.
So update the data description part.

Change-Id: I770cc0d7c0f0a4d56cb4eff593e88fbed55e3ed6
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451319
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-19 20:15:55 +00:00
Seth Howell
2cc6b0dfcb rdma: set the number of wr sge_entries per I/O
This was not being properly set in the multi-sgl path.
Also add a verification step to the fio configuration file to prevent
against future regressions.

Change-Id: I510b6acd92bc2fbc9b6fbec1d59945cc53584ad3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450305
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-19 17:29:45 +00:00
Hui, Chunyang
55f5b205c5 Opal: Add Opal library
First submission. Implemented part of the Opal library
and "scan" function. Can be invoked by nvme_manage.

Change-Id: Iba86d86dd3af06a06b6805120ee5005af8183459
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/439335
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-08 17:04:25 +00:00
Seth Howell
aeb3dc9d2e hello_bdev: remove passthru section from conf file.
by removing the passthru stuff from the conf file, we create a more
dramatic effect when we add in the passthru bdev during the labs.

Change-Id: I0a0ed101dd4135d8b2774cdd0850ca3bf2e43d01
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450187
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-08 15:54:07 +00:00
Seth Howell
0a1103c41c hello_bdev: remove hardcoded config file.
I think it's simpler to just have people pass in the path of the conf
file during the lab. right now in the lab, if people try to run this
script from any othe rdirectory but hello_world, it throws errors and
can through people off during labs.

Change-Id: I74fc9bd311d4fdc9e8676cfa938d32b48fdece39
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450186
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-04-08 15:54:07 +00:00
Jim Harris
1a2de82456 examples/hello_blob: use io_unit_size instead of page_size
Blobstore now supports 512B reads/writes to blobs, if the
backing device is formatted for 512B LBAs.  The hello_blob
example app was never updated to account for this - so when
running against a backing device with 512B LBAs, it would
fail since it was only reading/writing 1 blob io_unit (512B)
but was comparing a page size (4KB).

Clean up a typo too while we're here.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6cfeeff1c160a24d4c10b68b9dd93717ed79f212

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450069
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-04-04 01:10:14 +00:00
Seth Howell
47fca7c7e8 fio_plugin: add support for mocking SGL entries
FIO is going to always present a contiguous buffer to us. But we can
fake out the nvme driver with a couple of global variables.

Change-Id: I038e70582043e1d7c1800ed065fe126aa091c290
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/439608
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-02 23:26:08 +00:00
Changpeng Liu
4cfd17a7ce examples/nvme: hot added drive cannot be attached
When test hotplug, the timeout callback will set the attach callback
to NULL, so it will not add the drive back to hotplug tool automatically
sometimes.

Change-Id: I91a7c29059a7f680b2a0b7b79cf0a62c5638dcda
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449519
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>
2019-04-02 00:03:40 +00:00
Darek Stojaczyk
27a23a33f9 blobfs: switch to spdk_*malloc()
spdk_dma_*malloc() is about to be deprecated.

Change-Id: Ib9fb94463a69ffd9660ab2c7fbe02826a7e06741
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449796
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>
2019-04-02 00:02:58 +00:00
Piotr Pelplinski
de5f53220c notify: add notification library
This patch adds library that will provide ability to notify about
events. On one side each spdk library can specify what kind of
notification it can produce and on the other side libraries can fetch
those notifications.

Example is bdev module, which lib notify about added or removed bdev.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Change-Id: Ia95e564a8a43400b2745d9de8217b9cc84cd1b16
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/431920
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-03-29 21:15:14 +00:00
Jim Harris
a0070df9f8 nvme/perf: add -G flag to enable debug logging
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I717b738c50ea7b22eb90c6b764a4768a71208990

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449338
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-03-29 02:35:48 +00:00
Ben Walker
2fd1b7a7f1 perf: Add option to create unused io queue pairs
For some testing, we need queue pairs to exist but not actually
be in use.

Change-Id: I2b17ff0172c9ec002692babcf7d4d612c3062eb4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/392977
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: Changpeng Liu <changpeng.liu@intel.com>
2019-03-22 02:00:20 +00:00
Ben Walker
8165bf7125 build: Add support for linking to liburing
liburing is a wrapper around a new Linux kernel interface for
submitting I/O using user space rings. This patch simply
adds the ability to link the nvme perf tool to liburing, but
doesn't implement any of the new functionality yet.

Change-Id: Idb741c87b6d951c013af86e30eac18d3834dd4b7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/444711
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>
2019-03-19 20:59:19 +00:00
Ben Walker
9e5075a785 perf: Allow the user to specify the number of queues
Queues will be doled out to cores as available.

Change-Id: Ib6a0fe846a9d90b659754be1c11ae022abbe38a3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/391876
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-19 18:13:31 +00:00
Ben Walker
deb8ee5c33 event: spdk_app_start now takes spdk_msg_fn
This callback type takes 1 argument instead of 2.

Change-Id: Ic3710fafb2828f08fc064f7658849b3d20521092
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446997
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>
2019-03-19 15:54:34 +00:00
Ben Walker
b3fc4e7b4b nvme/identify: Report all atomicity values
New per-namespace values were added.

Change-Id: I2d2bf76ea7944187e4a393111722e85c79e47240
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446323
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>
2019-03-19 15:51:05 +00:00
Ben Walker
f80368bbce nvme/perf: Use delay_doorbell queue pair option
This tool continually polls for completions, so it
is safe to turn this on.

Change-Id: Ice1c68cdaff070f8edd428621e19a6fb44fb8c31
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447712
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>
2019-03-19 07:27:44 +00:00
Ben Walker
727d820e59 fio/nvme: Enable delay_doorbell queue pair option
Since fio is continually polling for completions, this
option can be safely enabled.

Change-Id: I02ee3d2507d3b37f79e14d69fe90ee19c4b4eea2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447711
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>
2019-03-19 07:27:44 +00:00
Changpeng Liu
8e4d6b3d0d fio_plugin: remove metadata location limitation when doing PI
Change-Id: Ibdf833c6f6de30efa1599d35b4977149441b368a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446824
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>
2019-03-14 19:30:53 +00:00
Changpeng Liu
92ff5e0b12 fio_plugin: export apptag and apptag mask to users
Existing fio plugin tool uses hardcoded application
tag and application tag mask for end-to-end data
protection, we export the two options to users
now.

Change-Id: I64d89c29e99030ce8daa2947e73d941b73ac4a8e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446384
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>
2019-03-13 17:22:45 +00:00
Changpeng Liu
b5853777fe fio_plugin: enable separate metadata(DIX) support
Existing APIs used in the fio plugin tool already
contain the separate metadata parameter, so we just
need to allocate a separate metadata buffer for each
request, by default, each request will have 4096
metadata buffer size when PI enabled with separate
metadata, but also providing an option here to let
users can input bigger value in case one request
will need larger metadata buffer size.

Change-Id: I51679c5cb7f7b1599b81287b1fbb8d9be7959191
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446375
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-03-13 17:22:45 +00:00
Changpeng Liu
5a051a6c1b fio_plugin: don't submit the IO if got DIF context error
Also set the errno for submitting and verification path.

Change-Id: I97e94eb3c63167eed2f0b14fa7b79c42add834a1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447558
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>
2019-03-12 19:37:39 +00:00
Chunyang Hui
aa09ce098d nvme_manage: Fix a bug of uninitialized namespace
Uninitialized namespace struct will be all zeros.
Some drive might have multiple namespaces but not initialized.
nvme_manage will get to segment fault when this happens. This
patch is to fix this.

Change-Id: I8ea5bf3d7c29cf876fbea3d1bee22b95748d3b8a
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447414
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-08 20:59:51 +00:00
Changpeng Liu
030fb5e2bb fio_plugin: fix the wrong usage of queue pair data structure in fio thread
If multiple numjobs and filename were used in fio tests, one thread may
have a list of queue pairs, so we should store the queue pair when
submitting a new request.

Change-Id: I585cd40ea4295b94c8766f9adfa5a7344cb0bc3c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447272
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-03-08 04:34:22 +00:00
Ben Walker
362879570a event: Remove arg2 from spdk_app_start()
We never used this anywhere, and I need to move to a model where
the start up action is a thread message instead

Change-Id: I6b21ba9afb93a3245aceca2fe24713ffd16d0933
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446986
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-03-05 08:43:12 +00:00
Tomasz Zawadzki
154eb3399a thread: add spdk_thread_is_idle()
This function add possibility to check if there are any scheduled operations
on particular thread.

Return from spdk_thread_poll() will be used as a way to load-balance and
signify if any work was performed during the single iteration.
A poller could return 0, but still be registered.

This helps especially in fio_plugin that only checked active_pollers or
messages via spdk_thread_poll().

Change-Id: Id6237278eb3b4bd4922b2abaa3c8ebd5e434d45d
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/445915
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-03-01 21:38:02 +00:00
JinYu
885bc99596 nvme/hotplug: add ctrlr a timeout callback in hotplug example
The example would endlessly loop in unregister_dev()->spdk_nvme_
ctrlr_free_io_qpair(), if the device has been removed after leave
hotplug monitoring. Add the timeout callback to handle this corner
case. The case will not be friendly to newcomers, if we use the event
framework to update it, because the hotplug has been hidden in frame
work.

Change-Id: I33a81efd356fdf1e7921f5721e9d95936470e8b0
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439822
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>
2019-02-25 23:12:29 +00:00
Chunyang Hui
53d446c8a3 nvme/identify: add rpmb feature detection
Change-Id: Ib3d52108c5deb209828fe02caaa9f5f968c91d36
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/445638
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>
2019-02-25 22:36:00 +00:00
Shuhei Matsumoto
8696cd4288 dif: Add seed value for guard to avoid 0 in case of all zero data.
Allow user to add seed value for guard compuation to DIF context.
This will avoid the guard being zero in case of all zero data.

NVMe controller doesn't support seed value for guard computation
explicitly, and hence if we want to use such a seed value in
NVMe controller, we have to format metadata more than 8 byte,
and add seed value into the reserved metadata field.

But some popular iSCSI/FC HBAs and SAS controllers have supported
seed value for guard computation, and so supporting seed value
in the SPDK DIF library is very helpful for some use cases.

Hence this patch makes the DIF library possible to specify seed
value for those use cases.

Change-Id: I7e9e87cb441bf263e64605c7820409fdc22dd977
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/444334
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: wuzhouhui <wuzhouhui@kingsoft.com>
2019-02-22 17:52:51 +00:00
Jim Harris
5ec6b08eb0 ioat/perf: allow queue depths > 256
Currently the task and buffer pools are hardcoded to
512 each.  This effectively limits the queue depth
per channel to 256 since we need both source and
destination buffers from the buffer pool.  So make
the pool sizes dynamic based on the user's queue depth
input.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I52f04308c0329fa99277746a0768eb1214e37a8e

Reviewed-on: https://review.gerrithub.io/c/445357
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-02-20 16:41:46 +00:00
Jim Harris
6728c1b8cb ioat/perf: use new spdk_ioat_flush interface
Use the new spdk_ioat_flush interface to batch
doorbell writes - this significantly improves
descriptor throughput.  For now, just set the
threshold for writing the descriptor to half of
the queue depth.  We can always modify this later
to allow very specific thresholds, but for now
this simple change is sufficient.

Increases 512B descriptor throughput at QD=256 from
3.7M/s to 14.0M/s on my Skylake Xeon server.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4504579e23cee5b6a1044849c49d33d58bdb51a9

Reviewed-on: https://review.gerrithub.io/c/445355
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-02-20 16:41:46 +00:00
JinYu
c3da46d5f3 nvme/perf: Add keep alive timeout option
Change-Id: I5f2db53cb3360428d9c9c10d7c9fe8566919ee69
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/441992
Tested-by: SPDK CI Jenkins <sys_sgci@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>
2019-02-15 22:03:35 +00:00
Ben Walker
9810431431 thread: Allow for an extra region of memory allocated on each thread
Schedulers can use this region to store required information.

Change-Id: I93efb44f1a534596f6285bbe014579311fe011e7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/444454
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-02-14 14:58:56 +00:00
Ziye Yang
a1c2b2d0a5 nvme/perf: fix the execption case for NVMe qpair polling.
If do not do that, we will continue polling. And checked
the exceptional handling of aio_check_io, it will just exit.
So we add such case, thus we shall not poll the qpair again.

This is especially useful when we use perf to test against
NVMe-oF target.

Change-Id: Ib820e0b80f80cfceb1ea5e08b359f50d9e360b30
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/444325
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-13 18:23:15 +00:00
Ziye Yang
1b8cbebf1c nvme/perf: fix the core dump issue.
If spdk_nvme_probe fails, there will be no controller,
and we jump to clean up. And the thread is not created,
so we need to judge the value of thread. if it is not zero,
we will do the pthread_cancel. Otherwise, we do not
need to call that. If we call that, it will have coredump.

btw: we also fix an small issue of cleanup.

Change-Id: Iee854f6ef42ef6d4a3d3f63d57740375e293a3ba
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/444147
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-12 18:40:50 +00:00
Ben Walker
8abfb06e31 thread: Optionally allow the current time to be passed to
spdk_thread_poll()

This is an optimization if the calling function already knows the
current time.

Change-Id: I1645e08e7475ba6345a44e0f9d4b297a79f6c3c2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443634
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-02-11 22:58:45 +00:00
Sasha Kotchubievsky
bdc96b4dd6 perf: Fix integer overflow
perf application can't generate IO for NVMe namespace with
 more than 4G size.

 Example of error:
 "Attached to NVMe over Fabrics controller at 1.1.75.1:1023:
 nqn.2016-06.io.spdk.r-dcs75:rd0
 WARNING: controller SPDK bdev Controller (SPDK000DEADBEAF00   ) ns 1 has
 invalid ns size 0 / block size 4096 for I/O size 4096
 WARNING: Some requested NVMe devices were skipped
 No valid NVMe controllers or AIO devices found"

 ns_size variable is uint32_t, spdk_nvme_ns_get_size function
 returns uint64_t. Result can exceed the maximum size of
 uint32_t and ns_size remains 0.

 The issue introduced by commit: f2462909

Change-Id: Idc6dd8688d5d6268bda1a1d6b06a611643af6155
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/443996
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-02-11 19:30:47 +00:00
Shuhei Matsumoto
6e769bec2c fio_plugin: Use the new DIF library in FIO plugin
Apply the new DIF library to DIF generation and verification.

Condition to use DIF generation and verification are changed
only about DIF type. DIF type 3 is supported in this patch.

DIX is not supported in this patch.

The case that PI is located to the first 8 bytes of the metadata
is not supported in this patch too to because how to pass PI location
is not fixed yet. But this limitation will not be critical because
PI is located to the last 8 bytes of the metadata by default.

DIF insertion and strip will be required not to destroy data by
DIF generation. But this is still added in the TODO list even after
this patch.

Change-Id: If08bcaaaa9f4e0fb4f373ef844b88b38cfffc6b5
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/441283
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>
2019-02-11 12:05:13 +00:00
Shuhei Matsumoto
fa92414ce4 fio_plugin: Use the prefix "g_" for global variables throughout
Change-Id: I000a3973ca624bf8d1224f910c3bf0dded9a2e36
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/441280
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-02-11 12:05:13 +00:00
Piotr Pelplinski
7a30221de7 fio_plugin: fix hang in FIO
This is fix for https://github.com/spdk/spdk/issues/523

Fio hangs on pthread_exit(NULL) from spdk thread.
This happens because, pthread_exit tries to dlopen glibc and hangs on
__lll_lock_wait. This patch prevents unmapping of glibc in fio_plugin
and phtread_exit does not need to dlopen it again.

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I5078cc55e24841675d6ef4ecba43879dc3f73a4f

Reviewed-on: https://review.gerrithub.io/c/443912
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-02-11 09:18:26 +00:00
Ben Walker
9ca35dfc83 identify: Print out information about controller memory buffer support
Change-Id: I62c84647e3ae19b3df08c089284043ffebe9081b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442636
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-02-06 16:01:56 +00:00