Commit Graph

2530 Commits

Author SHA1 Message Date
Wojciech Malikowski
64c30c0fe1 test/unit/ftl: Add module unit tests for relocate
Change-Id: Iabe45ecc7dc52d45b792a1a5b1e42bb511c13a89
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443238
Reviewed-by: Konrad Sztyber <konrad.sztyber@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>
2019-02-13 18:48:35 +00:00
paul luse
467debe382 bdev/crypto: fix unit test ASAN issue
Bug introduced when some fixes for DPDK 19.02 were added.

Fixes #659

Change-Id: I5ef9ce6a5e30591fc7d2aeaa8d398effe42888f6
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/444449
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: Seth Howell <seth.howell5141@gmail.com>
2019-02-13 18:33:43 +00:00
Jim Harris
20fba4d886 test, nvmf: remove last usages of max_delay_us
nvmf was just setting it to 0 (which is the default).
The reactor test was setting it to 1000, which wasn't
actually used since there are always pollers registered.

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

Reviewed-on: https://review.gerrithub.io/c/444307
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-02-13 16:43:18 +00:00
Jim Harris
b4df027e4e test/reactor_perf: remove use of max_delay_us
This test doesn't really need to use this - in general
we want to test max event throughput with no delays
interjected.

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

Reviewed-on: https://review.gerrithub.io/c/444306
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-02-13 16:43:18 +00:00
Jim Harris
5f7eb6e38b test: remove references to stub application
We are doing away with using the stub application as
much as possible, so let's just remove references to it
where we can.

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

Reviewed-on: https://review.gerrithub.io/c/444305
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-02-13 16:43:18 +00:00
Jim Harris
05130f2d40 stub: remove use of max_delay_us
Ben's having to work around all of the max_delay_us code
in his thread/reactor refactoring.  Once we have a real
scheduler, this whole idea will need to be rethought.  So
for now, let's get existing code off of the max_delay_us
mechanism, so that we can remove it.

For the stub app, just add a poller that does a usleep.
This will have the same effect as the current behavior.

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

Reviewed-on: https://review.gerrithub.io/c/444303
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-02-13 16:43:18 +00:00
Shuhei Matsumoto
8ad0935b81 bdevperf: Fix incorrect error detection and log for IO size
g_io_size is already verified not to be zero when args are originally parsed,
and if g_io_size < data_block_size, then g_io_size % data_block_size != 0.

So current error log is not correct and just testing if IO size is multiples
of block size will be correct.

Change-Id: I5d32425e251773f1c96740c674b4d238dfb80f8d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/444310
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-02-13 06:42:11 +00:00
Shuhei Matsumoto
3c3510a2fd bdevperf: Support DIF enabled bdevs
Extract DIF check type settings from the bdev and hold them
in the target, then generate DIF for write I/O based on them.

Change-Id: Ice85121423b6b8545e45d7def1aabed59ed6ce8e
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443357
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-02-13 06:42:11 +00:00
Shuhei Matsumoto
ee23785130 bdevperf: Enlarge data buffer to include metadata
Enlarge data buffer to include metadata if md_size is not 0 and
md_interleave is true of target bdev. Then generate and verify
data pattern by skipping metadata field.

If md_size is not 0 but md_interleave is false, return immediately
until bdev supports APIs with separate metadata.

Change-Id: Ia3c2ae5fbcc5b7612585f1dfeb5d30e821d48acf
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443356
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-02-13 06:42:11 +00:00
Shuhei Matsumoto
530ae91505 bdevperf: Factoring out construct task on target operation into a function
The possible reason of failure of task construction is out of memory.
Hence it's OK to return pointer to the constructed task simply.

Change-Id: If6e270caefb61192c8f0055506d957c3c5d07016
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443355
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-02-13 06:42:11 +00:00
Shuhei Matsumoto
fdf7e1bcb2 bdevperf: Factoring out construct target operation into a function
Bdevperf have returned immediately if -ENOMEM, continued if failure
due to other reasons, and registered the created target otherwise.

So, keep this behavior by passing the reference to the pointer to
struct io_target, and check both return code and the value of the
reference.

And this refactoring will clarify the logic related with target
assigment to cores.

