Commit Graph

6513 Commits

Author SHA1 Message Date
Ben Walker
6dbcb89317 nvmf: Correctly enforce subsystem listener access control
Connections to a subsystem may only originate on listeners
that have been explicitly allowed for the given subsystem.

Change-Id: Ib575a5803cc7af75c15d1a2c76b9866594e7a1db
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/425024
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-03 16:12:31 +00:00
Ben Walker
ff628417b7 test/nvmf: Correctly add listeners to subsystems in rpc test
A subsystem cannot accept a connection on a listener
until that listen address has been added to the subsystem.

Change-Id: I5ae290d8e763ad077ce3dbda2462362ff91ba160
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/425300
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-10-03 16:12:31 +00:00
Pawel Wodkowski
c4fee1e970 mk: don't use '-include spdk/config.h'
Each file that need to check SPDK_CONFIG_* options need to include
spdk/config.h explicitly.

Change-Id: If9f2a91ac4c2b1a300dcf88ec3e2a12714ad344a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/427221
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-02 23:13:32 +00:00
Pawel Wodkowski
c5467556f0 mk: move config.h to include/spdk directory
We need to include it in devel package.


Change-Id: I823200632e8bcb9fdb86c8cb5fbf3a651a710b78
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/426839
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-02 23:13:32 +00:00
Ni Xun
b9f63009f3 nbd: add support for io_wait implement in nbd
according to commit:
     bdev: add spdk_bdev_queue_io_wait
This patch will make io_wait to support nbd

Change-Id: I9c8a6f5d20afbada45cedffe9d49846a992d2581
Signed-off-by: Ni Xun <nixun@baidu.com>
Signed-off-by: Li Lin <lilin24@baidu.com>
Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/425594
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-10-02 22:36:01 +00:00
Shuhei Matsumoto
bb75b28fe4 nbd: Refactor the function in which the fix of scan build error is added
Consolidating multiptle reinsertions into a place will make the logic
a little cleaner.

Change-Id: Iab7e9f8e7dcdebbec9d51e151b1d838567c1dcc4
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/427441
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-10-02 22:36:01 +00:00
Shuhei Matsumoto
e1e9b05e9e nbd: Fix scan build failure
This patch fixes the following scan build failure.

