Commit Graph

8204 Commits

Author SHA1 Message Date
Seth Howell
3856d82b50 subsystem: check for NULL bufs in reservation ops.
At the RDMA level, we allow processing requests that should contain a
data transfer, but specify a length of zero to be passed up the stack
without a data buffer. See spdk_nvmf_rdma_request_get_xfer. In the case
of the reservation requests, we weren't checking whether req->data was
NULL before trying to copy into it causing us to segfault if we got a
malformed reservation request.

Found when using the fuzzer.

Change-Id: I320174ec72a8d298ab6ca44ef6a99691631f00ca
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451786
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-25 22:52:12 +00:00
Ben Walker
795134891e blob: Don't reallocate cluster array if it didn't change size.
Other threads are referring to this memory.

Change-Id: I9689a1b64a1f032ad479ec85095d2575dcab3a7f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452130
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-04-25 22:47:46 +00:00
Seth Howell
df04be2e53 test/rocksdb: move the location of DB_BENCH_DIR
We are switching to a method where we clone the db bench dir in
each build before running tests.
Also update the commit ID to point at the proper place.

Change-Id: I0eeba7bf7118e7da367b1405ae7322668eea3221
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451984
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-25 20:04:04 +00:00
Jim Harris
ec820daba3 rocksdb: use C++ constructor/destructor for thread_ctx
There's some more work needed to clean this up, but this
at least gets RocksDB working for now after the following
patch which enables dynamically specifying the RocksDB
commit ID.

Note that for now, we've modified the RocksDB BGThreadWrapper
to call SpdkInitializeThread() explicitly.  We'll be able
to move that in the future, but for now we check whether the
channel has already been allocated so that this extra
SpdkInitializeThread() effectively becomes a nop.

Note that for the main thread, g_fs hasn't been set yet, so
we can't allocate the thread_ctx.  So we still need an
explicit SpdkInitializeThread() call in the main thread.

This has the nice side effect of removing the need for SpdkEnv
to override Env::StartThread - so remove all of the code associate
with that.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452112
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-25 20:04:04 +00:00
Chunyang Hui
6b48e743a3 Opal: Add revert tper cmd option
Reset the device to its factory defaults.

Change-Id: I43f7dc8fb7bd5226283a4762beac0e2cf016f698
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445253
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-25 18:20:42 +00:00
Seth Howell
84c550f3cb test/nvmf: disable overwhelm testing for now.
This test is causing intermittent failures on the test pool.

Change-Id: I6be745700ee34813d49800acf689dc35d6c88ef4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451998
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-25 16:41:46 +00:00
Tomasz Zawadzki
8bab99fb6e nvme_manage: assert ns not being NULL when displaying namespaces
Assert that spdk_nvme_ctrlr_get_ns() does not return NULL.
If display_namespace() would proceed with ns == NULL,
functions below will segfault since the input is not verified there.

Change-Id: I12c4b617aca703f07275fbc6ab593b42c25e2ccd
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451830
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-25 14:34:53 +00:00
Karol Latecki
5a484d4ab8 test/vhost: add number of iterations for fio to run in benchmark
Run given fio config in loop X times. We use that later
to calculate the average of runs.

Previously the loop was done in CI but it's better to do
this in script.

Change-Id: Ie4126f504b2c027a1d6b4b4520152e89aadb4794
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450946
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-25 05:40:36 +00:00
Jim Harris
629c109282 test/crypto: always test aesni, even if qat is available
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I138de9ef2b4e1b7f6e228c159fe447d6135e63d0

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451784
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-25 05:36:13 +00:00
Tomasz Kulasek
e8f4ae0969 test/notify: notifications functional test
We use JSON configuration test already configure every subsystem so we
piggyback notifications testing here to not duplicate work.

Change-Id: Ib1334951fba60de390e6b40f653cf9cc1d32c144
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445337
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>
2019-04-25 03:34:40 +00:00
Maciej Szwed
4b1012d5bf blobstore: change _spdk_bs_blob_list_remove() type to void
_spdk_bs_blob_list_remove function returns only 0
so it can be changed to void function.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451783
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-25 03:34:17 +00:00
Wojciech Malikowski
58c4dac9d9 lib/ftl: Limit write queue depth to one per chunk
There are no guarantees of the order of completion
of NVMe IO submission queue so wait for write completion
on specific chunk before submitting another write to it.

To control chunk occupancy split IO to child requests
and release chunk in IO completion callback.

