Commit Graph

8134 Commits

Author SHA1 Message Date
Changpeng Liu
7c331adfeb nvmf: update the subsystem poll group's reservation information correctly
Existing condition for updating subsystem poll group's reservation
information is wrong, when received the RELEASE command, the
reservation type may be changed to none, but it will not be
saved to the subsystem's poll group.

Change-Id: Idc177a0f03fb9611d6eda1e25a5b90caaa73d1be
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450727
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-11 01:13:59 +00:00
Ben Walker
d02950e6f5 nvme: Cache the cb_fn and cb_arg in the tracker
This avoids a data dependent load to find which
callback to call in the completion path.

Change-Id: Ifa20790a7af3332a74bc45037e589668744af797
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450558
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-04-10 21:29:03 +00:00
Ben Walker
f7d3dd9bd6 nvme: Eliminate tracker's active flag
The same information can be obtained by checking the req
field for NULL.

Change-Id: I9689ee0be33537fd6d3f35d8c3710fabab5e1928
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450557
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-04-10 21:29:03 +00:00
Karol Latecki
4b8405685a scripts/vhost: Modify parameters for vhost benchmark job.
Add missing parameter numjobs. It is used in one of the cases.
Remove unnecessary arguments:
- cpumask: we do not want to restrict that
- percentile list: we do not want to restrict that, all
  percentule buckets can be generated.

Change-Id: I6a4431af0defe92920f16d26091d67161e56dc5a
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450519
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-10 21:05:43 +00:00
Xiaodong Liu
9baab97fab jsonrpc.md: document NBD RPC methods
Change-Id: Ia4ea6986c2282b3a56ec48ca4f9b0ad05e95e7f1
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450578
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-10 20:49:11 +00:00
Shuhei Matsumoto
5f51f0aff6 bdev/raid: Add callback parameters to remove_base_devices()
This is a preparation to add completion callback to the
destroy_raid_bdev RPC.

Newly added callback parameters are passed to spdk_bdev_unregister()
in the end. This patch adds just parameters and the next patch will
utilize them.

Change-Id: Ic239c55872c0c69f3d1625eaccdb91a32a9d4d30
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450572
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-04-10 20:41:57 +00:00
Shuhei Matsumoto
b2dd6e7ec2 bdev/raid: Consolidate error paths in rpc_destroy/construct_raid_bdev()
This is a preparation to add completion callback to the
destroy_raid_bdev RPC.

Change-Id: Ib58b7e6d8531c84ab5e4fce7a838e409e77a0de5
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450571
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-10 19:38:10 +00:00
Shuhei Matsumoto
8c969cf018 bdev/raid: Consolidate spdk_io_device_unregister() calls in destruction paths
This is a preparation to add completion callback to the
destroy_raid_bdev RPC.

spdk_io_device_unregister should be called after spdk_bdev_unregister
because IO channel should be terminated after all open descriptors
are closed. This patch follows the practices of other bdev modules.

Change-Id: I6003edf0a6f6b2b235bf66f4b81bb0c2b855ae14
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450570
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-10 19:38:10 +00:00
Shuhei Matsumoto
9d30b0d346 bdev/raid: Call deconfigure() once at the end of remove_base_devices()
This is a preparation to add completion callback to the
destroy_raid_bdev RPC.

Move the call raid_bdev_deconfigure() to the end of the function.
This will make us to add the callback to raid_bdev_deconfigure()
and remove_base_devices().

Change-Id: Ic8ce847068f5a3682003707c87c364ed4b68e587
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450569
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-10 19:38:10 +00:00
Shuhei Matsumoto
ca34df9807 bdev/raid: Get base bdevs from its raid bdev simply in remove_base_devices()
This is a preparation to add completion callback to the
destroy_raid_bdev RPC.

Getting raid bdev from its config and processing base bdevs by using
it throughout is much more natural.