nbd.c:697:6: warning: Use of memory after it is freed
        if (io->state == NBD_IO_XMIT_RESP) {
            ^~~~~~~~~

Change-Id: Icba8b509604b064bff36d6ef63ecf02617ad7666
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/427366
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-10-02 22:36:01 +00:00
Seth Howell
317b9a5324 test/nvmf: watiforblk in shutdown test
In newer versions of the kernel, there is a race condition that causes
the kernel block layer to mess up if an nvme-oF subsystem is
disconnected before it is fully removed. This can cause the shutdown
test to hang during a sync call aftr nvmf tgt shutdown. see:
d1ecb02290.1537982067/fedora-06/build.log
for details.

This problem has been observed and fixed in the RPC tests also.
https://review.gerrithub.io/c/spdk/spdk/+/426772

Change-Id: I9ec8517e067448be323e69979adf5d3915195c80
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/427152
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-10-02 22:25:12 +00:00
Pawel Niedzwiecki
5efc71b5aa test/vhost: Fix VM timeouts during shutdown
Change system manager timeout for stopping services.
Lagging services cause timeouts during shutting down VM.

Change-Id: I7428724cf8795ffe3c215bacdb56cb3f58fbdff0
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/427715
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-10-02 22:22:33 +00:00
Pawel Niedzwiecki
cf5dffe19e test/spdkcli: Add a match file and match comparison to nvmf test
Change-Id: I555abe8500547be81ca5a6566539dae7c8d7e690
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/427244
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-10-02 22:14:43 +00:00
Pawel Kaminski
9d0486abb7 test/spdkcli: Add nvmf tests
Change-Id: Idf6dd895033393858e49a494f8aac67b8034c67d
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/423650
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@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>
2018-10-02 22:14:43 +00:00
Pawel Kaminski
b6e130e98f spdkcli: Add nvmf support
Add create/delete/get methods from nvmf subsystem to spdkcli.

Change-Id: Id1f4e539d14746c4d6108bb58df921c301d47e96
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/423425
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@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>
2018-10-02 22:14:43 +00:00
Karol Latecki
c7917f2252 scripts/autotest: print short info for setup.sh cleanup and status
Print shorter output about unsupported option instead of
printing full "usage" text.

Change-Id: I92a98b0bdf0b2ed9ac56da644f24777f76e7df29
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/426471
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: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-10-02 22:10:32 +00:00
GangCao
7d030ef7fc QoS/Bdev: add the QoS related structure and enumeration
This patch is to introduce the specific QoS related structure
and the enumeration for types of QoS rate limits. Later new
types of QoS rate limits can be supported easily.

Change-Id: Idb8d2e7627fd145bf2b0ddb296c968b6b068f48c
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/424459
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-10-02 22:10:13 +00:00
Pawel Wodkowski
ae2b2f64ea log: add a way to turn on and off stack unwinding in logs
As a side effect, if SPDK_LOG_DISABLED is used in spdk_log() as log
level then no message will be printed.

Change-Id: I2d57b60a5a310a9ef2a1187a81088d0acf828742
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/425105
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-10-02 22:09:27 +00:00
Vitaliy Mysak
86bd269efd doc/vagrant.md: fix inaccuracies
There were some innacuracies in vagrant documentation,
 such as typos, incorrect versions and incorrect names.
This commit fixes them.

Change-Id: Ibe01f24c43bc105a19b27b81cea771c6711af7c5
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/427023
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-10-02 22:08:32 +00:00
Seth Howell
30974c72ed test/common: change branch of nvme-cli
Update the branch to point at our code rebased on the most recent
mainline release of nvme-cli. This branch includes fixes for
compatibility with gcc 8.

Change-Id: Ie1bdb046d1e24e832bda585dd9841619451ec5f5
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/426985
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2018-10-02 22:08:12 +00:00
Seth Howell
b7ceb7508f scripts/vagrant: Add fc28 image and update docs.
Keeping consistent with the distributions we support in the build pool.

Change-Id: Iec13686507f890e9e18ecd5a1f4f238b2370f1d7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/427161
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-10-01 16:15:22 +00:00
Seth Howell
6695ac2797 scripts/vagrant: Enable test machine deployment for fedora
Allow the option to run vm_setup.sh during provisioning on a fedora
system. This is one step closer to fully automating the setup of a build
pool test machine.

Change-Id: Ia3965b31e0a9217d176ffe3c165b8eb6b3ccad13
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/426946
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-10-01 16:15:22 +00:00
Seth Howell
80bf04e6ad scripts/vagrant: Make rsyncing spdk directory optional
For some use cases (e.g. creating a test pool vm), we won't want to
rsync spdk from the host, and instead will want to clone a new one from
scratch.

Change-Id: I4c27f8ffc6c04aa0901dfe5b536b7e6ba94f7693
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/426945
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-10-01 16:15:22 +00:00
Seth Howell
f1b3df73b6 test/common: Configure repo locations inline in vm_setup
This allows a userto run the script without specifying a configuration
file. Removing this dependency opens us up to things like calling
vm_setup directly from a vagrantfile without having to first copy the
spdk source over.

Change-Id: I72074a445f8befc714c03cab57a2da539350c092
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/426944
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-01 16:15:22 +00:00
paul luse
7bcdc55926 crypto: Use bulk API to return mbufs and crypto ops in poller
Performance testing shows much better CPU scalling with FIO as
DPDK will no longer take multiple locks with each loop.  Instead,
just 2 at the end to perform the bulk returns.

Change-Id: Ie4d556264302f01c2a9498be83b7bccbaf16b287
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/427158
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-10-01 15:55:36 +00:00
Karol Latecki
ad06d03a86 scripts/spdkcli: override configshell init
Override configshell constructor to allow command paramaters to use
whitespaces and quotes.

"This patch will be obsolete once
https://github.com/open-iscsi/configshell-fb/issues/46 is fixed."

Change-Id: Ia5f883991b031901be7dadf61cbe7ebdcf5a9cb7
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/426037
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-01 15:04:05 +00:00
Chunyang Hui
99ca58e082 NVMe: Add support for security send/receive command
Change-Id: I61f6a8fac4938d6af3ac6c84bcf11f99036ed856
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/426657
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>
2018-09-29 03:13:55 +00:00
Shuhei Matsumoto
6fa7e38667 bdev: Avoid assert and factor out queue IO operation in _bdev_write_zero_buffer_next
Currently write to bdev fails in _spdk_bdev_write_zero_buffer_next
due to other than -ENOMEM, assert is called.

RAID bdev using this feature is generally availale now and it will be
OK to remove this assert and return error instead.

Additionally, applying the factored function to _bdev_write_zero_buffer_next
will improve readability slightly.

These two changes are done in this patch.

Change-Id: I462630a71e57e2e5146b085b215d62a378ea9402
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/427186
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-29 03:12:24 +00:00
Shuhei Matsumoto
9d4708f35e bdev: Factor out queueing IO operation in _spdk_bdev_io_split
This patch factors out that operation into a function and adds
error handling to that operation to improve readability slightly.

Change-Id: Ic24df0c0a9abbebc38d30fc17779dc5a5f6138a6
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/427026
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2018-09-29 03:12:24 +00:00
Shuhei Matsumoto
9872b99206 bdev: Avoid assert when read/write to bdev fails in _spdk_bdev_io_split
Currently when read/write to bdev fails in _spdk_bdev_io_split_with_payload
due to other than -ENOMEM, assert is called.

RAID bdev that utilizes the split IO feature is generally availale now
and it will be OK to remove this assert and return error instead.

Change-Id: I6ea6fd45b94bff0ea84e498e0c4dfd1dd31e0260
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/427025
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-29 03:12:24 +00:00
Shuhei Matsumoto
3c7894ffff ut/bdev: Prepare test code for submitting batched split I/Os
Current test code works only for sequential split I/Os. The next
patch will support submitting batchedsplit I/Os.

Prepare test code as a separate patch to make review easier.

Change-Id: I05b732c9a656ecab74a2594bf50ddf42eb41584e
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/425877
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-09-29 03:12:24 +00:00
Shuhei Matsumoto
0df515a842 bdev: Remove limitation of child iov size in bdev_io_split_with_payload()
When a bdev IO is split, if iovec size in a strip is more than 32,
the IO will fail.

Remove the limitation by spliting the split IO further.

Change-Id: I962ad86dfe63ea1fcd86ffa52ead7452fb80e53d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/425876
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2018-09-29 03:12:24 +00:00
paul luse
ff852667f8 crypto: Build QAT module when crypto is enabled
Didn't enable this in initial patch, probably could have, but we
need it for performance testing now and will need it to start getting
the hardware into CI.

Change-Id: I688cc94713146380933e5cddd7ed5b2d168c1fb2
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/427274
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-09-28 20:21:49 +00:00
paul luse
b5c5d14506 crypto: add error handling to claim function
When adding RPC support, did some refactoring and totally missed
error handling in the claim function.  This patch adds it.

Addresses github issue #445≠

Change-Id: Ie2df279af7bfa3660a4a9fe2fd8bcbf7b5fd07fd
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/427170
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-09-28 20:21:02 +00:00
paul luse
6de9698dec crypto: gather loop condition variables into one spot in _crypto_operation
Readability changes in _crypto_operation() as suggested in a previous
review.

Change-Id: I8e71be297ae42d78e5c98302838625b80f319848
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/426598
Reviewed-by: Jim Harris <james.r.harris@intel.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-09-28 19:35:57 +00:00
paul luse
18aeb14fe0 crypto: fix file permissions
Somehow I ended up with x permissions on some source files,
maybe copied them to a windows box or something, don't know..

Change-Id: I2c40d9fa0094a3ae56332ce165750f1fcc644b15
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/427276
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-09-28 18:50:16 +00:00
Darek Stojaczyk
f08a6eebd3 vhost: don't lock global vhost mutex when waiting for device start/stop
This fixes a potential deadlock:

Thread 2
 * stop_device()
   * lock(&g_spdk_vhost_mutex)
   * _spdk_vhost_event_send
     * sem_wait <- waiting for pending I/O on Thread 1 to complete

Thread 1
 * spdk_rpc_construct_vhost_blk_controller
   * lock(&g_spdk_vhost_mutex) <- prevents this thread from
                                  completing any I/O

Fixes #437

Change-Id: I50ab7bc6dcd161881650ff30362127e0069a3939
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/396577
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-09-28 18:46:11 +00:00
Karol Latecki
0f25ee9750 test/vhost: reduce size of created raw disk file
Reducing as a preparation for running vhost iniator tests
on Vagrant VMs as they do not have sufficient space for
this kind of test.

Change-Id: I20a8c3c4b1b547599be5c10e1935213f512e4c21
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/427020
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-09-28 18:43:42 +00:00
Karol Latecki
2aaaff5ee8 scripts/vagrant: allow adjustable nvme img size
Allow specifying size for created NVMe image file.
Default is 1024M but some tests suites (vhost_initator
for example) need more.

Change-Id: I4bf7a5241a0e9c2320cd473b1787c0be25d9a8e4
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/426068
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2018-09-28 18:43:42 +00:00
Karol Latecki
f2d9e5144a scripts/vagrant: automate vhost test VM creation
Enable users to automatically create VM image dependency
needed to run vhost tests.

Current state of Vagrantfile_vhost_vm is only valid
for Ubuntu 16.04 and 18.04.

Change-Id: I9cdf46c1db7fcd55cfda0dd7db7ff5570610c5ee
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/422948
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-09-28 18:43:42 +00:00
paul luse
369719c26b crypto: move PMD driver input validation to common function
Previously was only checking the crypto driver name in the conf
file parsing and not when it came in via RPC so a bogus name
could result in nasty stuff.  Moved the check to the common
function used by both paths so a bad name will fail gracefully.

Addresses github issue #444

Change-Id: Id881d9d448d0bb6935162484154964a1d5d59a0b
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/427164
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-09-28 18:43:04 +00:00
ChenWang01
4db5688e32 test/nvmf: No longer use construct_nvmf_subsystem method
Use nvmf_subsystem_create method instead.

Change-Id: I8d7306b064d98ab0df02ea9d95e56a44c665cc2c
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/427018
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: Jim Harris <james.r.harris@intel.com>
2018-09-28 18:41:09 +00:00
Yanbo Zhou
3bb7438e05 fio_plugin: add more information and fix a minor error for usage guide
Change-Id: I65ba8eda2bfcb442f676bc85d6a6fd952ff3389a
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/427098
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: Jim Harris <james.r.harris@intel.com>
2018-09-28 18:40:13 +00:00
GangCao
61e741efca lib/nvme: add a check for valid namespace id
When the NVMe SSD supports multiple namespaces, we
allocate the related data structures to hold the
namespace related information. Add a check of valid
namespace id before accessing the memory structure.

Change-Id: I3176099a80f718d9470ee172a040a2ccc353aae9
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/427058
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-09-28 18:36:25 +00:00
GangCao
2e2aba3927 conf: add an example of defining RAID bdev
This patch adds an example of how to define the RAID
block device.

Change-Id: Ibf902b9e96e359fce63b868c5361776b83718744
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/426854
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-09-28 18:35:19 +00:00
Darek Stojaczyk
036d923972 env/dpdk: do not clean up DPDK 18.05 shared files
eal_get_runtime_dir() that we used so far is not
available in DPDK shared libraries, so we remove
its usages in SPDK together with the functionality
of removing files left over by DPDK. Luckily for
us, this only affects DPDK 18.05, as for DPDK 18.08+
the --no-shconf option that we use prevents all
those files from being created whatsoever.

Change-Id: I078fb7686d2445a6acb067b0c3762a9c99f9a429
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/426218
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-28 18:34:55 +00:00
paul luse
e42bb743f9 crypto: Misc cleanup from final review
* fixed typo in comment
* cleanup up some current_len logic that was no longer needed
after changing to LBA as IV
* moved a few src_mbufs assignments so they are grouped together
for easier reading
* updated vbdev_crypto_io_type_supported() to positively decode
supported IO types
* updated vbdev_crypto_dump_info_json() to use json _named_* API

Re-tested with overnight bdevperf OIO 1...256 sizes 512..65536
as well as bdevio and fio (basic multi-threaded tests)

Change-Id: I86fa177927ce61d12c86d352b00d850ffa878929
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/425994
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-09-28 18:30:20 +00:00
Seth Howell
a0a92be2df test/common: parallelize vm_setup.sh
We can significantly speed up the vm_setup.sh process by installing
dependencies in parallel.

Change-Id: I424efdf6da26a7f1394fbdca1cb6129e7329fc16
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/426981
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-09-28 18:29:29 +00:00
Seth Howell
5ae7353072 test/common: remove directory switching from vm_setup.sh
By keeping the main shell in the same directory the whole time, we will
be able to parallelize a lot of the work of cloning and making
dependencies. This should significantly reduce make time to run this
script on a target machine.

Change-Id: I5efbd9c8f50b95411cbe7be69905b08df557344e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/426980
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-09-28 18:29:29 +00:00
Seth Howell
0c04c729ba vm_setup.sh: move all installations under a single command
This significantly decreases the amount of time it takes to run this
script.

Change-Id: I5424cd7c9f3caf49a529916d528c0cc3a7af8838
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/426947
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-09-28 18:29:29 +00:00
paul luse
cafd537c7d test: exercise crypto rpc calls
Most vbdevs have complete test suites that include rpc calls
to set them up and teare them down.  With crypto there's not
a lot to do w/test other than make sure it's configured and
run IO so right now that amounts to tools that use a config
(ini) file.  Adding create/delete calls here to get basic rpc
coverage in CI.

The fixes/udpates in the vbdev module and the .py files were
fixes found in enabling testing of the rpc calls.

Change-Id: I5d7d25e1c96dcf76e0055f23d27781b858e290b0
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/425875
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-09-27 22:07:02 +00:00
Darek Stojaczyk
7a6c69283a env_dpdk: always use legacy memory management
Dynamic memory management was broken in DPDK 18.05
and got fixed in 18.08/18.05.1, but SPDK still needs
a couple of patches to ensure we support it. While
those patches slowly make their way through the review
process, let's stick with legacy mem mgmt for all DPDK
versions.

Change-Id: I6a0bc7b46b28dd75bef6847dde1ef57dc60a829e
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/426817
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: Changpeng Liu <changpeng.liu@intel.com>
2018-09-27 21:58:11 +00:00
Jakub Radtke
9bb9752881 ocssd: add chunk notification log struct
This patch adds struct for "Chunk Notification Log".
New log page is used to report the state of chunk, lblk or pu.
Implementation is consistent with Open-Channel
specification (rev. 2.0)

Change-Id: I8aaf01c14d2f0faf8b8f8a6a773b6cb9bf97b38d
Signed-off-by: Jakub Radtke <jakub.radtke@intel.com>
Reviewed-on: https://review.gerrithub.io/426233
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@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>
2018-09-27 01:30:45 +00:00