Commit Graph

5416 Commits

Author SHA1 Message Date
Ben Walker
d733654b5c bdev/nvme: Add a HostNQN parameter to NVMe bdev creation
Change-Id: I3ec1603d1d73f67773fcb7f43d63b1db55d4d6af
Reviewed-on: https://review.gerrithub.io/416055
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-20 22:43:46 +00:00
Ben Walker
b99dd2af4a bdev/nvme: Use spdk_nvme_connect for non-PCI devices
Change-Id: Ibd472e0deda621c4a103b4ddf988e4994181b3c8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/415542
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-20 22:43:46 +00:00
Ben Walker
7d87273f60 nvmf: Reimplement abort handling
Now that the qpairs are stored on the poll groups,
reimplement abort handling to search each one. This
doesn't add new functionality compared to before - it
still only aborts AER commands.

Change-Id: I73651cf412b10f91a14be68bd9b8c03d8f22626e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/415318
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-20 22:07:24 +00:00
Ben Walker
65aa57b007 nvmf: Keep a list of qpairs per poll group
Remove the list of qpairs per controller.

Change-Id: I6aaeed43c64b38b60c5a609123b3542bb7130a90
Reviewed-on: https://review.gerrithub.io/415317
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-20 22:07:24 +00:00
Ben Walker
f80001e2c6 nvmf/rdma: Unset poll group pointer when qpair is removed
Change-Id: I2eb84490144c2e1f772c4094645e5067149d2862
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/415316
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-20 22:07:24 +00:00
Ben Walker
84523c0439 nvmf: Remove abort implementation
This will be re-added later in the series, implemented
in a different way.

Change-Id: I1f9df22025eb37f7f58ce1547862f61906ea557c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/415315
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-20 22:07:24 +00:00
Daniel Verkamp
fdf5c1d7d2 build: add -lcrypto (OpenSSL) to SYS_LIBS
This is already required to build the shared library and iSCSI
components; simplify these Makefiles by adding -lcrypto to the central
SYS_LIBS in mk/spdk.common.mk.

Change-Id: I8fdaffbccc1294e24e32559387b0ed99d1deb0ce
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/415351
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-20 20:16:31 +00:00
John Meneghini
65c48bfb95 test: fix annoying error from hash pdflatex
Change-Id: I28a6882e9806f3d967308bc0370aa3e099fbdcaf
Signed-off-by: Ed Rodriguez <ed.rodriguez@netapp.com>
Signed-off-by: John Meneghini <johnm@netapp.com>
Reviewed-on: https://review.gerrithub.io/416051
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-20 19:33:08 +00:00
Seth Howell
b55efd2ac7 bdev: finish encapsulating members of spdk_bdev_io
Change-Id: Ic3e1c535d8d6323990bc353305d617b3fd0fa471
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/416233
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-20 19:24:39 +00:00
Seth Howell
a32e9c354f bdev: encapsulate spdk_bdev_io callback function
This should be set from bdev.c and does not need to be accessed further
from bdev modules.

Change-Id: I2174ed2378d986cec291e7f29e64fe13a5f7df6d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/416060
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-20 19:24:39 +00:00
Seth Howell
6e456969ab bdev: encapsulate more members of spdk_bdev_io
These submission related variables are not accessed from any of our
current bdev modules.

Change-Id: I69e21eea736273183dfeb48922890a4dc9a244cc
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/416058
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-20 19:24:39 +00:00
Seth Howell
90906933ac bdev: further encapsulate spdk_bdev_io struct
Move the status field into the internal structure.

Change-Id: Icf96436925dd829ee89d2491ef55e337823be6fb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/416057
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-20 19:24:39 +00:00
Seth Howell
30dbeae891 bdev: encapsulate buffer members of spdk_bdev_io
The members of spdk_bdev_io which are associated with the data buffer
should only be modified by calling functions in bdev.c

Change-Id: Icacb7f7387d626cf6834480b572e2f31b48666e1
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/416054
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-20 19:24:39 +00:00
Ben Walker
c5b861fcec bdev/nvme: Refactor code to create a controller
This new function will get used from elsewhere.