Checking if base bdev is active can be done by checking if the pointer
to the base bdev in base_bdev_info is not NULL.

Change-Id: Idd43b13eb342d9cd21ba55943bdcd1f564b3760e
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450568
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-10 19:38:10 +00:00
Pawel Wodkowski
2cccea55ed rpc/notifications: add notification support to RPC client and SPDK host.
Two new RPC calls get_notification_types and get_notifications added.

Change-Id: Ia5288d83cc5e9f18ef1622d3f15b9fe3bbf640ed
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436530
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@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>
2019-04-09 23:01:52 +00:00
Shuhei Matsumoto
0839680db3 bdev/raid: Factor out removing base bdevs into a function
This is a preparation to add completion callback to the
destroy_raid_bdev RPC.

This patch doesn't change any behavior. This patch just factors out
code into a function and move it to raid_bdev.c.

Change-Id: Ia86741ec686ffd85e4d826caf4442292963922ec
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450567
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-04-09 18:20:40 +00:00
Shuhei Matsumoto
e1c9791225 bdev/raid: Factor out finding raid bdev from base bdev into a function
This patch tries to clarify the logic of the operation to
deconfigure the corresponding raid bdev when a base bdev
is removed.

Change-Id: Id601049dfa59cd919321d833c2867f40c3ba031b
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450566
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-04-09 18:20:40 +00:00
Shuhei Matsumoto
00b13a7207 bdev/raid: Change raid_bdev_free_base_bdev_resource() from public to private
raid_bdev_free_base_bdev_resource() has been referenced only in
bdev_raid.c.

Change-Id: I4be9ed5b7a93b950b16e57323cdf1f4bdf89841f
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450565
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-09 18:20:40 +00:00
Shuhei Matsumoto
596d7a0fb6 bdev/raid: Change raid_bdev_cleanup() from public to private
raid_bdev_cleanup() has been used only in raid_bdev.c.

Change-Id: I4dcc4979eda2fd872fda23e3433b120ab6aaaad2
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450564
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-04-09 18:20:40 +00:00
Shuhei Matsumoto
1ba9859353 bdev/raid: Change the prefix of names of lists from g_spdk_ to g_
Configuration lists in RAID bdev are unlikely to be exposed outside
of the RAID bdev module. Hence simply the prefix g_ will be enough
to clarify they are global data structure in RAID bdev module.

Change-Id: I9df88db8fa651d5af7d771d88ff04bb5997079c9
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450563
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-04-09 18:20:40 +00:00
Tomasz Kulasek
ebce385d61 lib/util/cpuset: add negate and xor
Change-Id: I8d2fc9d0fcc6cb8b088c307d1520f0b1051c3ef6
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/443518
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-04-09 17:40:24 +00:00
Ben Walker
7b0579df17 nvme: Use a non-temporal move instruction when copying NVMe cmd
When copying the NVMe command from the request to the actual
submission queue slot, use a non-temporal move instruction.

The submission queue slots are never read by software - only
written to. So don't pollute the CPU cache with their contents.

Change-Id: I112f721abfac03bd7b33ec9ddf783d4bf2952b42
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450193
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-04-09 13:59:13 +00:00
Darek Stojaczyk
794b2533de virtio: shrink the process-local virtqueue structure
We used to ceil the size of the vring structure to the
nearest cache line boundary. That's how the original
DPDK implementation behaved, but I can't find a reason
for this. This patch gets rid of the ceiling.

Change-Id: Iaa40fdb79c60252237901f77023ff2f9e580eece
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450549
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-04-09 06:30:42 +00:00
Darek Stojaczyk
e05a487129 ioat: allocate device struct using regular calloc
spdk_dma_malloc() is not required here, as the device
struct is neither DMA-able nor shared between processes.

While here, also allocate various ioat buffers using
spdk_zmalloc() instead of spdk_dma_zmalloc(), as
spdk_dma_*malloc() is about to be deprecated.

