Commit Graph

400 Commits

Author SHA1 Message Date
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