Commit Graph

6636 Commits

Author SHA1 Message Date
Shuhei Matsumoto
78a45b3f45 test/iscsi_tgt: Port running_config test to JSON config and re-enable it.
Change-Id: I7619ea8dc94e76934c8ebb37f4248376feaa23ef
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/433200
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-11-19 18:17:22 +00:00
Shuhei Matsumoto
a66c9ffd50 test/iscsi_tgt: Port config file from .INI to JSON in the FIO test
Port the config file used in the FIO test from .INI to JSON.

Besides, set_bdev_nvme_hotplug RPC cannot be used easily because
the iSCSI target is not the primary process in the FIO test.

The FIO test doesn't use the hotplug feature and hence remove
enabling hotplug simply.

Change-Id: Idf8809aa829b67a7028f6fa4778a7aae1b431bb8
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/433223
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-11-19 18:17:22 +00:00
Tomasz Zawadzki
33c517c57a ioat/perf: handle spdk_mempool_get() failure
Change-Id: I3b3ca9ce1db609bda59e991f84f511747f49eb87
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/433825
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-11-19 17:59:25 +00:00
Shuhei Matsumoto
ac7821dc82 config_converter: Fix conversion error to etc/spdk/vhost.conf.in
Just return if the [AIO] section is empty.

Change-Id: I90c42afdca3af7969a1e9d500f92820892857127
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/433199
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2018-11-19 17:58:05 +00:00
Shuhei Matsumoto
603993b274 config_converter: Skip the [Ioat] section to avoid conversion error
IOAT copy engine supports JSON RPC but doesn't support JSON config
dump yet. Hence config_converter fails conversion if the source
.INI config file includes the [Ioat] section.

Skip the [Ioat] section for now.

Change-Id: I7331db582917bf01e92f6251c75f2f5a36ab9382
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/433198
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2018-11-19 17:58:05 +00:00
Tomasz Zawadzki
c3c6922941 app/trace: fix app_name dereference on init
In case when only file_name was provided,
app_name was still dereferenced.

Change-Id: Ica948e072ef02a8daadf303b3e2a004640d19000
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/433609
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-19 15:34:26 +00:00
Changpeng Liu
3126157a21 bdev_nvme: set to deactive state when deleting NS bdev
Since the number of NVMe controller's Namespace is a const
variable, so the Namespace block device is a static array,
and is assigned with NSID after initialization, so when
users want to delete a specified block device, we can
just change it into inactive state.

Fix issue #495.

Change-Id: Ie6e33ad59f2375cc2b5099624bfe1ef6918a6264
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/433543
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-16 16:51:07 +00:00
Changpeng Liu
2706cd4238 nvme: add timeout for Admin commands when initialization
Currently there are no timeout mechanism for Admin commands
when initialization, the NVMe driver may enter infinite loop.
While here, add a new parameter to the controller initialization
options, NVMe controller will report an error when timeout
happens during initialization.

Change-Id: Id0c6b6fa15abe5227b486bee95c8e02914b0d358
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/424622
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-11-16 15:29:33 +00:00
Seth Howell
e688d1ccf1 nvme_rdma: properly configure and store max_sges
The max_send_sge and max_recv_sge values can be set to any value from
0...dev_attr->max_sge. WHen we actually set the attributes, we will
receive a qpair with values for max_sge greater than or equal to what we
initially set. We need to store the maximum number of SGEs for later use
when constructing work requests.
Previously we have not relied on these values since we assumed that we
would always be able to have more sges than we asked for initially. This
may change as we try to allocate more SGEs to handle splitting buffers
across memory regions.

Change-Id: Ibbeae1908b86baa3a96d9c6cd2051401aaa2197b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/433307
Chandler-Test-Pool: 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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-16 15:18:41 +00:00
Seth Howell
1180bf8343 rdma: clean up SGE definitions and properly set values
We have historically conflated SPDK_NVMF_MAX_SGL_ENTRIES and the maximum
number of SGEs associated with a wr data object. For now these are the
same thing, but there should be nothing tying the number of NVMe request
SGL elements to the number of rdma request wr sgl elements.
Also, clarify the rx_sge and tx_sge enums to reflect the actual maximum
number of SGEs associated with either the send and receive queues.
This change doesn't actually modify these values, but sets us up to do
things like split the data in an NVMe SGE into multiple WR SGEs in case
the buffer associated with the NVMe SGE is not contained in a single
RDMA mr.
We also need to store these values in the qpair for later usage.