Change-Id: I4ffa40a59f48b2854ba3b35a759e4778007b47b7
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450258
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-04-09 06:30:42 +00:00
Darek Stojaczyk
20d575bba5 util/bit_array: switch to spdk_*malloc().
spdk_dma_*malloc() is about to be deprecated.

Change-Id: I1ad624aa64c70e6f5716d711bb6d2d6b6cd1007d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450257
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-09 06:30:42 +00:00
Darek Stojaczyk
6342332847 bdev: switch to spdk_*malloc().
spdk_dma_*malloc() is about to be deprecated.

Change-Id: Idb18f7ef44634deaf63139f0f872881c9cdaefac
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450256
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-09 06:30:42 +00:00
Darek Stojaczyk
5ac7440af1 bdev/malloc: allocate bdev struct using regular calloc
spdk_dma_malloc() is not required here, as the bdev
struct is neither DMA-able nor shared between processes.

While here, also allocate mdisk->malloc_buf using
spdk_zmalloc() instead of spdk_dma_zmalloc(), as
spdk_dma_*malloc() is about to be deprecated.

Change-Id: If835216764a565ade09180159fbbc92411b5c78f
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450255
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-09 06:30:42 +00:00
Darek Stojaczyk
d6afc7f33c ocf: switch to spdk_*malloc().
spdk_dma_*malloc() is about to be deprecated.

Change-Id: Id49d700116bdd977893c6b89470764d97d9293bd
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449799
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-09 06:30:42 +00:00
Vitaliy Mysak
bef5509d4f scripts: vmsetup.sh fix pkgdep usage
vmsetup invokes pkgdep.sh with -i flags, but that flag is not supported.
This patch changes the call to just `pkgdep.sh`.

Change-Id: I1eb92b9ddfce1ea2d7ef450fd795f8f93fb198ec
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450260
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-04-08 23:21:37 +00:00
Karol Latecki
0153a2e9d6 scripts/perf: wrap remote ssh command into a function
Wrap ssh_connection.exec_command() and related decode calls
into a function.

Change-Id: Ia56d453358e086df53fa179be643da6416218bec
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450018
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-04-08 23:20:51 +00:00
Karol Latecki
7e2052e309 scripts/perf: Update NVMeOF scripts to support TCP transport layer.
For future NVMeOF benchmarking scripts must support TCP layer.
This is a recent feature so also added support of using custom
built nvme-cli.
Example config file was updated with appropiate fields.

Rename rdma_ips to nic_ips, as NICs no longer need to be
RDMA-enabled for this test.

Change-Id: I368b48eca08a30b4221f198cb76134b8836dbba9
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449879
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@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-04-08 23:20:51 +00:00
Maciej Szwed
8256cecf39 blobstore: rename resize_in_progress to locked_operation_in_progress
This is a part of future changes to block blob operations
that may cause race conditions between each other.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ia728d1fc207375ddcb3b70b5081ddcffa9f99027

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449789
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-08 21:39:08 +00:00
Maciej Szwed
6e947d19e2 blobstore: Add _spdk_blob_get_snapshot_and_clone_entries function
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ic29496516a75d252c3d0fce9396434209eb620e8

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449543
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-08 21:39:08 +00:00
Jim Harris
8bc6e3c595 nvme: simplify some tracker accesses
There are several places where we have the tracker
pointer, yet we go find the tracker again by getting
the tr->cid and using that index to find the tracker
again in the qpair's array.  That's really silly.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450308
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-04-08 21:32:45 +00:00
Ziye Yang
18b3e74186 nvme/tcp host: Support the multiple SGL in host side.
Current the idea is:

Convert the multiple SGL into the single SGL and send it
out.

Change-Id: I8e571704e9d7c7b583f889837eead7cac1982fcd
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448262
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-08 17:09:03 +00:00
Hui, Chunyang
55f5b205c5 Opal: Add Opal library
First submission. Implemented part of the Opal library
and "scan" function. Can be invoked by nvme_manage.

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

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

