Commit Graph

11268 Commits

Author SHA1 Message Date
Maciej Wawryk
58e6ef44f8 scripts/vagrant: add option to build box for spdk
New option --package-box will install all dependencies needed to build SPDK

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Iedc21812b754692a5eba87127186e11ec44d805d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/538
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-17 10:06:09 +00:00
Tomasz Kulasek
5b3c4b8783 test/nvme: nvme_rpc add test for bdev_nvme_apply_firmware
This patch introduces tests for basic RPC commands not used in
other tests:

	bdev_nvme_apply_firmware

Change-Id: I3a7aff1720108548b03d581fa7664d1ff5498be5
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/533
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:06:00 +00:00
Seth Howell
5145195533 nvme/perf: simplify variable handling in parse_args
Make the two non-global conf variables global (this will be needed when
we switch to the app framework) and only assign globals with an initial
value if that value is Non-zero.

Change-Id: I141c32cb2eb614861f62ec6a7662252a33a101ec
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/824
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:05:35 +00:00
Seth Howell
b67112368f nvme/perf: switch opt args -m and -n to -C and -P
This is preparatory to switching the application over to using the app
framework which will require us to avoid any overlap between the app arg
string and the other arg string.

Change-Id: I692d4ec9d078acfc4c28aa7b0f40c0acd7c8af12
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/756
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:05:35 +00:00
Alexey Marchuk
c29247e1fe nvmf/rpc: Destroy subsystem if spdk_rpc_nvmf_create_subsystem fails
Destroy subystem if spdk_nvmf_subsystem_set_sn or spdk_nvmf_subsystem_set_mn
failed. Check status in spdk_rpc_nvmf_subsystem_started callback, destroy
subsystem and report an error on error.

Fixes #1192

Change-Id: Id6bdfe4705b5f4677118f94e04652c2457a3fdcc
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/832
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>
2020-02-17 10:05:27 +00:00
richael zhuang
94b04d4f2c test: solve error about uninitialised data_buf
When running sock_ut in fedora29 with memcheck, there is an error
"Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised
byte(s)".

Signed-off-by: richael zhuang <richael.zhuang@arm.com>
Change-Id: Iaddb85ed2da2f45e200569c936f05174bc89c99b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/874
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:05:18 +00:00
Darek Stojaczyk
dcac8e9706 memory: reverse the order of calling mem_map unregister cb
Memory maps might be dependant on one another, so
make sure their dependencies are unregistered after
the dependees.

Change-Id: I3853dfe51bacc70d0b27976a3df9c0ae9253ebac
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/833
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-17 10:05:10 +00:00
paul luse
04f7bfe057 examples/blob/hello_world: fix a few typos
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iac7857bddbed0721d108e9f986afeab4d5911fef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/882
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>
2020-02-17 10:05:02 +00:00
Changpeng Liu
72b9af55fa blobfs: make cache_free_buffers() used for file deletion and blobfs unload
When there is no free cache buffers, we need to free some cache buffers
based on very simple algorithm for now, when deleting a file or unload
the blobfs, there must no dirty caches, there is no cache buffers after
calling spdk_tree_free_buffers(), so we will create another cache free
buffers function which only used in file read/write path.

When testing blobfs with db_bench, there maybe multiple threads will
call alloc_cache_memory_buffer() at same time, and spdk_fs_delete_file_async()
maybe called at same time, and it may release file->tree and file structure
without holding g_caches_lock, so here we will change the
alloc_cache_memory_buffer() to hold the g_caches_lock while releasing
the file cache buffers.

Fix issue #1133.

Change-Id: I115ff97113915630f539c3458c57116d9ff16179
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/668
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>
2020-02-14 09:37:45 +00:00
Changpeng Liu
2505b93862 blobfs: remove _file_read() function
_file_read() is only be called in spdk_file_read() API, and we only
need to count the children IOs sent to the backend, and skip the IOs
which hit the cache buffer.