Change-Id: I44147a21b528a7f33fb92b9e77d7de8f5b18f8ff
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449239
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Young Tack Jin <youngtack.jin@circuitblvd.com>
Reviewed-by: Claire Jihyun In <claire.in@circuitblvd.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-24 23:24:21 +00:00
Wojciech Malikowski
049624823b lib/ftl: Rely on internal IO position during ftl_io_done()
Change-Id: I7a7667e1c4e6321150e5bc8eb4287fb61847ccb5
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450174
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Young Tack Jin <youngtack.jin@circuitblvd.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-24 23:24:21 +00:00
paul luse
6483aa3d15 ipsec: move to version 0.52
Will be required for when we support AESNI XTS and there's a few free
bug fixes so go ahead an udpate now.

Fixes #710

Change-Id: I3dcc395018aa8378352d7d8a7d537df122f5f75f
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449357
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-24 22:49:11 +00:00
Maciej Szwed
e6100af425 blobstore: block simultaneous operations on blobs
Block operation that should not be done simultaneously.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450014
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-24 22:43:47 +00:00
Maciej Szwed
478c2e6f64 blobstore: Move snapshot check on deletion after blob is opened
Currently someone can create clone while blob is being
opened for deletion. This patch moves check for blob if
it is a snpashot after the blob is opened.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451682
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-24 22:43:47 +00:00
Chunyang Hui
7250ec64db Opal: add take ownership cmd options
Also make some modification for invoking process in
nvme_manage tool.

Change-Id: Ib54db43d7336d3e839e7d9317c292b9a57b38f80
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445059
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-24 22:40:04 +00:00
yangtianyu 00383654
1dd07870e3 bdev/null : Clean up module resources that failed to initialize.
Currently, if the Bdev subsystem initialization fails, the initialization failed
module does not call the fini function cleanup resource.

However, null module use the 'spdk_io_device_register' and spdk_zmalloc to request
resources. In failed path, it will cause resource leak when exiting the app.

To avoid this, it will cleanup resources when module initialization fails.

Change-Id: Ib1a89e5238252d69b6e64ea02a0bd826661349a5
Signed-off-by: Tianyu Yang <yangtianyu2@huawei.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450105
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-24 22:25:47 +00:00
Pawel Niedzwiecki
b1d3b47bfb test/nvme: Test case 1 and 2 of NVME performance tests
Measure Iops/core performance

Change-Id: I5c2632b45c62cadbd46a67a7284ece9f77b70902
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/423170
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-24 22:00:32 +00:00
paul luse
933270eafd bdev/crypto: add new uninit call needed for dpdk 19.02
This patch won't fix issues related to the need for the latest
ipsec with 19.02 but it is needed for that patch to pass.

Change-Id: I8e2d984d85b355d88edfb9c90c159c8aa0a5362d
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451788
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-04-24 22:00:10 +00:00
Konrad Sztyber
ef5ede4b51 lib/ftl: allow parent/child relations between IOs
Extended the IO descriptors with the ability to group them together in a
parent / child(-ren) relationship. It allows to delay parent completion
until all children are done and enables the children to have additional
context in their completion routines (as opposed to having a single IO
describe all requests).

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I6ad111dc231813e397697109a333e2a5d7f5941d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449068
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Young Tack Jin <youngtack.jin@circuitblvd.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-24 21:57:06 +00:00
Changpeng Liu
3f4426878a nvmf: disable the protection if the backend doesn't contain valid type
It's not an error if the NVMe hard drive was formatted to 512 + 8 but
has no protection type, so we will also disable the protection for
NVMoF target.

Change-Id: I07e605cff9545f46c642f7ca783a4727a26abece
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451926
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-04-24 21:47:18 +00:00
Changpeng Liu
4582e9fb4a nvme: add additional check to avoid being divided by zero error
When a Namespace was removed all the field will be zeroed, which
may lead to being divied by zero error when IO is running, especially
with perf tool.  The perf tool doesn't add hogplug support, so
we add the additional check here to avoid such issue.

Fix issues #728 and #629.

Change-Id: I0e387c8c1bd4f3d40130377e2e0f5143f43be6a3
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451762
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-24 21:46:15 +00:00
Shuhei Matsumoto
f74643ef0f CHANGELOG: Support APIs for metadata and DIF in bdev layer
Change-Id: Ib47a854de93bd4b130ab7f663848db651eb873dd
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451645
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-24 16:55:23 +00:00
Shuhei Matsumoto
462ff07b37 CHANGELOG: Support DIF insert and strip feature in iSCSI target
Change-Id: Ie4f78688a0c6767eb48401c75f58502616b0c201
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451644
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-04-24 16:55:23 +00:00
Shuhei Matsumoto
d4b5edae66 CHANGELOG: Support DIF passthrough feature in NVMe-oF target
Change-Id: I3baf48a4caad0616e74d46d2b25eb97010c54ed0
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451643
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-24 16:55:23 +00:00
Shuhei Matsumoto
31158c0dd0 CHANGELOG: Fix the wrong location for NVMe-oF target section
Merge nvmf section into NVMe-oF target section.