Change-Id: I74fc9bd311d4fdc9e8676cfa938d32b48fdece39
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450186
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-04-08 15:54:07 +00:00
Darek Stojaczyk
1c297d7e30 thread: fix crash on non-contiguous cpu range in cpumask
Limit the thread scheduler to put spdk_threads on
lcores < last_lcore instead of lcores < lcore_count,
which was probably the original intent.

When the cpumask was not a contiguous cpu range, the
thread scheduler failed to schedule any spdk_threads on
the last cores. There was one hardcoded thread created
for each reactor, but the scheduler could squash some
of those into a single reactor. This broke the legacy
lcore-based messages as those expect there to be at least
one spdk_thread per lcore. Any spdk_poller_register()
or spdk_get_io_channel() called from such a legacy
message would fail an assertion, as spdk_get_thread()
returned NULL.

Fixes #743

Change-Id: I81a3f76d9c4788596c697df6ff51b264b99ce10b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450353
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-08 15:04:30 +00:00
Jim Harris
7b266460d0 iscsi: handle aborts for queued_datain_task that is completed
It's possible that we get a request to abort I/O just after
a queued_datain_task has completed, but before we've had a
chance to remove it from the queued_datain_tasks TAILQ.
_iscsi_conn_abort_queued_datain_task wasn't accounting for
that which would result in an infinite loop.

Fixes issue #725.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Tested-by: Jane Lusby
Change-Id: I494ee78763d527d83dcb65f46563ee69bb975576

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450301
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-06 12:48:47 +00:00
Vitaliy Mysak
e862b6434a ocf: wait for pendings reqs in unregister
Unregister OCF bdev using poller that checks if
  cache has pending requests.

This prevents ocf_mngt_cache_stop causing
  deadlock on reads in WT mode.

Submodule commit was updated to get new function ocf_cache_has_pending_requests().

Change-Id: Iee4cb09bc2bb859a6dcce89994c686f64924c942
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446604
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-05 16:22:32 +00:00
Vitaliy Mysak
25df73f5d2 ocf: Add management context
Add structure vbdev_ocf_mngt_ctx that is going to be used
  for asynchronous management operations.
Using such context, dynamic memory allocations are no longer required
  (except for one time poller registration)

This patch also adds functions to modify context in a predictable way.
They are very important for complex flow of management operations in OCF bdev
  especially after whole OCF API gets changed to asynchronous.

Change-Id: Ia402d51665330a553f7f3d74000e3636f0d6a598
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449556
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-04-05 16:22:32 +00:00
Darek Stojaczyk
bb64a7e511 ut/bdev_mt: fix io_channel leak in "unregister_and_close"
We didn't call teardown_test() in "unregister_and_close"
test case, causing the subsequent test case to fail
to register the same io_channel. This didn't cause any
issues, as spdk_io_device_register() silently returned
if the same io_device was already registered. However,
there was an extra error message printed and this patch
gets rid of it.

```
  Test: unregister_and_close ...passed
  Test: basic_qos ...thread.c: 850:spdk_io_device_register: *ERROR*:
io_device 0x55555576e4e0 already registered (old:0x555555770ab0
new:0x55555d7a14d0)
passed
```

Change-Id: Ib554612df8985c9d99b46b71bb76020f52565362
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450111
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-04-05 16:21:58 +00:00
yidong0635
ff5d362e72 etc/spdk: add raid bdev related configurations in conf files.
Now we need to add configurations in these files to run cases.
Add some settings in conf files for user to choose freely.

Raid bdev can be comprised of AIO/Nvme/Malloc.

Change-Id: Ifdab8539c89d2cf4fcd88ca7f26e8563e12dd585
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449772
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-04-05 16:21:50 +00:00
Seth Howell
1fb629c4d2 rdma: make the pending_data_buf_queue an STAILQ
Should speed up operations, and allows us to remove the 16 byte link
object from the request structure.