Change-Id: I36e4a464e5810beaf30f1b580dc15ea3d3a68582
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/667
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>
2020-02-14 09:37:45 +00:00
Changpeng Liu
19d5c3ed8e rocksdb: free existing channel when allocating a new channel
ASAN will report memory leak if we didn't free the old thread context,
it's related with Rocksdb version, I didn't get this issue with Rocksdb
v5.6, but Rocksdb v5.14 and v5.18 will complain the memory leak.

Change-Id: I116cad6c1bc723a60284a5c7cf1e78d10efa9ddd
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/666
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>
2020-02-14 09:37:45 +00:00
Darek Stojaczyk
8e7d6e1b0c app: added --json-ignore-init-errors
If set, SPDK will continue loading the JSON config even if
some commands caused an error. This can be useful when loading
RPC config from spdk_tgt into e.g. bdevperf, which supports
only a subset of RPC commands and would usually fail with
"Method not found" message.

Resolves #840

Change-Id: I070fea862fd99e5882d870e11e6a28dc9d0c8ba6
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/620
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:53:02 +00:00
paul luse
7745383ab2 module/split: use correct ch when queueing IO
Was using the ch provided by submit(), needs to use base ch

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia3bdb5e4cd9f65bd65f84853ed2f5df1b26dd952
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/820
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>
2020-02-13 09:52:46 +00:00
paul luse
017f875132 module/gpt: use correct ch when queueing IO
Was using the ch provided by submit(), needs to use base ch

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4ac4ec6d4e1810ede622d3625b9c9e74b690ed8c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/819
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>
2020-02-13 09:52:46 +00:00
paul luse
223108d16e module/opal: fix use of wrong ch when queueing IO
Was using the ch provided at submit, needs to use the base ch

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I383eb418a6448b829c25da5eb2f75a9420475ca2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/817
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>
2020-02-13 09:52:46 +00:00
paul luse
dc6da12cba module/delay: use the correct ch when queueing IO
Was using the ch provided by submit, should be using the base ch

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2f49dcd62c246f72b11abd24ef4674ff529fefaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/816
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>
2020-02-13 09:52:35 +00:00
paul luse
31851b152c module/compress: use the base bdev channel when queueing IO
Was incorrectly using the channel provided by the submit function.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I97ca626906508e00959d24009017be9106a1ce60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/815
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>
2020-02-13 09:52:22 +00:00
paul luse
7b16d58b1f module/passthru: fix bug with queueing IO to bdev layer
The PT channel was used as a parameter for spdk_bdev_queue_io_wait()
when it should have been the underlying base bdev's channel.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I6c4cf32016935a20eafd565e5688ffc43b1d9533
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/790
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>
2020-02-13 09:52:02 +00:00
Seth Howell
a95a92208d doc: update system_config to include igb_uio.
This will be a useful workaround for kernels which don't support binding
NVMe drives to uio_pci_generic.

Change-Id: Idf895882c1a5adb50935083c9176b3af0ddd637e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/814
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-13 09:51:54 +00:00
Seth Howell
b4aa3074bc setup.sh: make it easier to override with igb_uio
When overriding with igb_uio you used to have to manually probe uio
before calling setup.sh. I feel this is a common enough use case that we
should check it in setup.sh directly.

Change-Id: I8a31f90bab6960eade468816ffe960820f83d2fe
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/818
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>
2020-02-13 09:51:54 +00:00
Seth Howell
615b6849b4 setup.sh: fix DRIVER_OVERRIDE behavior.
This wasn't done properly for passing the whole path to a .ko file
previously.

Change-Id: Iabfcda95537003a68f952e4e8e6bcd141d2936f7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/793
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>
2020-02-13 09:51:54 +00:00
Seth Howell
865acf38dc make: enable building igb_uio without crypto/reduce
It turns out that this driver is generally useful, not just within
the context of compress/crypto.

fixes GitHub issue #1189