Change-Id: I24593f7b4523daf4395643bdc8886499c36ea3c7
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443354
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-02-13 06:42:11 +00:00
Seth Howell
b7651b681c NVMe-oF: add asserts for SGE counts
We should never be going over these limits in the respective transports,
but add asserts to check this during testing.

Change-Id: Ifcaa82ccf58546a38020b31df54ee5d1d9822b8b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442777
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-02-12 23:34:20 +00:00
Wojciech Malikowski
0699216fac ftl: extended nightly tests
Change-Id: I8dc3e895f6b360f3ad81f157db502dd58629c5e6
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442878
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-02-12 19:45:17 +00:00
Seth Howell
b6b0a0ba59 rdma: adjust I/O unit based on device SGL support
For devices that support fewer SGE elements than our default values, we
need to adjust the I/O unit size so that we don't ever try to submit
more SGLs than we are allowed to.

Change-Id: I316d88459380f28009cc8a3d9357e9c67b08e871
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442776
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-02-12 18:46:57 +00:00
James Bergsten
0c93fc7330 scripts:Fix Python errors in checking scripts
Python3 (3.6.7) gives W605 errors in regular expressions, causing the
SPDK style checks to fail on the Python scripts doing the style checking.

This fix allows these Python scripts to run without errors.

This is a known issue - see https://github.com/PyCQA/pycodestyle/issues/814

Change-Id: I71cdff5d6c89e19b200c989f3d9da35bb4f7189d
Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443955
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-02-12 18:37:09 +00:00
Shuhei Matsumoto
14c18abb7a bdevperf: Add the prefix "g_" to coremap
Coremap is a global variable in bdevperf, and add the prefix "g_" to
it.

Change-Id: Ia22802ce2152d8748cffc6916197be4ddd615618
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/444013
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-12 17:57:25 +00:00
gila
df6b55fd8c bdev: make spdk_bdev_register_module_xxx function names predictable
Currently, the SPDK_BDEV_REGISTER_MODULE() macro uses __LINE__
to generate functions like spdk_bdev_module_register_187().

Typically, this is not a problem as these functions are not called directly
rather, they are only used as constructor functions to load the bdevs during
system startup.

There are languages however, (e.g rust) that require these functions to be
referenced explicitly to prevent them from being removed during the linking phase.

In order to reference them, having the names predictable (and potentially
changed per commit) makes things easier.

Change-Id: I15947ed9136912cfe2368db7e5bba833f1d94b15
Signed-off-by: gila <jeffry.molanus@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/443536
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-02-11 23:56:53 +00:00
Ben Walker
8abfb06e31 thread: Optionally allow the current time to be passed to
spdk_thread_poll()

This is an optimization if the calling function already knows the
current time.

Change-Id: I1645e08e7475ba6345a44e0f9d4b297a79f6c3c2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443634
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>
2019-02-11 22:58:45 +00:00
Darek Stojaczyk
1a150069e1 bdev/crypto: use rte_mempool for g_session_mp
DPDK 19.02 requires this mempool to be allocated via
crypto-specific function which returns rte_mempool.
To keep the amount of #ifs minimal, we'll use rte_mempool
unconditionally.

Change-Id: I3a09de41e237e168580bb92b574854e291e68a74
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443785
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-11 19:44:51 +00:00
Darek Stojaczyk
0b4da45dbc vm_setup.sh: add iptables dependency
We started to use iptables in patch 21bd94275
(libsock: add functional tests) but never added
the package dependency.

Change-Id: I651f2545a11f546f8b47f9759fbaed3a141f0928
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443597
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-02-11 19:23:55 +00:00
paul luse
d9d4e40dd2 bdev/compress: Add configure option and build dependencies
Includes the required DPDK dependencies for SPDK block Reduce aka
Compression.

Change-Id: Ic1ea3cbeb9373a7700f6f0c2a3194d65d6a34a41
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/429523
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-02-11 19:23:17 +00:00
Pawel Wodkowski
d08d6e129e test/ftl: limit total IO size to 256M
On VM these tests takes ages.

Change-Id: Id4799e2d226e59b430e899983a6470080b5c37dc
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443795
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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-02-11 13:29:38 +00:00
Jim Harris
45593f39d9 test: use test_env for bit_array_ut
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia02ac32beb502f2d3cbe739210619e4fd3b938d0