Change-Id: Ie62df1f44d22580a7a7ae41c498295841d1e3064
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448080
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: Ben Walker <benjamin.walker@intel.com>
2019-04-04 21:34:55 +00:00
Darek Stojaczyk
43e136dfcc crypto: switch to spdk_*malloc().
spdk_dma_*malloc() is about to be deprecated.

Change-Id: I683ea366da7bb186f16a8084a9c43276ed4fce04
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449798
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-04-04 20:59:36 +00:00
Ziye Yang
4ee4023a0d nvme/tcp: Replace the data with iov in pdu struct
Purpose: To support the multiple SGL later.

Change-Id: I133a451100b736353cf98a6aaca879d290ff5b67
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448259
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-04 14:28:09 +00:00
Xiaodong Liu
efdd6edba2 nbd: optional nbd_device in start_nbd_disk
Enhance RPC method start_nbd_disk to take nbd_device as
one optional parameter. If it is not assigned, automaticly
choose an available nbd device path from /dev/nbd0 to
/dev/nbdN.
For github issue #324:
https://github.com/spdk/spdk/issues/324

Change-Id: I72c064d8bd476df342f5aa0af4d6120eb021c7ed
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/440453
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-04-04 08:35:50 +00:00
Jim Harris
bfd1e46e6e bdev: deprecate spdk_vbdev_register
This API had good intentions, but as more complicated
use cases came up where base bdevs could come and go,
we've realized that the bdev layer will need another
mechanism to query bdev modules on these types of
relationships between a virtual bdev and its base
bdevs.  We removed all code related to tracking
the array of base bdevs a long time ago.

Change all existing callers to use spdk_bdev_register.
Document spdk_vbdev_register as deprecated for now,
and change its implementation to just call
spdk_bdev_register for simplicity sake.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450076
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-04-04 08:28:31 +00:00
Ben Walker
a0760b9554 nvmf: Use threads instead of events for shutdown handling
Change-Id: Ib22dcb95810f4ed16beb76769e407d48713d85ad
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447117
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-04 05:54:42 +00:00
Ben Walker
9603e344ae event: Use threads for shutdown handling instead of events
Change-Id: I841ebf29ddcb46038a07d5b0b7781aac938c5869
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447116
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-04 05:54:42 +00:00
Ziye Yang
8f3b4a3a6d nvme/tcp: Add a helper function nvme_tcp_pdu_set_data
This function will be exteneded later for multiple SGL
support.

Change-Id: I1f6962ec03c72e335efaa311a12d3891312fcc53
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449968
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-04 04:50:04 +00:00
Shuhei Matsumoto
5a1dc44423 iscsi: Fix LUN ID in Ready to Transfer PDUs
LUN ID is not converted from integer to structure and integer is
set to R2T PDUs.

Popular iSCSI initiators don't check this value and work correctly.

This patch uses the public helper function of the SCSI library
to fix the issue.

Additionally, private helper function to convert structure to
integer for LUN ID is replaced to the public helper function
of the SCSI library.

Change-Id: I9218c5ef7a8bfec43326c6584db7c6929fdd11a8
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449963
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-04 04:40:28 +00:00
Shuhei Matsumoto
12ab86e24d scsi: Add helper functions to convert LUN ID between structure and integer
SPDK iSCSI target didn't convert LUN ID from integer to structure
when it sends R2T PDUs. The next patch will fix the issue. Introducing
helper functions into SCSI library and using them will be clean. Hence
this patch adds two helper functions to convert LUN ID between structure
and integer.

The logic of helper functions is derived simply from the current
implementation in SPDK.

Change-Id: I114b546cfcb44109d6cd131a1fa972f4d6bfea38
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449962
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-04 04:40:28 +00:00