Change-Id: Ieea8037a240f0302e45ce865632be29821f82a7e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/792
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-02-13 09:51:54 +00:00
Ziye Yang
17cdadf5a9 test/hello_sock: Refactor the program and add -N option
This option is used to make hello_sock can use the
designated sock implementations. We need this patch
since we will provide another uring implementation.

So better to pass the name. Otherwise if the users have
many different implementations, VPP implementation
could not be the highest priority for test.

Change-Id: Ibb3862e9e6588743ec9c01074904ed4f7c9c06a5
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/478
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-13 09:51:46 +00:00
Tomasz Zawadzki
01f2a6e0b1 test/nvmf: make check_ip_is_soft_roce() more generic
Sample output from rxe_cfg:
  Name        Link  Driver  Speed  NMTU  IPv4_addr        RDEV  RMTU
  eno1        yes   tg3            1500  192.168.100.1    rxe0  1024  (3)
  eno2        no    tg3            1500  192.168.100.2    rxe1  1024  (3)
  eno3        no    tg3            1500  192.168.100.3    rxe2  1024  (3)

Sample output from other systems rxe_cfg:
  Name  Link  Driver  Speed  NMTU  IPv4_addr  RDEV  RMTU
  ens3  yes   e1000                           rxe0  1024  (3)
  ens4  yes   e1000                           rxe1  1024  (3)

Looking at the above output, amount of columns after greping particular line
varies between systems and configurations.

Meanwhile "rxe_cfg status" is an equivalent command, but allows to add
argument that will be matched to RDEV name.

With this patch we no longer depend on awk to select columns, but instead
printout all soft roce enabled devices and grep for particular dev name.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id4483c58f0fdcef2f38abdf56257658643a3069f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/619
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-13 09:51:38 +00:00
Tomasz Zawadzki
17d9050f5f test/nvmf: remove unnecessary check for soft_roce in nvmf_lvol
It is a leftover from previous structure of this test.
Since then usage of SUBSYS_NR was removed and this part
was left unused.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia1f6f8046f82370e793182b47920b4bf4d3231a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/618
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:51:38 +00:00
Darek Stojaczyk
9ad234a121 examples/fio_plugin: don't allow starting in daemonized fio server
A nice message about not supporting fio daemon mode is
better than seeing CRC errors.

Resolves #1118

Change-Id: I274e7a053e2fa464e26a19bf2b8b76395ad40e7c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/575
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>
2020-02-13 09:51:28 +00:00
Shuhei Matsumoto
abb942bda1 lib/event: Voluntary thread termination by spdk_thread_exit()
In the reactor main loop, _spdk_reactor_run(), check if both
spdk_thread_is_exited() and spdk_thread_is_idle() return true,
and if they are true, then remove it from the queue and call
spdk_thread_destroy() to delete it.

By previous patches, the exited thread does not accept any
new message or poller, all pending messages are processed, and
all unregistering pollers are completed. Hence we only need to
have very simple check in the reactor main loop.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib678245de98a5c050843e6435026bdcf8b6c75c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/507
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
e038e096e3 lib/thread: Fail spdk_thread_exit() if thread has active I/O channel
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

The comment in the header file has already said that all associated
I/O channels must be released before calling spdk_thread_exit().
This patch actually checks if it is satisfied in spdk_thread_exit().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I56ac50b561c6ca91d3dc2d60c21c8d91d38f081b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/823
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
648d6cd5dd lib/thread: Fail spdk_thread_exit() if thread has any registered poller
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

Change spdk_thread_exit() to return -EBUSY if the thread has any
registered poller. We enforce all pollers including paused poller
are unresitered before the thread is marked as exited.

By this change, a bug was found in reactor_perf test tool. Fix it
by adding spdk_poller_unregister() and add the g_ prefix to avoid
future potential errors.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If7f40357c9a6f4101b3998ea0da3cc46cc435031
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/487
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
70ec72871e lib/thread: Fail spdk_thread_exit() if thread is already exiting
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

