Commit Graph

599 Commits

Author SHA1 Message Date
Niklas Cassel
3301f8214b examples/nvme/identify: print zone report excerpt for zoned namespaces
If the namespace is a zoned namespace, get and print a zone report.

Since a ZNS drive can have thousands of zones, request a zone report
containing only the first 8 zones.
The code does take a ZNS drive with less than 8 zones into account,
even though such a drive is unlikely to exist in the wild.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I28ecb4d7c60ab5a911d7b1faae595f43ef6706e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4794
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 CI
2020-10-21 12:18:44 +00:00
Shuhei Matsumoto
0a903c91ac examples/nvme: Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async()
Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async() with
a local variable detach_ctx to detach multiple controllers.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I05c504428df56f4ab5d1ffdd19ac81e6c062c89d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4439
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 16:55:55 +00:00
Niklas Cassel
998ec7b094 nvme/hello_world: for zoned namespaces, reset the zone before write
If the namespace is a zoned namespace, reset the zone starting at
LBA 0, before doing the "Hello world!" write to LBA 0.

This is done to ensure that the write pointer for the first zone
is at LBA 0.

We need to do this since a regular write on a zoned namespace
to an LBA that is not equal to the write pointer results in a
Zone Invalid Write I/O error.

Therefore, if we don't do a zone reset before doing the write,
the write would fail if there already were data written to the
first zone. (E.g. if the user ran the hello_world example twice.)

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I0ee972b4cc40bc5ebd476105d0b180a07cfe5a76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4683
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-10-20 12:18:56 +00:00
Changpeng Liu
e3f08eef8c examples/nvme: export DPDK single file descriptor memory segments as input parameter
Similar with existing virtio user driver, we need to enable "--single-file-segments"
option in DPDK as the target only support limited number of memory regions, for
coming vfio-user feature, the requirement is same, so here we enable the option
with identify&perf tools in advance.

Change-Id: I83d78b403a8c1ec0c76a5bf21aac6bed109931c3
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4612
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>
2020-10-16 08:16:50 +00:00
Tomasz Zawadzki
8a76c2484a event/app: allow to enable log flag for release builds
Log flags could also report on SPDK_LOG_INFO level by using
SPDK_INFOLOG() macro. Yet this did not result in additional
log due to check for debug build.

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

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

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib0d6cce33263c350d6d83300d60e7d15bdfe4b64
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4557
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-15 08:23:39 +00:00
Shuhei Matsumoto
47d4ead930 example/nvme_manage: Use foreach_dev() macro for detach
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I00149ca74f5af215e8818d051510f73a61abc4a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4437
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-05 08:27:56 +00:00
Shuhei Matsumoto
db28850a93 example/nvme_perf: Replace next pointer by TAILQ
This will make the object relationship cleaner and the asynchronous
detach operation easier to implement.

Change NVMe perf tool in an independent patch to make review easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie9fe4ba097356a9887fc284bb8019664936f3cca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4432
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-05 08:27:56 +00:00
Shuhei Matsumoto
b218e04c89 example/nvme_fio_plugin: Replace next pointer by TAILQ
This will make the object relationship cleaner and the asynchronous
detach operation easier to implement.

Change FIO plugin in an independent patch to make review easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If89d189e79506726f2d20cebc100f8a8294b9111
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4431
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
2020-10-05 08:27:56 +00:00
Shuhei Matsumoto
4c3fd22850 example/nvme: Replace next pointer by TAILQ except for fio_plugin and perf
This will make the object relationship cleaner and the asynchronous
detach operation easier to implement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5030dc9eb8f607247f08b4524d37ec2b74826a93
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4430
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-05 08:27:56 +00:00
Alexey Marchuk
8614d3fe3a perf: Add cli option to configure default sock impl
Change-Id: I165e6c9287ed576bdf7e34e02c5f27f3052a6456
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4329
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-10-05 08:22:53 +00:00
Alexey Marchuk
3fa5bb25a9 perf: Add cli param to configure IO buffer alignment
Some HW accelerators may benefit from non-standard (512 bytes)
alignemnt.

Change-Id: I13c46e6ddfe400a6fad65497d3e090411bbfd8c0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4215
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-29 09:35:47 +00:00
Alexey Marchuk
37914f3cd6 perf: Add cli params to enable/disable zcopy
Usage:
-z sock_impl_name - disable zcopy
-Z sock_impl_name - enable zcopy

Change-Id: I02b628c63ca6e9e80f81e4571aebdd76fdf90be2
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4214
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-09-29 09:35:47 +00:00
Shuhei Matsumoto
6c6efee89d lib/nvme: Set Add ANA log page to be supported by controller
If ctrlr->cdata.cmic.ana_reporting is 1, set the corresponding
field to true.

Then use its API in the identify application.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4e74bc4c114883e4aecdbee7a6f1a02027db23a5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4156
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-09-14 09:18:35 +00:00
Shuhei Matsumoto
59ad0a04fa examples/nvme_identify: Print ANA config in Identify Control Data Structure
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2416e32007c682aaf314ab45d29fc5b4523031ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3918
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-08-27 08:36:51 +00:00
Changpeng Liu
8bb7511fd9 examples/nvme: don't print CUSTOM transport as unknow trtype
Change-Id: I9f85d2f7f7f2625180b9a530d24a02be5414f593
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3879
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-08-24 07:37:31 +00:00
Alexey Marchuk
09d6e90a9a nvme_perf: Add warmup
Add -a cli parameter to enable warmup stage.
Move ns_ctx statistics-related variable to a new structure
for easier cleanup.

Change-Id: Id536209bc49322f1bc9b5c2296f98f0183b7d4b9
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3784
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-08-20 09:36:03 +00:00
Ziye Yang
c67fb06d51 nvme/perf: Fix the hang issue of nvme perf.
When using nvme perf program to test against NVME-oF target,
the nvme perf program will hang if we kill the NVMe-oF target.

For example, if we run the following command:

1 On the target side, start a SPDK NVMe-oF target;

2 On the initiator side, we run:
./build/examples/perf -r 'trtype:rdma adrfam:IPv4 traddr:192.168.7.55 trsvcid:4420' -q 128
-o 4096 -w randwrite -t 100

3 Then we kill the NVMe-oF target on the target, the nvme perf program
will hang.

For NVMe perf program, I think that we should check it in

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia864394acdb6e705484dd0db6f015b567eb527a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3774
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-19 07:29:26 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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