Commit Graph

5273 Commits

Author SHA1 Message Date
Ben Walker
8c9508f9b3 nvmf: Correctly unregister nvmf tgt as an I/O device
Change-Id: I9552354d620986c2a3d6b071f32b587e9e683198
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/413861
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-07 16:07:38 +00:00
Ben Walker
f4f839ecd3 nvmf: Eliminate num_qpairs counter in controller struct
The qpair mask can be used instead.

Change-Id: I9063e656c7c44663dc96adfd5ef52a5a1065d2ba
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/413860
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-07 16:07:38 +00:00
Ben Walker
f08cea7169 nvmf: Perform QID validation using a bit mask
Instead of scanning a list of all qpairs, use a bit
mask to determine if the requested QID is unique.

This is not for performance reasons, but because
eventually the ctrlr's list of qpairs is going to
need to go away.

Change-Id: Ic25ee60e4f9cd9d596815719760d5be892f29d0c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/413286
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-07 16:07:38 +00:00
Daniel Verkamp
5eb33f0a5f nbd: return path to /dev/nbd* in start_nbd_disk
This will allow us to make the start_nbd_disk method choose an available
/dev/nbd* node automatically in an upcoming commit.

Change-Id: I3c6eb67e7e0c513212eba17139fd0cc96bf9b6dd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413847
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-07 16:05:59 +00:00
Daniel Verkamp
8b158aaacd nvme: factor out request timeout checking
This will be used in other transports as well.

Change-Id: I05026b0dfea2647d61a173379aca368ca48a2f52
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413864
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-07 15:46:50 +00:00
Daniel Verkamp
cdb3a594a8 nvme: ignore requests submitted before timeout set
If requests are in flight at the time a timeout callback is configured,
we can't retroactively get the submission time of those requests; treat
them as not having a timeout.

Change-Id: Ic589e874a0f2c8c7f4ce352afa7c3aea33b01fae
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413863
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-07 15:46:50 +00:00
Daniel Verkamp
e7b29a14c0 nvme: move timeout information to nvme_request
This is the first step toward timeout handling for other transports.