Change-Id: I53d3fa1e7eb9ab322a794dd2728aba287017b36a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/415541
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-20 17:50:09 +00:00
Ben Walker
cd82151eba nvme: Allow calling spdk_nvme_ctrlr_set_default_opts prior to connect
Change-Id: Id0408e571362527e7c2d4759223946a0b4d7c675
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/415896
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-20 17:50:09 +00:00
Ziye Yang
1c3c50a6cb bdevperf: Enable the debug -L option
Purpose: Help for the debug.

To use the spdk_app_parse_args may be the next patch
(I just checked the spdk_app_parse_args, there are many
conflict args).

Change-Id: I6e601ba62cfdb4d381520b4eab0f6f85ed862bb9
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/415107
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-20 17:42:59 +00:00
Ziye Yang
931e6e51c3 event: change the debug -t option with -L
Reason: -t has conflicts with other option
in bdevperf or perf(nvme).

Change-Id: I4d641b55c609f4cd0425594b461b1a8b279e8dd8
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/415930
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-20 17:42:59 +00:00
Jim Harris
32d7c91cbc bdev: add spdk_bdev_queue_io_wait()
This function is intended to be used when an spdk_bdev
I/O operation (such as spdk_bdev_write or spdk_bdev_write_blocks)
fails due to spdk_bdev_io buffer exhaustion.  The caller
can queue an spdk_bdev_io_wait structure on the calling thread
which will be invoked when an spdk_bdev_io buffer is available.

While here, turn off error messages in bdev.c related to
spdk_bdev_io pool exhaustion, since we now have an API designed
to gracefully recover from it.

Also modify bdevperf as an example of how to use this new API.

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

Reviewed-on: https://review.gerrithub.io/415074
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-20 17:41:47 +00:00
Seth Howell
714776c028 test/config: Call pkgdep.sh from vm_setup
vm_setup.sh now calls pkgdep.sh to ensure that the basic packages needed
to compile SPDK are installed. Pkgdep remains a separate script because
it is supposed to contain the minimal set of packages for building SPDK.
while vm_setup is used to configure a complete testing environment.

Change-Id: I4038f522c66ad5b2c55ed73b1170f796b2c94e27
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/415895
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-20 00:18:40 +00:00
Daniel Verkamp
5df15facd2 nvme: add path status codes (TP 4028)
Change-Id: Ifac14f74f6b7681fccbf463f744d145ae8299240
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/415892
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-19 23:34:06 +00:00
Karol Latecki
5e9dbb5e92 scripts/rpc.py: pass named arguments to pmem.py
Also move "num_blocks" parameter calculation
outside of the create_pmem_pool function to keep it
consistent with rest of similar functions.
Add docstrings while at it.

Change-Id: I024abf0ed450f51d67a6acdb3927b06e205102d8
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/415740
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-19 21:25:03 +00:00
Jim Harris
21d2dac7ee autobuild.sh: fail build if Doxygen warnings found
We could set WARN_AS_ERROR = YES, but that will just
bail when the first error is found.  So instead just
fail the build in autobuild.sh and the submitter can
look at doxygen.log to see what went wrong.

Also change how doc make output is redirected to
doxygen.log, so that the commands show up in the
main build log instead of doxygen.log.  That
makes sure we can treat an empty doxygen.log file
as a successful test.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id3030d26e65c6c633b61855754e93b8b0b38b263
Reviewed-on: https://review.gerrithub.io/415873
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-19 21:23:06 +00:00
Jim Harris
d5e76d83cb doc: fix some doxygen warnings
These were related to recent scsi.h and sock.h
patches.

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

Reviewed-on: https://review.gerrithub.io/416034
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-19 21:23:06 +00:00
Tomasz Zawadzki
96e93bd8d5 bdev: add delete_aio_bdev call
Since delete_bdev should be used only for debug purpose,
this patch adds delete call specific for AIO.

Changes in tests and spdkcli done accordingly.

Change-Id: Ib732953a2c138dc25915ba97ce3a8acf771ad74f
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/415462
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-19 20:43:12 +00:00
Daniel Verkamp
9259324ffb shared_lib: only export spdk_* symbols
Add a basic linker version script to limit exported symbols to those
intended to be public API.  Currently, many internal-only functions are
also named spdk_*, but this will at least limit exported symbols to
those that will not pollute the global namespace.