Change-Id: Iff3756fc72787a4b72a99b2bdf90bf486a8010fa
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/433196
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-11-16 15:18:41 +00:00
Jim Harris
e0b669312a spdk_tgt, vhost: move vhost libraries earlier in SPDK_LIB_LIST
Upcoming changes will use --whole-archive on all libraries.  This
introduces some issues with the shared library builds, although
it's not entirely clear why these issues don't occur today.

vhost depends on both scsi and bdev - but for the spdk_tgt and
vhost application Makefiles, vhost is listed later than scsi
and bdev.  It's best practice to list the libraries in order
of dependence - at least until we add dependencies to the shared
libraries themselves.

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

Reviewed-on: https://review.gerrithub.io/433356
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2018-11-16 08:57:16 +00:00
Jim Harris
bf7f87cecd build: remove blobfs, blob and blob_bdev from app SPDK_LIB_LISTs
blob and blob_bdev are already included via the lvol bdev module
dependencies in mk/spdk.modules.mk.  This patch adds blobfs there
too.

These changes are needed for some upcoming patches which will
apply --whole-archive to all libraries linked into the application.
That patch will require that we never include the same library
twice.

Shared library builds *require* that blobfs be listed before
blob on the link line, hence adding blobfs here even though it's
not technically associated with a bdev module.

We can also simplify spdk.modules.mk while we're here - just
filter out bdev_lvol to disable lvol for applications like
blob_cli that need to disable it.

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

Reviewed-on: https://review.gerrithub.io/432916
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2018-11-16 08:57:16 +00:00
Paul Luse
66e2476559 bdev/passthru: unregister IO device in vbdev destruct callback
Same sequence used in recent crypto module fixes.

Change-Id: Ic5f714e91cf871bce35b0e8fe3e32ae42157e6de
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/433383
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2018-11-16 07:47:55 +00:00
Piotr Pelplinski
8fb123553a histograms: add unit tests for histogram merge
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I36eed5fdd593eb3df15859a3e29c600be0913899

Reviewed-on: https://review.gerrithub.io/432559
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-11-15 23:03:26 +00:00
Piotr Pelplinski
a3f7d8aa4d histograms: add function to merge histograms
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I75f737a7e0a5490eeb183e6fa922fa8e17d30268

Reviewed-on: https://review.gerrithub.io/432558
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>
2018-11-15 23:03:26 +00:00
Pawel Wodkowski
84c168fa65 pkg: add spec file for RPM package build
This spec file build following packages:

x86_64/spdk
  Base SPDK package - all apps intalled by `make install`
  - spdk_* applications
  - shared libs in libs64 dir

x86_64/spdk-devel
  SPDK development package:
  - header files
  - static/shared libs

x86_64/spdk-debuginfo
x86_64/spdk-debugsource
  These two are autogenerated by rpmbuild

no_arch/spdk-tools:
  SPDK tools package:
    scripts/rpc.py -> /usr/sbin/spdk-rpc
    scripts/spdkcli.py -> /usr/sbin/spdk-cli

no_arch/spdk-doc: optional, generated when adding '--with doc'
  SPDK html doc package:
    doc/output/html/ -> /usr/share/doc/spdk/html

Change-Id: Ice107a7d014a6b63b2946a557e3ca7be5e486c03
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/424973
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-11-15 21:56:26 +00:00
Seth Howell
be5d98000f test: adjust scripts for 01.org qat driver
Change-Id: I1cf9d27d05f09c199ef35066f2e62480025d3feb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/433185
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: Jim Harris <james.r.harris@intel.com>
2018-11-15 20:08:16 +00:00
Changpeng Liu
d49bbbf053 nvme: add extended reservation data structure definition
Rename some fields to let the name is consistent with
specification.