Reviewed-on: https://review.gerrithub.io/c/432920
Tested-by: SPDK CI Jenkins <sys_sgci@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>
2019-02-11 09:30:27 +00:00
Jim Harris
7d4684524b test: use test_env in scsi unit tests
Also remove some unneeded stubs since the thread
library is linked by default to all unit tests.

Note that the lun.c unit tests include test_env via
the new include of ut_multithread.c.  It needs ut_multithread
to simplify allocation of threads needed so that the lun.c
code can safely register pollers.

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

Reviewed-on: https://review.gerrithub.io/c/432919
Tested-by: SPDK CI Jenkins <sys_sgci@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>
2019-02-11 09:30:27 +00:00
Jim Harris
63b3b8fd8f test/unit: remove duplicate mk/spdk.common.mk includes
mk/spdk.unittest.mk already includes mk/spdk.common.mk, so it's
not needed.  This also fixes an issue where touching an included
.mk file would not trigger unit tests to rebuild if they had
this duplicated mk/spdk.common.mk include.

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

Reviewed-on: https://review.gerrithub.io/c/443980
Tested-by: SPDK CI Jenkins <sys_sgci@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>
2019-02-11 09:30:27 +00:00
Shuhei Matsumoto
96f29261d4 dif: Rename bitmask macros from SPDK_DIF_*_CHECK to SPDK_DIF_FLAGS_*_CHECK
Next patch will introduce enum spdk_dif_check_type for user to
know easily if checking DIF field is enabled or not.

This patch renames bitmask macros from SPDK_DIF_*_CHECK to
SPDK_DIF_FLAGS_*_CHECK to avoid mis-interpretation .

Using FLAGS was derived from SPDK_NVME_IO_FLAGS_PRCHK_* in
include/spdk/nvme_spec.h.

Change-Id: I89e155d047352f54091c14b9251464cd3a72a162
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/443338
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-02-08 23:37:13 +00:00
Seth Howell
7ce3117c64 test/rdma_ut: fix valgrind issue.
Recently, we started setting the list of RDMA wr in the parse_sgl
function. This meant that we started using a variable we hadn't before
which was uninitialized in the unit tests which caused a valgrind error.

Change-Id: I3f76ce1dcf95d1d41fe8b3f96e878859036a5031
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443791
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-08 18:05:25 +00:00
Wojciech Malikowski
5f959d5f0c bdev/ftl: write_config_json support
Change-Id: Ifbd2b61ef38b216a8c7071f1206c0370dbe496e6
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442980
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2019-02-08 16:35:34 +00:00
Darek Stojaczyk
06ccc49eef ut/crypto: remove internal rte_cryptodev headers
Those were added to allow us mocking DPDK functions
originaly defined as static inline. They are based on
a fixed DPDK version and currently require a lot of
effort to update for DPDK 19.02+. There's a different
way of mocking them:

> #define rte_crypto_op_bulk_alloc mock_rte_crypto_op_bulk_alloc
> static inline unsigned mock_rte_crypto_op_bulk_alloc() { ... }

This patch uses the above method to mock all static
inline functions before including the crypto source file
in crypto_ut. As a result we can get rid of the rte_
header copies from SPDK, which greatly reduces the
effort required to make crypto_ut work with DPDK 19.02.

Change-Id: I0f07a9ff4f1c63036e058dffd3fcf0c21e77bff3
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443592
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-02-07 23:40:28 +00:00
Darek Stojaczyk
1f2a1dfc6c ut/crypto: reorder some functions
In the next patch we'll e.g. move the vbdev_crypto.c
include after some of those functions, so move them
to the very top of the file now.

Change-Id: I1abaf724ea10c8c6d461663ba3be0a5a37b34f4e
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443591
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-02-07 23:40:28 +00:00
Darek Stojaczyk
76981be477 ut/crypto: align rte_crypto_op to 64B
The original struct in DPDK requires 64B alignment.

Change-Id: Ica41edbeff6b281e753107dd863aaee882cf7bed
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443590
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-02-07 23:40:28 +00:00
Darek Stojaczyk
a182010194 ut/crypto: remove g_test_dequeued_ops
The buffers are allocated and freed inside the
test suite, but aren't used for anything.