Change-Id: I0279392e655b719ff6229b00838fcc6406265113
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451787
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-24 16:55:23 +00:00
Darek Stojaczyk
47cf47e482 vhost/scsi: don't send events when eventq is unset
We do technically support initiators without eventq or
controlq, but the lun hotplug/hotremove path expected the
eventq to be always present.

This was causing vhost to randomly crash in the fuzz tests.
Specifically, the crash happened if lun hotplug was handled
while a VM was in the middle of switching from BIOS to OS.

We fix it by checking if eventq is set before putting
any event there. LUN hotplug and hotremove won't work
without an eventq, but the entire session will be restarted
after new queues are initialized. This will make the VM
retrieve all up-to-date luns after OS initialization is
complete.

Change-Id: I5d28cbedad8fb2a35ede5a491aeb7fdc52faad06
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451789
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-04-24 16:46:09 +00:00
Darek Stojaczyk
5bf0a3838c iscsi: allocate sessions array using regular calloc
spdk_dma_malloc() is not required here, as the session
array is nether DMA-able nor shared between processes.

Change-Id: Ia9218d00eea8a3207abf07c1d78eaa585ffcad2c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450552
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: Changpeng Liu <changpeng.liu@intel.com>
2019-04-24 16:11:26 +00:00
paul luse
a50100900d bdev/compress: return error to reducelib if comp/decomp fails
Change-Id: Ibdea83543069e80d73358e95fa43f7b27c351d1a
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451064
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-24 15:07:37 +00:00
Tomasz Zawadzki
bbc49ab42f lib/thread: free cpumask on spdk_thread_create() failure
Change-Id: I2e814aa3188639edff47b6bb3f56609417e6c034
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451791
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-04-24 15:07:02 +00:00
Tomasz Zawadzki
6f155b15be lib/nvme: fix big endian conversion for logical_block_size
logical_block_size and geometry_logical_block_size are uint32_t,
so correct conversion for endianness is used now.

Change-Id: Iaa5ff576da8bc4ca65fa21f28eb3afd30507b00a
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451867
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-04-24 15:06:51 +00:00
Seth Howell
89d2efe07e rdma: set the srq param in the initiator.
We were setting this value in the target from our initiator, but it
turns out the rdma_conn_params struct is responsible for setting the
opposite side so we need to add it in the target side when accepting
connections.

Also, add a test to demonstrate target functionality when we overwhelm
the SRQ. It is useful to note that performance really tanks when you
start overwhelming the srq so it may be useful to use this test case to
check performance gains in edge cases over time.

Change-Id: Iac541bd9fc1d82eca9f21e7abc3f625663a6c460
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451678
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-24 09:22:16 +00:00
Seth Howell
0f94938a74 scripts/fio.py: add support for specifying num_jobs
This will allow us to test a greater number of connections without
having to add more subsystems when doing NVMe-oF testing.

Change-Id: I33203d6db79b30abb065f098c16840096478c5de
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451677
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-24 09:22:16 +00:00
Shuhei Matsumoto
38527b0786 lib/thread: Fix wrong posix thread name by SPDK thread scheduler
Before enabling SPDK thread scheduler,
each POSIX thread name was reactor_% (% was the core number).

After enabling SPDK thread scheduler, the name of the master POSIX
thread is reactor_% (% is the max core number), and the name of the
slave posix threads are lcore-slave-% (% is the current core number).

SPDK threads are light-weight threads - sometimes also called
green threads or fibers, and so are independent from posix
threads.

But reactor is tied to the POSIX thread in the SPDK event library.

So SPDK thread doesn't rename the POSIX thread at its creation
but reactor renames the POSIX thread at start instead.

This change makes POSIX thread name compatible between before and
after enabling SPDK thread scheduler.

Change-Id: I26e8dabc73e163c9f74e18b3640cf54954603b1f
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451712
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-24 07:40:30 +00:00
Jim Harris
7a7cf7ba94 test/rocksdb: add rocksdb_commit_id file
This signals which RocksDB commit should be checked
out for the SPDK RocksDB tests.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451772
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-23 23:42:58 +00:00
Jim Harris
b282c927ea blobfs: track num outstanding requests per channel
This will be used in next patch to ensure synchronous
threads wait until any background operations are done
before freeing its request memory, and also to print
errors if internal channels have outstanding
requests when freed.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451780
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-23 23:38:29 +00:00
Tomasz Zawadzki
ae693db986 iscsi: fix memleak when iscsi_read_config_file_params() fails
All error paths must free opts->nodebase and opts->authfile.