Change-Id: Ie63fb69465f1448a8ffbb99eaa8f356371fa4af1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/432972
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-11-15 18:18:03 +00:00
Ben Walker
3c98150821 thread: Update unit test to use new threading logic
No longer override the send_msg implementation.

This updates ut_multithread.c, which has minor ripple
effects into bdev_ut.c. But that unit test is otherwise
unchanged.

Change-Id: I2fd30a1010bdff0a810d376d985ab1b8a2b22fb9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/424262
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>
2018-11-15 18:17:34 +00:00
Ben Walker
d761ddbf57 thread: Message passing now handled internally within a thread
Move the message ring and the polling into the thread
itself.

Change-Id: I5bc53c68bb1314fd69ed80cc98c5b86ce8be880f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/423768
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-15 18:17:34 +00:00
Paul Luse
0949668118 bdev/crypto: prevent duplicates from being added to global name list
Picked up from recent update to the passthru module.

Change-Id: Ie7404e5aadda6691b15020adbbc1e1f4c23d0a12
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/433384
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-11-15 18:05:44 +00:00
Jim Harris
f3d7215681 thread: print dev->name in error messages
All io_devices now have an associated name - so add
that name to relevant error messages to help with
debugging.

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

Reviewed-on: https://review.gerrithub.io/433203
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-11-15 17:49:51 +00:00
Seth Howell
b15ecfad85 scripts/vagrant: add the ability to specify the nvme file.
This is necessary to enable multiple VMs to run in the same physical
system since they each need a unique backing nvme drive.

Change-Id: Ie2d3aa9604533b4d39932e1f68cb977bafdb7ab4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/432202
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-11-15 17:09:04 +00:00
Seth Howell
faad3cd7bf scripts/vagrant: specify the provider in vbox directory
A simplification for machines that support multiple providers.

Change-Id: Iaa3c6eded84f8d1e750ccace49c3f85f54d12df7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/432201
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-11-15 17:09:04 +00:00
Seth Howell
9c3b481b5a test: update timing flags for vhost initiator
The timing flags in virtio.sh were configured improperly and were
preventing the timing graph from generating. Also, the vhost initiator
tests should be reported under the same timing flag.

Change-Id: I2a4b755ba98c2064e64e38609936d2f5144464cb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/430971
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-11-15 17:08:10 +00:00
Seth Howell
1d9be84bfd nvmf/rdma: change the default buffer size.
Having the buffers be the same size as the maximum xfer size doesn't do
us any favors. Make these buffers a ratio of the maximum transfer size
and the number of supported nvmf SGLs.

Also configure the number of nvmf request iovs to correspond with this
new ratio.

Change-Id: I3147dcd86b599c74521ebfdf3bcdbcdee8871a3a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/428747
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-15 08:17:39 +00:00
Ziye Yang
6134d778d4 conf: Transport should be explictly configured in conf file
According to the currrent logic, it should be explictly defined
in the configuration file if the NVMe-oF target is started by
configuration file without using rpc calls. If no transport is
defined, we do not need to parse the following subsystems
but should terminate the NVMe-oF target .

Change-Id: I2e2db8406a30a9bf7e54d38f8d08a8d92ef158c9
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/432376
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-11-15 04:49:08 +00:00
Jim Harris
38259b9982 reduce: generate uuid if user doesn't pass one
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I29a68cac0c2ace3db65e684c36d1512ce72078ac

Reviewed-on: https://review.gerrithub.io/433086
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-15 01:03:26 +00:00
Jim Harris
0c6b87b7db reduce: add spdk_reduce_vol_get_uuid
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ied2ec966f470e135adbe29244a954c8a30672210

Reviewed-on: https://review.gerrithub.io/433085
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-15 01:03:07 +00:00
Jim Harris
fba24e2fdb reduce_ut: add test for null backing_dev fn_ptrs
Ensure in init_failure() that even after we generate
a UUID, the init still fails since the backing_dev
function pointers are still NULL.

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