This also does not assign a version to any symbols; in the future, we
may want to extend the version script to enable ABI compatibility, but
for now, the version script is just used to control symbol visibility.

Change-Id: I1f020300b3288a026b47e9b1466ebc72952d9401
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/415897
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-19 20:34:25 +00:00
Jim Harris
f387d32133 doc/Makefile: include mk/spdk.common.mk
This allows us to use the $(Q) variable in this Makefile.

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

Reviewed-on: https://review.gerrithub.io/415872
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-19 17:29:06 +00:00
Jim Harris
81ad240df5 doc: fix remaining Doxygen warnings
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic8aa4d5b8c1edff6875bba38fa5936a6fb9950cb

Reviewed-on: https://review.gerrithub.io/415871
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-19 17:29:06 +00:00
Jim Harris
052c4aff53 doc: fix a bunch of parameter-related Doxygen comments
There are still a small handful of Doxygen warnings
remaining, but this fixes most of what was left.

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

Reviewed-on: https://review.gerrithub.io/415857
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-19 17:29:06 +00:00
Jim Harris
cccc940efa string: escape references to \r and \n
Without these escapes, \r and \n don't show up in the
HTML output, and Doxygen throws a warning.

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

Reviewed-on: https://review.gerrithub.io/415856
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-19 15:18:08 +00:00
Jim Harris
f2d4c77797 doc: fix up some bdev-related reference errors
This includes removing use of lib/bdev/<module_name>
which confused Doxygen into thinking it was an xml/html tag.

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

Reviewed-on: https://review.gerrithub.io/415851
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-19 15:18:08 +00:00
Jim Harris
a27b0084b2 doc, nvme: add enum -> struct references for NVMe features
This eliminates a lot of the remaining Doxygen warnings.

While here, fix up some of the comments in the features
enumeration, specifically the ranges of feature values
that aren't used yet.

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

Reviewed-on: https://review.gerrithub.io/415827
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-19 15:18:08 +00:00
Jim Harris
6a203954c3 Doxyfile: set WARN_IF_UNDOCUMENTED = no
This removes 90% of the warning messages when making
the documentation and will allow us to focus on the
real warnings that should be investigated.

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

Reviewed-on: https://review.gerrithub.io/415826
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-19 15:18:08 +00:00
Jim Harris
ddc63f077a bdev: change spdk_bdev_free_io return type to void
Change the checks to asserts instead.  No callers ever
checked the return codes, and if they did, there's
nothing they can do to recover from an error status.

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

Reviewed-on: https://review.gerrithub.io/415539
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-19 07:28:20 +00:00
Jim Harris
ef1402a0f0 doc: add output directory to .gitignore
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic1634d2682636c99946fe288f09d5977c37e44f1

Reviewed-on: https://review.gerrithub.io/415825
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-19 07:15:50 +00:00
Ben Walker
81bb01c959 fio/nvme: Add 'hostnqn' option to fio configuration file
The user can now specify which host NQN to use for identification
purposes.

Change-Id: I50d1f868af82a72d57e4bc42d70ee74c6fb1147c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/415551
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-18 23:28:22 +00:00
Ben Walker
e051eb8310 fio/nvme: Add a thread to occasionally poll admin qpairs
This makes keep alive work correctly during long runs.

Change-Id: Idc7277373920b48177a037aefe809e056f83cf10
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/415538
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-18 23:28:22 +00:00
Dariusz Stojaczyk
8c6bd59704 virtio: remove unnecessary if
This `if` came from the original DPDK virtio PMD.
Generally, we do not want to trigger cache coherency
updates if we don't have to, but in this particular
case we know we always do.

If there were no changes to the avail index, there
would be no requests started and the function would
return much earlier.

Change-Id: Ic1231cf82288c1cb95dc89346f54d51849b8bae9
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/415589
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-18 22:31:32 +00:00
Dariusz Stojaczyk
ba43426c3d virtio: remove DEBUGLOG about received descriptors
Once enabled, this DEBUGLOG would be printed
every poller tick. It's not practical, so it's
being removed now.