Change spdk_thread_exit() to return -EINVAL if the thread is already
marked as exited.  This will be helpful to detect wrong call sequence
of voluntary thread termination.

Besides, update reactor shutdown and unit test framework shutdown
to incorporate this change accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2296c61e273bf4d9580656dcbc2da0e8a8f3bcf7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/671
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
1e98e82051 lib/thread: Stop new poller and reap unregistering poller after thread is marked as exited
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

One of the subsequent patches will allow thread to exit only if
all of its pollers are being unregistered.  After the thread is
marked as exited, only unregistering pollers will remain if the
exited thread does not accept registering new poller.

Hence in this patch, we change spdk_poller_register() to fail if the
current thread is marked as exited first.

Then, in subsequent patches, if we remove break from poller
processing in spdk_thread_poll(), poller unregistration of the exited
thread will complete, and we will be able to support voluntary thread
termination easily by checking only the thread is exited and idle.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5b843a07049ef01a5ff402eb521e294182ce2ae2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/822
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
13595495a1 lib/thread: Stop new I/O channel after thread is marked as exited
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

By the last patch, the asynchronous release of I/O channel will
complete even after spdk_thread_exit() because pending messages will
be reaped.

Then this patch stops new allocation of I/O channel after
spdk_thread_exit().

Hence we will be able to release all I/O channels for exiting
thread within finite time.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I48a45bcba7c4b2c62d8c9d398ac35a584b533627
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/821
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
d7393e2e4f lib/thread: Stop and reap pending messages after thread is marked as exited
This is a preparation to support voluntary thread termination by
calling spdk_thread_exit().

Previously, the exiting thread had discarded all pending mesasges.

We change this to stop accepting any new message in spdk_thread_send_msg()
and reap pending messages in _spdk_msg_queue_run_batch().

Add unit test case for the new behavior. Adding g_ prefix to global
variables for clarification is done together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ida78e7bb1b86357602aea6938dd514897b67edd6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/482
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
f2576eb05b ut/thread: Fix bugs in test case for_each_channel_remove()
The test case for_each_channel_remove() did not have any
assertion and the count was not incremented correctly.

This patch fixes several issues in for_each_channel_remove()
by counting spdk_get/put_io_channel() and spdk_for_each_channel()
correctly and achieves what we wanted to do in this test case.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iceffd924f8887452bd7dad48e30d121874ab0b05
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/483
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
644e6420d1 lib/thread: Add API to check if the thread is marked as exited
Add spdk_thread_is_exited() to check if the thread is marked as
exited.  This API will be used by reactor to destroy the thread
which exited voluntarily.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2086984b7813e8a1f401852fde7ab263bcf8ef60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/481
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-13 09:51:15 +00:00
Shuhei Matsumoto
2be78638d4 lib/thread: Rename timer_poller by timed_poller
Rename all variables and comments related with timed poller from
timer_poller to timed_poller.

This patch was originally to count poller and add the current
value to thread_get_stats RPC. This will be realized to add
thread_get_pollers RPC instead but renaming will be valuable itself.
So keep only renaming in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I73880b8df6ed35391383e0890f76b4e509690e06
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/479
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-02-13 09:51:15 +00:00
Darek Stojaczyk
242a899573 autobuild: don't silence errtrap with leading !
Apparently some shellcheck versions on our CI complain about it
and suggest to use && exit 1 instead, we'll try to use || true
instead.

Change-Id: Idb505770a80929fbb9957f4ba039e009aae98f02
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/835
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-12 14:32:39 +00:00
GangCao
9e33ad7562 Bdev: add the ZCopy operation for IO stats
To track the ZCopy IO stats like IOs and Bytes read and written.

Change-Id: Iab2c4d8397aee5d746db9491bd4e8ac4eea69529
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/539
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-12 12:08:28 +00:00
Seth Howell
f6e682af75 nvme/perf: simplify parse args.
the workload parsing didn't need to be that complex.