Change-Id: I386dd990f667d449e94ba4bcedaa3435743755fd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413862
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-07 15:46:50 +00:00
Daniel Verkamp
1681a055f9 nvme/pcie: restore timeout checking on admin queue
This was partially fixed in commit ddeaeeec19 ("nvme: Only check
timeouts on requests from the same process"), but the function that
calls nvme_pcie_qpair_check_timeout() was also erroneously filtering out
the admin queue.  Restore the original behavior of checking all queue
types.

Change-Id: I26a44ff5eb772735d314ce7b8322ba9222675911
Fixes: 31bf5d795e ("nvme: make timeout function per process")
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411628
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-07 15:46:50 +00:00
Chunyang Hui
3d9b3e972a bdevperf: Add flush io type
Change-Id: Ia954418cdf9423a015358d793a34722169c087ed
Signed-off-by: Chunyang Hui <Chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/414082
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-07 15:43:59 +00:00
Young Tack Jin
f52d800864 nvme: add metadata to spdk_nvme_ns_cmd_read/writev()
verified on QEMU NVMe for OCSSD 2.0 and RFC will be shared soon

Change-Id: I01c513e30768ac1961a5c5af20de3a2490da7729
Signed-off-by: Young Tack Jin <youngtack.jin@circuitblvd.com>
Reviewed-on: https://review.gerrithub.io/413854
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: Changpeng Liu <changpeng.liu@intel.com>
2018-06-06 23:20:43 +00:00
Piotr Pelplinski
8c45ed3822 blobstore: freeze I/O during snapshoting.
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I6182eb3a77d23db7088703492d71349e3a4b6460
Reviewed-on: https://review.gerrithub.io/399366
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-06 22:26:04 +00:00
Changpeng Liu
4c4c8ca269 nvme: don't reset controller when processing NS mangement commands
For attach/detach command, the identify namespace data should be
updated during the namespace attribute notice event callback, while
here, in case of the driver may not set aer callback, so update the
namespace identify same with attach command.

Change-Id: Ie594b2ff646a67488d03af2771c00f9947395aba
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/412884
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-06 20:02:16 +00:00
Daniel Verkamp
0dc36fe97d test/nvmf: move multiconnection out of NIGHTLY_FAILING
This test is now working reliably after commit 392f3ef589 ("test/nvmf:
fix waitforblk usage in multiconnection").

Change-Id: I15c790b01df8c8204b6c389cf8d381e10ee54fc9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413857
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-06 19:32:15 +00:00
Daniel Verkamp
853770870c doc: reorganize programmer guides in index.md
Move several programmer guides into the correct section.

The blobstore programmer's guide is already linked from the Programmer
Guides section above; remove it from General Information.

Also add a link to the logical volumes documentation and rename it to
remove the "Introduction", since this doesn't fit with the naming of
other similar chapters.

Change-Id: I1eed7d2588851d67c067a2bcd568b3b071816679
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413851
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-06 17:21:20 +00:00
Karol Latecki
161eb083ae test/vhost: remove config-ro Qemu option from config
Vhost-blk readonly "config-ro" option was
removed from Qemu arguments after merging
pull request f67c9b693a into Qemu master.

"config-ro" Qemu option needs to be removed
from scripts in order for tests to pass.

Nightly test for read-only feature has to be
commented out until Qemu is updated on test
servers.

Change-Id: I0cdc9c2fd3b23ef77a63b54e280e1bb9500229ee
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/413745
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-06 17:20:30 +00:00
Pawel Wodkowski
5d3d5a49da nbd: use req.len in NBD_CMD_TRIM
Change-Id: I2c193498ae70e2813e5447ac4375c84635f5425a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/413808
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-06 17:13:15 +00:00
Ben Walker
4d58c1328a nvmf: Move QID error checks to common path
QIDs need to be validated for both I/O queues and admin
queues, so move the checking to a common path.

Change-Id: Icb2009b3fe4d70f146b741c046812d9df62cc2fb
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/413859
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-06 17:10:57 +00:00
Ben Walker
b95fc6fc64 nvmf: Return the correct error for out-of-range QID
This one is actually a bit tough to deduce in the specification.
The NVMe-oF spec says that QID errors detected in the RDMA
transport shall return an RDMA-specific error indicating
the problem. However, our code doesn't detect the error in
RDMA-specific code, and it isn't clear if the language is
a "must" or a "should".

The NVMe specification does clearly indicate what error
to return on invalid QID in response to a Create
I/O Queue Pair command. For now, return that while
we game plan whether we need to call into the RDMA
transport to correctly report this error.

Change-Id: I7faf37bad9b9202bc50a906214a51c17e4808fc0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/413858
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-06 17:10:57 +00:00
Daniel Verkamp
008c111b48 nvme/pcie: only set mmio_ctrlr around actual MMIO
When the shadow doorbell feature is enabled, no actual MMIO takes place
when a shadow update is sufficient; tighten the bounds of the updates to
g_thread_mmio_ctrlr in the two doorbell update locations so that we only
need to touch the thread-local variable when actual MMIO access is
required.

Change-Id: Ida974bec33f56cbb9f7d3611f483c6975ec773ab
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413856
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-06 17:10:09 +00:00
Shuhei Matsumoto
f2554ee973 scsi: Change spdk_scsi_task_alloc/free_data() from public to private
This patch does a little cleanup of SPDK SCSI layer APIs.

spdk_scsi_task_alloc_data() is only used in spdk_scsi_task_scatter_data().
spck_scsi_task_free_data() is only used in spdk_scsi_task_put().

The latter was called in UT code but this can be removed without any
degradation.

SPDK SCSI layer is relatively matured and these will not be used
out of lib/scsi/task.c.

Additionally memory leak detected by ASAN is fixed in this patch.

Change-Id: I8eff7b4dbfc307c211087734649a9b9b10555f8d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/413872
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-06 17:09:22 +00:00
Chen Wang
86637cae4f doc/vhost.md: update the RPC method for remove_vhost_scsi_target
Method "remove_vhost_scsi_dev" changes to "remove_vhost_scsi_target".

Change-Id: I1e368c7cf2b16accd3431100e384c1d868e04a47
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/413873
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-06 16:20:14 +00:00
Jim Harris
c796b90747 bdev/iscsi: break out common code for completing a conn_req
Suggested-by: Ziye Yang
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6ca7f08aed2e12c59518269c7b277895b4817bd8

Reviewed-on: https://review.gerrithub.io/413844
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-06 16:05:57 +00:00
Daniel Verkamp
e83a62bf09 nvme: rename quirk from LIGHTNVM to OCSSD
This is consistent with the Open Channel naming we are using elsewhere.

Change-Id: Ib088359bed29a958f8b50e41cf34143a23429f54
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413840
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-06 01:45:36 +00:00
Shuhei Matsumoto
6f872f5ab9 json: Add spdk_json_decode_uint16
int16_t is not used in SPDK yet. Hence add decode function only
for uint16_t.

Change-Id: I86f86a6768d95896d1840370f2d176c770c41418
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/413711
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-05 21:30:02 +00:00
Chunyang Hui
3f4c54a7c7 bdev/aio: bdev_aio_flush remove redundant parameters
Change-Id: I3f458fbf7758d912344c21026d672e7bdcf60e8e
Signed-off-by: Chunyang Hui <Chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/413724
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-05 18:45:42 +00:00
zkhatami88
0cdb08b0e0 env: add size parameter to spdk_mem_map_translate
Change-Id: I808101edaf4d75613baf19a950915f1d8e75b1af
Signed-off-by: zkhatami88 <z.khatami88@gmail.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413154
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Zahra Khatami <zahra.k.khatami@oracle.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-05 18:36:00 +00:00
Jim Harris
f32b3ea9f4 barrier.h: change PPC64 spdk_rmb from lwsync to sync
Suggested-by: Jonas Pfefferle
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I33cf41d39a4546fbb5f44fccc1380c731d0224af

Reviewed-on: https://review.gerrithub.io/413705
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jonas Pfefferle <pepperjo@japf.ch>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-05 17:56:22 +00:00
Pawel Wodkowski
fba68d61e1 bdev/iscsi: add RPC support and cofnig dump
Also, as we are here, switch to new spdk_json_write_named_* API in
bdev_iscsi_dump_info_json()

Change-Id: Ib29466eb5c6d6496dd1d8efc1f2064577bf56272
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/406635
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-05 17:52:06 +00:00
Pawel Wodkowski
06fdb62b3b bdev/iscsi: make connection poll time 0.5ms
Change-Id: Ib8d77b44ef10b03d6554c32f78e92f197f6c7e7f
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/412839
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-05 17:52:06 +00:00
Pawel Wodkowski
a76cc7ce61 bdev/iscsi: add create callback
Also convert bdev_iscsi_set_module_init() into new callback.

Change-Id: I439369180e1e10eab5dee6aba27ffb0489ea2550
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410095
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-05 17:52:06 +00:00
Andrey Kuzmin
4e51a274de Fix fio_plugin build for FIO_IOOPS_VERSION >= 24.
Fio commit d3b07186b1d4c7c1d9adc1306407458ce41ad048 changed return
type of the ioengine->queue method to a new enumeration type
fio_q_status. Add preprocessor checks to ensure SPDK fio_plugin builds
successfully with both current and earlier fio ioengine API version.

Change-Id: Ie9eb818473c6453624d6cfe51a19c6bf0d17e334
Signed-off-by: Andrey Kuzmin <andrey.v.kuzmin@gmail.com>
Reviewed-on: https://review.gerrithub.io/413749
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-05 16:35:52 +00:00
chenlo2x
1559a7cdaa autotest: Adding qos test case under the spdk/test/iscsi_tgt directory.
Change-Id: Iee25dc904d65a83c6149d607aca99b8cf9d2f0dc
Signed-off-by: chenlo2x <longx.o.chen@intel.com>
Reviewed-on: https://review.gerrithub.io/410322
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-04 19:09:21 +00:00
Pawel Niedzwiecki
c25adb8444 test/vhost: Add no-pci option and fix vhost live migration tc2 & tc3
Adds option to disable pci access in spdk_vhost_run function.
This is particularly required in vhost live migration tc2 & tc3

Change-Id: I5ec215d316b97dbabd1297856d8f2dfbf7b9d3cb
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/413658
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-04 19:08:46 +00:00
Philipp Skadorov
b6f90c527a nvmf/rdma: monitor asynchronous events
NVMf cnx acceptor poller is changed to check the asynchronous events
from the RDMA devices.

RDMA async events are polled together with RDMA CM events; the file
descriptors are combined into a poll fd array and processed in a single
poll syscall.

The errors handler is an empty placeholder for this patch, it just
prints the kind of event read from the IB device context.
The work for implementing event handling is left for later.

Signed-off-by: Philipp Skadorov <philipp.skadorov@wdc.com>
Change-Id: Ib167990651b585090aceef1404a88d431a910226
Reviewed-on: https://review.gerrithub.io/412540
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-04 17:28:04 +00:00
Daniel Verkamp
a1c7c58f71 util/bit_array: add functions to count 0/1 bits
Change-Id: I7c1ad078982a19c4093e787731974986011f535b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413295
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-04 17:24:48 +00:00
Ben Walker
72800826ec nvmf: Quiesce I/O before closing spdk_nvmf_qpairs
Change-Id: Iff58943f3f9db39b6fce1437a0cfe7380991daa6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/412078
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-04 17:20:34 +00:00
Yanbo Zhou
ed97638ccd include/nvmf.h: add comments for callback functions
Change-Id: I85932db79323de7bb7707a2c8ab0d205f3671629
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/407714
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-04 17:17:39 +00:00
Tomasz Kulasek
c9476f1b1b doc/lvol: add diagrams to clone-snapshot doc
Change-Id: I1cac468c58d84ed03bb646b8485e92fdb533049e
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/413254
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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-04 17:17:23 +00:00
Srikanth kaligotla
8580daa1ac nvmf: SGL support for NVMF RDMA Driver.
Change-Id: I447754c69de432b5a65dc8c1d9ae690926e88c51
Signed-off-by: John Meneghini <johnm@netapp.com>
Signed-off-by: Srikanth kaligotla <kalis@netapp.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/410302
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-04 17:15:49 +00:00
Ben Walker
a94accabff bdev: Begin encapsulating spdk_bdev_io
This begins the process of hiding data members in
spdk_bdev_io that don't need to be accessed from
within bdev modules.

One strategy would be to implement accessors for
every data member in the structure. However, that
may have negative performance effects. Instead,
create a new internal structure within the old
structure. This new structure will still be visible
for now, but at least makes clear which members
are accessible and which are not.

This patch shifts one data member to the new structure
as an example.

Change-Id: I68525db995325732fe9f5fc3f45b06920948309b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/412298
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-04 17:14:22 +00:00
Xiaodong Liu
c6ae008db5 lnvm: add a quirk for identify LightNVM device
Change-Id: I841d7b47bc85498abb608944587e7b7585138263
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/411588
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-04 03:31:46 +00:00
Jim Harris
269a479064 nvme/overhead: fix segfault when no SSD found
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I862a7eb89d6357c85285d2a6cd90ad9f633d2435

Reviewed-on: https://review.gerrithub.io/413285
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-04 03:28:19 +00:00
Jim Harris
13ed998697 nvme: make basic request functions static inline
This reduces submission+completion time by 10-15
core clocks per IO on an Intel Xeon Platinum
processor.  Similar improvements should be seen
on other processors as well.

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

Reviewed-on: https://review.gerrithub.io/413284
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-04 03:28:19 +00:00
Jim Harris
9c4679bc77 nvme: rename g_pid to g_spdk_nvme_pid
This variable will no longer be static in a future patch.
So make the name a bit more verbose since it will now
be visible outside of the module that defines it.

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

Reviewed-on: https://review.gerrithub.io/413283
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-04 03:28:19 +00:00
xuhuagen
392f3ef589 test/nvmf: fix waitforblk usage in multiconnection
The subsystems created in this test only have one namespace, not 10;
wait for just nvme0n1, nvme1n1, etc. instead of trying to wait for
nvme0n1, nvme0n2, nvme0n3..., which will time out and fail.

Change-Id: I2d131e9b92c9c89a5dc8fe0cf9138b980f810233
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/413056
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-01 23:25:37 +00:00
Jim Harris
d76cd984aa nvme: optimize nvme_allocate_request memsets
The memset was zeroing a lot of bytes that get
initialized either later in this function or elsewhere
in the submission code path.  Eliminating these
extra memsets saves a few nanoseconds of CPU overhead
in the NVMe submission path.

Note: one use of the cpl data member depended on
the nvme_allocate_request memset.  Since this use
case is not in the primary I/O path, just memset it
in that specific location before using it.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ife483a4d9c24c033cc7d26d94ec1700905a936f4
Reviewed-on: https://review.gerrithub.io/413153
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-01 21:01:42 +00:00
Daniel Verkamp
7dff719f7e nvme: optimize layout of struct nvme_payload
Rather than storing nvme_payload::type explicitly, use the SGL reset
function pointer as an indicator: if reset_sgl_fn is non-NULL, then the
payload is an SGL type; otherwise it is a contiguous buffer type.

This eliminates the one-byte type member from struct nvme_payload,
making it an even 32 bytes instead of 33, allowing the removal of the
awkward packing inside struct nvme_request.

Change-Id: If2a32437a23fe14eb5287e096ac060067296f1dd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413175
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-01 21:01:42 +00:00
Daniel Verkamp
caf85d8f23 nvme: add macros to populate nvme_payload
The definitions of these macros will change in an upcoming patch that
modifies the way nvme_payload is laid out.

Change-Id: Ic6edc18928542b07be7519a72bdbf6babbeb0131
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413174
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-01 21:01:42 +00:00
Daniel Verkamp
5c2ccd0628 nvme: add helper function to get payload type
This will simplify upcoming patches that change the way nvme_payload
stores its type.

Change-Id: Idf0a5b8dfd7d66a10f89254d2c5c54fee2968a43
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413173
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-01 21:01:42 +00:00
Jim Harris
cf6ee25359 nvme/overhead: remove extra spdk_get_ticks()
The check_io function always calls spdk_get_ticks() -
so return that value to the work_fn for checking
when the test is complete, rather than have work_fn
call spdk_get_ticks() again.  This eliminates an
extra rdtsc call that counts against the completion
path.

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

Reviewed-on: https://review.gerrithub.io/413152
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-01 21:01:42 +00:00