Change-Id: I341dc3315d20d15f7b571e9d18438c98a74def11
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443589
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-02-07 23:40:28 +00:00
Wojciech Malikowski
a4968634f1 test/common: spdk_mempool mock configurable element size
Change-Id: Ia93b4d7ea3ce77b8c45d34eedb5201ca5ea34688
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443248
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-02-06 17:51:53 +00:00
Seth Howell
5c97ac1636 test/nvmf: add connect disconnect test
Change-Id: I07e8ea5482537aa0bea343e935a9754d6473d02c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443060
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-02-06 17:33:18 +00:00
Seth Howell
5232a73f38 autotest_common: add waitforblk_disconnect
This is the functional opposite of waitforblk.

Change-Id: I5e9f77c9ea05b83b8dbfbf49bb3baa2ae8cc1086
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443316
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-02-06 17:33:18 +00:00
Ben Walker
63de221bf6 nvmf/tcp: Eliminate management channel in favor of poll group
The management channel was used in the RDMA transport prior
to the introduction of poll groups and made its way over to
the TCP transport when it was written. Eliminate it in favor
of just using the poll group.

Change-Id: Icde631dd97a6a29190c4a4a6a10a0cb7c4f07a0e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442432
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: Seth Howell <seth.howell5141@gmail.com>
2019-02-06 16:02:43 +00:00
Wojciech Malikowski
eccf549159 test/common: Added spdk_ring_count mock
Change-Id: Iefb4c76f2db5416d185556fa8c84a36291e72d3e
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/443237
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-05 18:02:15 +00:00
Jim Harris
d593193fd3 bdevperf: fix -S in usage message
-S takes a parameter for how many seconds to wait
between each stats output - that was missing in the
usage message.

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

Reviewed-on: https://review.gerrithub.io/c/443282
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-02-05 17:25:31 +00:00
Darek Stojaczyk
8604e568cb autotest: introduce SPDK_RUN_FUNCTIONAL_TEST
Introduced a new variable to run functional tests.
It's enabled by default, and can be manually disabled
on systems where e.g. only unit tests are run.

SPDK_RUN_FUNCTIONAL_TEST is a supplement to SPDK_UNITTEST.
The two are completely independent - both can be enabled,
disabled, or run in any combination.

The new variable is prefixed SPDK_RUN_ as it aligns nicely
with SPDK_RUN_CHECK_FORMAT, SPDK_RUN_VALGRIND, and
SPDK_RUN_ASAN, all of which control how much is tested.
SPDK_UNITTEST should eventually follow the same pattern
as well.

This gives us 2 layers of configuration:
SPDK_TEST_* <- what is tested
SPDK_RUN_* <- how it is tested

The following would run UT+ASAN for FTL and BlobFS, without
running their functional tests:

```
SPDK_RUN_FUNCTIONAL_TEST=0
SPDK_RUN_ASAN=1
SPDK_TEST_UNITTEST=1
SPDK_TEST_FTL=1
SPDK_TEST_BLOBFS=1
```

Change-Id: I9e592fa41aa2df8e246eca2bb9161b6da6832130
Signed-off-by: Seth Howell <seth.howell@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442327
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-02-04 19:19:36 +00:00
Pawel Wodkowski
48834f0daa vhost-scsi: use first free SCSI target ID if -1 specified
Fixes #328

Change-Id: I34b816a31a51d1a8aa4c61285e01d0249c283f53
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442434
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-02-04 18:16:35 +00:00
Ben Walker
a4d666fd7a nvmf: Collapse request.c into ctrlr.c
request.c didn't have much code, so let's collapse
it into ctrlr.c and make that the place where all
software emulator of the NVMe controller, including
request handling, is done.

Change-Id: Id7c98010cb222a414a5aa0b78bfb299a0ffc418f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440592
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: Jim Harris <james.r.harris@intel.com>
2019-02-04 18:11:33 +00:00
Ben Walker
1b6b6cc440 nvmf: Move spdk_nvmf_ctrlr_process_io_cmd into ctrlr.c
Previously, all I/O commands were implemented by simply
passing them to the bdev layer. Now, some I/O commands will
be emulated. Prepare for that by moving the code for this
function to ctrlr.c, where the emulation will occur.