Change-Id: I655f112dd36bbd0dca6050bc5cc3ade1a5b05b7d
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451770
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-23 22:05:22 +00:00
Ben Walker
598795ba97 nbd: Remove unused spdk_event forward declaration
Change-Id: Ic63aa31bc53a9c0741049ba7a156dab901c2283b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451759
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-23 20:22:55 +00:00
Ben Walker
5d0b5e2ce9 thread: Add cpumask parameter to spdk_thread_create
Allow users to optionally specify an affinity mask when
creating a thread. This isn't currently used, but we want
the API to be in its final form for the next release.

Change-Id: I7bd05e921ece6d8d5f61775bd14286f6a58f267f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451683
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-23 20:22:55 +00:00
Ben Walker
14bf912df9 bdevperf: Use new zcopy API for reads
Change-Id: I71023d56f9023f46ff65291d22b1b8d31595a7b5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/416579
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-23 18:38:39 +00:00
Ben Walker
946ef1dc47 bdev: Emulate zero copy support when necessary
For bdevs that don't support zero copy, emulate the
API using regular read and write operations.

Change-Id: Iabd7ff474bf740b096f38bd47196987cbd89e915
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/416465
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-23 18:38:39 +00:00
Ben Walker
7e4911c922 bdev: Make malloc bdev use the new zero copy mechanism
Change-Id: I8aea5dee3ad30814ffd061c4afa7729ad8d47cdf
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/386167
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-23 18:38:39 +00:00
Ben Walker
84850dacd7 bdev: Add a zero copy I/O path
Add a ZCOPY operation to obtain buffers that represent
data regions on the backing block device.

Change-Id: Ie941c16ee051d0009e3888b52b8f41773bba47b3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/386166
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: Jim Harris <james.r.harris@intel.com>
2019-04-23 18:38:39 +00:00
Jim Harris
b92c3d412d nvmf: add tcp trace points for data read from socket
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib04abb64dd379dd73c7ff3c8318591124b4bb7dd

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451477
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-23 17:59:23 +00:00
Darek Stojaczyk
283abcb9a2 bdev: temporarily allow bdev descriptors to be closed from any thread
Bdev descriptors could be closed only from the same thread
that opened them. This restriction was suddenly introduced
at one point without making sure all the SPDK code respects
it. Vhost can still close descriptors from any arbitrary
thread and fixing that would require some more effort.

With this patch we remove the thread-specific assert from
spdk_bdev_close() and hence allow vhost to work properly
in debug builds. Vhost can still have a possible data
race with bdev hotremove notification, but let's get rid
of the abort() from the usual code path first.

Change-Id: I6fac66a5ebc907b1c5418fff618f0b64cd9b69f4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/451561
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-23 17:06:37 +00:00
Darek Stojaczyk
f93b6fb0a4 bdev: defer unregister untill *all* descriptors are closed
We used to wait only for those descriptors which
specified the hotremove notification callback. The
bdev could've been removed before the descriptor
was closed and the subsequent spdk_bdev_close would
simply segfault.

This patch modifies spdk_bdev_unregister to always
wait for all descriptors to be closed before actually
unregistering the bdev. This consolidates the bdev
unregister behavior for descriptors with and without
the hotremove callback.

Change-Id: I9b358209c6abd301b6fe8660e27bc6fa4ef485d6
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450175
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-23 17:06:37 +00:00
Gregory Shapiro
14032a984c NVMF: Add model number as parameter to construct_nvmf_subsystem (-d option).
Change-Id: Ia1a458a0ac1c5a17d2955a3f31c6dfe77538eb17
Signed-off-by: Gregory Shapiro <gregory.shapiro@kaminario.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/438562
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-04-23 16:51:16 +00:00
Changpeng Liu
68bb3995aa nvmf: trivial optimization to make the code more consistent
Make the use of spdk_uuid_compare() to be consistent in the file,
also change the SPDK_INFOLOG to SPDK_DEBUGLOG to avoid the
repeated log messages for RESERVATION CONFLICT response.

Change-Id: I72fefbd520cefcaf25182c3ca3d21e3d87d17e94
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450884
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-23 16:30:24 +00:00
Changpeng Liu
3b214eb8f3 UT/nvmf: add controller reservation notification log unit tests
Change-Id: I98dba9998e412db101437e9276648dac6eba2de5
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450490
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-23 16:30:24 +00:00