Change-Id: I28627a430834eb48a7c3921ac655d80e348c66ea
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/755
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-12 12:08:09 +00:00
Seth Howell
806d411693 nvme/perf: remove extra check_io function.
This function was just a wrapper for a one line call.

Change-Id: If91338f917a110fda2493da4022c0a18281418ca
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/754
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-12 12:08:09 +00:00
Darek Stojaczyk
7a5b2019e8 autobuild.sh: don't rely on make output in listing not-built files
To get the list of not-built files, we used to concatenate
the list of files expected to be built and a specific chunk of the
`make` output, then we cut out any repeated lines. Selecting that
specific chunk of make output used to rely on 'Leaving directory'
string from make, which apparently doesn't appear under certain
circumstances, causing the build to fail with false-positives.

Rewrite this code not to rely (this much) on make output:
  1. get the list of files expected to be built
  2. get the list of all built files
  3. check if any file from #1 is not in #2

^ comm utility does exactly that

Change-Id: I6c6c1267c738f23d6804fe5c108cd80141329d10
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/550
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-12 12:07:52 +00:00
Wojciech Malikowski
b04b812e0d doc/ftl: Fix font alignment
Change-Id: If4d06a558875a9289b0716be9c812730779ba27c
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/646
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-12 12:07:40 +00:00
paul luse
93bb4fe598 script: update pmem test script
remove revs to a gerrithub review and a test plan doc
that no longer exist

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I05f4466181e27f60e1e717c42649726ad46f0cac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/453
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>
2020-02-12 12:07:30 +00:00
Ben Walker
7dbe0e7c61 nvme: Remove nvme_transport_get_ctrlr_registers
Wasn't used.

Change-Id: I9812e24540f6d86f47d39091ea5fd9b7880b4413
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/735
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-12 12:07:16 +00:00
Ben Walker
486471b1fb nvme: Remove DECLARE_TRANSPORT
We only have the generic transport wrapper now.

Change-Id: Ib1487e9c7b7ba3b573f5ea47597ad6eac1c5407e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/734
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
2020-02-12 12:07:16 +00:00
Ben Walker
54a022dda2 nvme: Don't DECLARE_TRANSPORT(rdma)
With the transport plugin system, this is no longer necessary.

Change-Id: Ia73878599658db84150603223ac811cb5a34ffba
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/713
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
2020-02-12 12:07:16 +00:00
Ben Walker
f5bc2cbe86 nvme: No longer DECLARE_TRANSPORT(tcp)
With the transport plugin system, this isn't used anymore.

Change-Id: Ib81c73f262d44edb6c937ca0056ac027b1e1ca75
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/712
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
2020-02-12 12:07:16 +00:00
Ben Walker
0b262fdfd2 nvme: Don't DECLARE_TRANSPORT(pcie)
All of the code now goes through the transport plugin system,
so this isn't necessary.

While doing this, caught a bug that the get_registers function
wasn't being set for the PCIe transport.

Change-Id: If19a933e0c6f656bc55232b15d59052e22af3ee9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/711
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
2020-02-12 12:07:16 +00:00
Ben Walker
516afb9aa3 nvmf: Allow fabrics get/set on ASQ and ACQ
This is meaningless for network devices, but will be useful
when emulating the more complete register state of local devices.

Change-Id: I37052e514101c298a1f66cc72135a8c3dd669003
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/420
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>
2020-02-12 12:07:04 +00:00
Ben Walker
84479ab6e3 nvmf: Allow fabrics commands to get and set aqa
This doesn't do anything for a network fabric, but it doesn't
hurt to allow these commands to set the emulated register
values for AQA. This will be more useful when emulating a
physical NVMe device.

Change-Id: I2891d7a07a5dceff50c6d66a8ce0b6b7c22a79f8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/419
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-12 12:07:04 +00:00