Change-Id: Id34e5549e5ce216d602fb347b4506fbd324eed4e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440591
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: Jim Harris <james.r.harris@intel.com>
2019-02-04 18:11:33 +00:00
Ben Walker
2b59852b65 nvmf/tcp: Rename nvme_tcp_qpair to spdk_nvmf_tcp_qpair
Naming consistency.

Change-Id: Ia044a41fa9939c17b52d306c2a053ffc56f03d56
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442441
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-02-04 16:24:00 +00:00
Shuhei Matsumoto
326d4eb504 ut/vbdev_lvol: Replace local json mocks by json_mock.c
Change-Id: Ia1700d7e4e9c37af557048d6bc658c42e6f31673
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/442937
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: Ben Walker <benjamin.walker@intel.com>
2019-02-04 07:08:04 +00:00
lorneli
0744f10860 bdev/gpt: support parsing secondary partition table
Modify existing code of parsing primary partition table to support parsing
the secondary.

Main difference of these two tables is that they have inverse buffer layout.
For primary table, header is in front of partition entries. And for secondary
table, header is after partition entries. So add helper functions to extract
header and partition entries buffer region from primary or secondary table
based on current parse phase.

Split the exported funtion spdk_gpt_parse into two functions spdk_gpt_parse_mbr
and spdk_gpt_parse_partition_table. So spdk_gpt_parse_partition_table could be
used to parse both primary and secondary table.

Change-Id: I7f7827e0ee7e3f1b2e88c56607ee5b702fb2490c
Signed-off-by: lorneli <lorneli@163.com>
Reviewed-on: https://review.gerrithub.io/c/441200
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-02-01 14:53:40 +00:00
Pawel Niedzwiecki
2240a8b2ef test/nightly: Add tests to RUN_NIGHTLY_FAILING.
Test case in blockdev.sh is causing nightly tests to fail
so put it back to nightly_failing list.
Put vhost read-only test on the list to check if it passes
on qemu 3.0.0. Bring back vhost live migration test since it
is missing vhost.sh.

Change-Id: Ic8b5341808cdf843850d22fb6a22a64e92dccafa
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/436840
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-02-01 13:16:35 +00:00
Tomasz Kulasek
470a13301c test/unit/app_ut: fix potential leak of memory
This patch fixes potential memory leak in spdk_app_parse_args() when
white or blacklist of devices is defined.

Change-Id: Ia586d77c67dbe6c664447f8431e1a7a30d624ae1
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/440982
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: Ben Walker <benjamin.walker@intel.com>
2019-02-01 12:38:31 +00:00
Karol Latecki
5305a49593 test/iscsi: fix ext4test nightly
iSCSI target node was not deleted after error injection test.
Later in test this caused iscsiadm to connect to both EE target node
and to split nvme target node as they shared the same IP:PORT pair.

512MB malloc was too small to fit in spdk sources and compilation
products.

Fixes #642

Change-Id: I3d8ac6e1837cddad570f95263d3c6f529e64d5d8
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442867
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-02-01 11:34:35 +00:00
Jim Harris
ab696ae1cf bdevperf: remove extra blockdev_heads_destroy() in failure path
The stop handler already calls blockdev_heads_destroy(), so we
don't need to call it if bdevperf_construct_targets_tasks()
fails.  Calling it twice actually results in double-frees and
other types of memory corruption.

Fixes #592.

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

Reviewed-on: https://review.gerrithub.io/c/442628
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: Changpeng Liu <changpeng.liu@intel.com>
2019-01-30 06:37:49 +00:00
Liu Xiaodong
a206234d09 lib/trace: add trace_record tool
trace_record is used to poll the spdk trace shm file
and store new entries from it to another specified trace file.
This could help retain the trace_entires from the overlay of
trace circular buffer

Note:
* trace_record reads the input tracefile into a process-local
memory and writes trace entries to the output file only at shutdown.
* trace_record can be shut down on SIGINT or SIGTERM signal.

A usage sample is:
./spdk_trace_record -s bdev_svc -p <spdk app pid> -f trace.tmp -q

Change-Id: If073a05022ec9c1b45923c38ba407a873be8741b
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/433385
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-01-30 06:36:25 +00:00