Change-Id: I8627dedcc2c0df8065ffe575059938d620491dd5
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/415588
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-18 22:31:32 +00:00
Yanbo Zhou
39cd6f8551 include/sock.h: add comments for public APIs
Change-Id: I791b942f5d8cd0f0780583f2dded5d5416ebe285
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/411216
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-18 22:24:46 +00:00
Yanbo Zhou
3fe6763242 include/scsi.h: add comments for public APIs
Change-Id: Id315ae334062ee46d89c236cc5da7b42ec92eaac
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/411213
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-18 22:23:43 +00:00
Changpeng Liu
bad7601c8e bdev/nvme: factor out NS bdev creation function
Change-Id: I3504aa0251c35f641b40b5b3b1d64b2bb7337981
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/415116
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-18 22:23:06 +00:00
Changpeng Liu
e0b1704ae0 bdev/nvme: use arrayed bdevs structure for each NVMe controller
Since the number of Namespaces for each NVMe controller will
not change during the lifetime, and each Namespace will only
construct one block device, For the purpose to support NS
attribute event in bdev_nvme module, using arrayed data
structure makes the implementation much easier.

Change-Id: Ia3a64cd1e8d59937f0c91daaee9c5bd28708402b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/415115
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-18 22:23:06 +00:00
Jim Harris
69679c8033 thread: assert if io_device_unregister cannot find device
The bdev iscsi initiator had a bug which resulted in
an io_device getting unregistered twice.  An error message
got printed but it didn't immediately result in any kind
of failure detected by any tests.  Really this should be
considered a fatal error, so add an assert() so it's found
more readily should these kinds of bugs occur again in the
future.

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

Reviewed-on: https://review.gerrithub.io/415375
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-18 17:51:40 +00:00
Jim Harris
2255533973 bdev: remove shared_resource from TAILQ before putting io channel
Normally, the put_io_channel is deferred - but for unit tests
messages are called inline and not as events.  This results
in spdk_bdev_mgmt_channel_destroy() complaining that
the shared_resource list isn't empty.

So just remove it from the TAILQ before putting the io_channel -
that's more correct anyways.

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

Reviewed-on: https://review.gerrithub.io/415529
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-15 20:57:08 +00:00
Jim Harris
7699cdeed4 bdevperf: add bdevperf_submit_task helper function
This will be needed when we need to re-attempt an IO submission
when the bdev_io pool is exhausted.

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

Reviewed-on: https://review.gerrithub.io/415301
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-15 20:57:08 +00:00
Jim Harris
89de425ed4 bdevperf: break out prep work from bdevperf_submit_single
This prepares for upcoming patches which handle -ENOMEM
from the SPDK bdev io submit function.  When we retry
submitting the I/O, we do not want to "re-prepare" the
I/O - i.e. we don't want to calculate a new offset or
memset the buffer again for verify workloads.

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

Reviewed-on: https://review.gerrithub.io/415300
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-15 20:57:08 +00:00
Jim Harris
67bc354c37 bdevperf: save bdev io type in bdevperf_task
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia32bd2655a4cc1c082ce5fd5420f6abaabe40133

Reviewed-on: https://review.gerrithub.io/415299
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-15 20:57:08 +00:00
Jim Harris
7717cfcacc bdev/iscsi: fix double spdk_bdev_module_finish_done() call
bdev_iscsi_lun_cleanup() was not accounting for LUNs
getting cleaned up before the module_finish function
was called.  This resulted in the bdev/iscsi module
calling spdk_bdev_module_finish_done twice which
resulted in io_device_unregister not found errors and
possible seg faults.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I42c3e0af250e0abcea1cd88ffd3c041ebdaeea49
Reviewed-on: https://review.gerrithub.io/415372
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-15 20:57:08 +00:00
Ben Walker
1a6d593345 nvmf: Only send message on qpair disconnect if on wrong thread
Change-Id: I5297c7a869402c96f69d705a13529c32296a9eaa
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/415314
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-15 19:11:29 +00:00
Ben Walker
878185cf0e nvmf: Rename spdk_nvmf_ctrlr_disconnect to spdk_nvmf_qpair_disconnect
Change-Id: I0c6c410d120bec830ec17105de43ca62bf202b7b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/415313
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-15 19:11:29 +00:00