Reviewed-on: https://review.gerrithub.io/433084
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-15 01:02:46 +00:00
Paul Luse
df79ac6891 bdev/crypto: unregister io_device on failure in examine callback
In vbdev_crypto_examine() we were failing to unregsiter the io_device
in the event that spdk_vbdev_register() call failed.  Found via
inspection.

Change-Id: I73c6c0c5693777b93c1ea02dcf2e2e65d46fe27d
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/432933
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-11-14 23:16:16 +00:00
Paul Luse
7be14ffa98 bdev/crypto: unregister io_device on failure in RPC create
In create_crypto_disk() we were failing to unregsiter the io_device
in the event that spdk_vbdev_register() call failed.  Found via
inspection looking into a CI failure however this potentially could
have caused that failure as well (I don't think so though, there
were no prints in the log that it followed this path).

Change-Id: I7085c4e25665a5a15def38d6726d519731b7e44e
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/432932
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-11-14 23:16:16 +00:00
Paul Luse
d2677013f9 bdev/crypto: respect return value of vbdev_crypto_claim()
Found via inspection while invetigating a CI failure. In
vbdev_crypto_examine() we were not looking at the rc from
vbdev_crypto_claim()

Change-Id: I8be09b5844e18e35b95f19e378fe280323d183fa
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/432930
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-11-14 23:16:16 +00:00
paul luse
197998ede3 dev/crypto: unregister IO device on vbdev delete
The io device was previously not being unregistered, this looks
like the root cause to several recent CI failures in the bdev
JSON tests that use RPC to create/save/clear/load configs.

Change-Id: Ia77ed9fe230c79188d8d862e98b17581ae81b31f
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/433194
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-11-14 23:16:16 +00:00
Jim Harris
61385feeac thread: print error for io_devices at lib fini
All io_devices should be unregistered before the
application exits.  If not, print an error message
for each io_device that still exists.

Eventually we may want to assert() if any io_devices
are found, but for now we'll just stick with the
error message.

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

Reviewed-on: https://review.gerrithub.io/433202
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-11-14 20:29:14 +00:00
Jim Harris
c6d403e92d thread: print error if channels exist on thread free
Eventually we may want to assert if any channels still
exist when the thread is freed, but for now we'll just
stick with the error message.

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

Reviewed-on: https://review.gerrithub.io/433201
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-14 20:29:14 +00:00
Jim Harris
8c50e8c106 test: handle align=0 in test_env spdk_malloc
DPDK treats align=0 as effectively align=8.  But the
test_env spdk_malloc uses posix_memalign and passes
the align as-is.  posix_memalign requires a non-zero
align parameter however.  So change the test_env
implementation to match DPDK.

This fixes libreduce unit tests, since it does some
allocations with default alignment.

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

Reviewed-on: https://review.gerrithub.io/433083
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
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>
2018-11-14 09:58:18 +00:00
Ben Walker
08d36a55f9 thread: Make the thread internally manage pollers
The user of the thread library is now only responsible for
periodically calling spdk_thread_poll. Pollers are handled
internally.

In order to avoid changing all of the unit tests, the ability
to provide function pointers to change the behavior of
the  poller registration is still in the code. This should
only be used from tests until they are all converted.

Change-Id: Ie2c00ce1d57ca3710ed2c469cd711924768e23ef
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/417784
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-11-13 14:26:37 +00:00
Ben Walker
4e3cc6e1de nvmf: Change max_delay_us to 0
This sets the maximum tolerated additional latency
on an I/O, which potentially allows a thread to
sleep and save power. However, today if a poller
is registered on the thread it will never sleep,
which is always true for the nvmf_tgt.

Further, if this were fixed such that the thread could
sleep as long as the pollers all reported idle, this
max latency ends up breaking the QoS test because the
service provided is more than 10% away from the target
number.

Change-Id: Ic9decbd92ad4e0c19eb81eea18a59207d6028367
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/432497
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-13 14:26:37 +00:00
Ed rodriguez
9ba446a25c test: Add support to configure ipsec git repo
Also make ipsec configuration and install optional
  in pkgdep.sh.

Change-Id: I0c973398cebce0f50c704b21f6397e8d996ba9f9
Signed-off-by: Ed rodriguez <edwinr@netapp.com>
Signed-off-by: John Meneghini <johnm@netapp.com>
Reviewed-on: https://review.gerrithub.io/432424
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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-11-12 22:27:35 +00:00
Darek Stojaczyk
b3db2a65ea vfio: don't use VFIO when IOMMU is disabled
Previously we used VFIO if only the vfio-pci kernel module
was loaded, which is different from what our setup.sh script
did. On a fairly usual system configuration, setup.sh could
have bound devices to UIO, but SPDK would still try to map
memory to an (empty) DPDK VFIO container just because its fd
was available. That would fail obviously.

setup.sh checks for IOMMU presence in order to use vfio-pci
and SPDK should probably do the same. We could check the
kernel driver of each attached PCI device, but there's no
chance right now of supporting both UIO and VFIO devices
at the same time with IOMMU passthrough. That's not
a reasonable configuration anyway. To keep things simple,
we just add a single check on vtophys initialization.

Fixes #462

Change-Id: Ica653f117743be322291a1b7e37ed00e34ef5035
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432518
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <wuzhouhui@kingsoft.com>
2018-11-12 22:24:34 +00:00
Jim Harris
cfc372c2ec reduce: write path of pm file to backing dev
Write pm filepath first to offset 4K.  Then write
the super block to offset 0.  This ensures the backing
device isn't really valid until both are written
(avoiding the case where the super block got written
but not the path.)

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

Reviewed-on: https://review.gerrithub.io/432505
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <spdk-ci.pdl@broadcom.com>
2018-11-12 22:23:44 +00:00
Jim Harris
b4f9dd1a17 reduce: write metadata to backing_dev
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaccb9f37d4c08aeb44719ed9bfeecfc394207d25

Reviewed-on: https://review.gerrithub.io/432504
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-11-12 22:23:44 +00:00
Jim Harris
b7623dd483 reduce: check that all backing_dev function ptrs are specified
While here, add basic implementations for these function ptrs
in the unit tests.

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

Reviewed-on: https://review.gerrithub.io/432503
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-11-12 22:23:44 +00:00
Seth Howell
b7f54bd66e app: RPC to wait for app subsystem initialization.
Change-Id: I66a9f9c1a92c8b9185a0c4c882e61b028e1da261
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/432491
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-11-12 22:21:33 +00:00
Piotr Pelplinski
17d652d720 bdev_aio: enable double buffering on write path
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I621a8a3891c8f3829564940219c70c6520c6f9c7
Reviewed-on: https://review.gerrithub.io/427899
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-12 21:56:24 +00:00
Jim Harris
807c3a2b27 iscsi: change connection messages to DEBUGLOGs
Printing messages every time an iSCSI connection logs in or
logs out/terminates is too noisy.  Make these DEBUGLOGs
instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifc1014e4f8dce414a1c4ef75ea6b6749954083cc
Reviewed-on: https://review.gerrithub.io/432606
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-12 20:15:25 +00:00
Jim Harris
0d8783cabc bdev/passthru: check early for duplicate passthru bdev names
The bdev layer will sort of check this when we try to
register the bdev, but it's better to catch this much
earlier.  That way we catch it when the name gets inserted
into the list, rather than when the base bdev appears.

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

Reviewed-on: https://review.gerrithub.io/432602
Chandler-Test-Pool: 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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-12 20:14:32 +00:00
Jim Harris
bd02b6ab4e bdev/passthru: return error code from vbdev_passthru_register
This ensures any errors get properly propagated back to the
RPC handler.

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

Reviewed-on: https://review.gerrithub.io/432601
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-12 20:14:32 +00:00
Jim Harris
72ff92381f test/json_config: add passthru to clear_config.py
This avoids "already claimed" error messages in the bdev
json_config tests, by making sure the passthru bdevs
get deleted before we create it again via the JSON
config file.

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

Reviewed-on: https://review.gerrithub.io/432600
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-11-12 20:14:32 +00:00