Commit Graph

9601 Commits

Author SHA1 Message Date
Maciej Wawryk
827b266717 RPC: rename rpc clone_lvol_bdev to bdev_lvol_clone
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I11b1625e31227bd0952fd6e1816f6dbf862c94f1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466119
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@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-08-23 22:36:28 +00:00
paul luse
493ce2cbbf bdev/compress: small fix-up to 2MB patch
For completion context, the first src mbuf 'userdata' field
is filled in. The wrong index was being used to set this which
would never cause a problem because only the first src mbuf is
used.  Also when an extra src mbuf is added we weren't setting
userdata which again isn't a real problem but for consistency
I'd like to set it since all other src mbufs have it set.

Change-Id: Iac32a9a37502a95ce0f997375b6c75a42bc1651f
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466150
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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-08-23 22:34:48 +00:00
Darek Stojaczyk
f12ac17189 vhost: change vsession->id to uint64_t
This id is assigned from a global increment-only counter
whose type is uint64_t. I believe the original intent
was to use uint64_t for vsession->id as well, let's fix
it now to avoid wrapping errors.

Change-Id: I9cae87e6c74400590a1dc1b1f91d51e4a4c13499
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Acked-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466038
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@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-08-23 22:34:02 +00:00
Darek Stojaczyk
3b6f69c8f5 vhost: remove unnecessary membarrier on I/O completion
We've recently switched from manually calling eventfd_write()
to rte_vhost_vring_call(), which besides writing to the
eventfd, always calls a full memory barrier in the upstream
rte_vhost lib. With upstream rte_vhost we're actually
calling two memory barriers on I/O completion - one in
spdk code, one inside rte_vhost_vring_call().

The spdk barrier was only required for our internal rte_vhost
lib, whose rte_vhost_vring_call() implementation (that we
wrote) did not have such membarrier inside. So now we'll
add this membarrier there, and remove the same barrier
from spdk code.

This doesn't change any code flow for the internal rte_vhost
lib, but optimizes I/O path for the upstream version.

Change-Id: I68738d7feb9159f718b0e60ac7eed1fafd4836b9
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466037
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-08-23 22:34:02 +00:00
Evgeniy Kochetov
0ddcc49d8a bdev/null: Add metadata size configuration file parameter
Configuration file allows to configure only metadata size. Metadata
transfer method is always set to 'interleave'.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I083375807162265c6c0cf82d46910e8658c2de9a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464779
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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-08-23 22:33:32 +00:00
Evgeniy Kochetov
8031dfe208 bdev/null: Add metadata size option to construct_null_bdev RPC method
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I31f40dd539a153a4f5ff1c3e78f49bd021154e39
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464778
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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-08-23 22:33:32 +00:00
Evgeniy Kochetov
f12094267b bdev/null: Add metadata support for Null bdev
'md_interleave' option is added to spdk_null_bdev_opts along with
'md_size', but only interleaved metadata is supported at the
moment. 'md_interleave' option must be initialiazed with 'true',
otherwise -ENOTSUP will be returned from Null bdev constructor.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ibee745741d0125534e06aa6a35767d9dff795951
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464777
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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-08-23 22:33:32 +00:00
Shuhei Matsumoto
703a5473f7 iscsi: Restore the previous bug fix for LUN hot plug
One recent commit destroyed the critical bug fix for LUN hot plug.
Hence this patch restores the critical bug fix. Simple revert is
not possible because connections are assigned to poll groups
instead of cores now. But we can revert easily because earlier
version of the recent patch did that.

Fixes #925

The github issue was caused by commit 8cf1945432.
The bug fix restored by this patch is commit 1f6a78620d.
The reference we can follow to create this patch is earlier version
of commit fb641c4b54.

Reported-by: yidong0635 <dongx.yi@intel.com>

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ie1ba14a59ce48149a8474cbffc56aa08adc1fc4d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466108
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-08-23 18:09:16 +00:00
Ben Walker
6aff44ccbb event: Move spdk_reactors_fini higher up in file
Change-Id: I07a96c0a4eaabd762da684a577381ec95410d32d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465992
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>
2019-08-23 17:51:26 +00:00
Ben Walker
2139bfa91f event: Move spdk_reactors_init up in file
Begin organizing file so setup operations appear
at the top.

Change-Id: I7411b4bf20480c8aeb40bc21b521e5d359f8da1f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465991
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>
2019-08-23 17:51:26 +00:00
Seth Howell
9d14641dd5 mk: add a lib deps file.
By adding this file and modifying the way we define a couple of
variables in the makefiles, we can actually avoid having to redefine
the library dependencies on a per file basis.

Change-Id: Ieab4aa1021b0341fc21e3b65677a9ad7f70559c2
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466063
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: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-08-23 17:48:35 +00:00
Tomasz Zawadzki
cfc0fbf11e bdev: fix error path for allocating qos paramters
Every exit path in spdk_bdev_set_qos_rate_limits() should
go through _spdk_bdev_set_qos_limit_done() as soon as
ctx is allocated and qos_mod_in_progress set to true.

This patch fixes one path were it did not occur.
With this change qos_mod_in_progress is set to false,
when failure in allocating qos parameters occurs.

Change-Id: I04a45dfdcde9160fd2701b44f5fde26fb0245177
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465659
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-08-23 17:31:52 +00:00
Seth Howell
3dad8b1568 test/fuzz: remove shm file during cleanup.
In the event that our fuzz test passes, we should manually remove the
trace files from the /dev/shm directory. This will prevent us from
failing to allocate /dev/shm files when a machine consistently passes
the tests and doesn't reboot.

Change-Id: I2ccde6aba7d61fda3a28ed24e009c6f8f81c20b4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465996
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-08-23 17:31:47 +00:00
Tomasz Zawadzki
e2ce08cf68 ut/bdev: fix scan-build reporting uninitalized values
Scan-build on Fedora29/30 reports error, which this patch fixes:
bdev_ut.c:1436:17: warning: The left operand of '!=' is a garbage value
CU_ASSERT(desc != NULL);
~~~~ ^
/usr/include/CUnit/CUnit.h:123:30: note: expanded from macro 'CU_ASSERT'
{ CU_assertImplementation((value), LINE, #value, FILE, "", CU_FALSE); }
^~~~~
bdev_ut.c:1654:17: warning: The left operand of '!=' is a garbage value
CU_ASSERT(desc != NULL);
~~~~ ^
/usr/include/CUnit/CUnit.h:123:30: note: expanded from macro 'CU_ASSERT'
{ CU_assertImplementation((value), LINE, #value, FILE, "", CU_FALSE); }

Fixes #924

Change-Id: Ia7dc6ce066ac80fc45f022eefd43a224d2f11503
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466110
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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-08-23 15:13:12 +00:00
Ben Walker
fd0f036480 event: Relax restriction on g_reactors not being NULL
There is a case in vhost where this occurs. Until that is
sorted out, just make this a warning.

Change-Id: Id021791e8cbddf3023e0cb1b8c52a733b3578a7d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466075
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-08-22 21:14:11 +00:00
Seth Howell
f196669374 lib/copy: move ioat subdir to module directory.
Change-Id: I29b31344a11efd2430e0f77062fb98fa0ab1c71e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465458
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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-08-22 16:29:49 +00:00
Seth Howell
7392cdeff7 lib/blob: move bdev subdir under module directory.
Change-Id: Ifb9a1df919d32a98c328101029cc22e91915a977
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465457
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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-08-22 16:29:49 +00:00
Seth Howell
c77565ee04 lib/sock: move subdirs to module/sock
Rounding out the module concept of SPDK libraries.

Change-Id: I2b316153809ae9f73361648fe505274a59d0bdb3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465456
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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-08-22 16:29:49 +00:00
Seth Howell
f34fa35a52 lib/event: move rpc and subsystems dirs to module
These directories fit in with the module concept we are forming inside
of SPDK. Essentially modules are derivative or specialized libraries that
rely on a general or core library.

Change-Id: Ib40f05422f144ff8fd579f47a3867ef4412b3372
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465455
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-08-22 16:29:49 +00:00
Seth Howell
07fe6a43d6 mk: move the bdev modules under module directory.
This is more accurate to what they are, and will make defining library
dependencies much simpler. This change in directory does not affect the
final placement of naming of libraries at the end of time.

Change-Id: Ic48a9233dff564e39ce357a9ea0a111ea2b6414b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465454
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-08-22 16:29:49 +00:00
Xiaodong Liu
f12587433a test/iscsi_tgt: fix trace_record rare failure
Run spdk_trace_record once iscsi_tgt is started.
This movement can make sure spdk_trace_record is running
before iscsi_tgt's exit.

Fix issue #908

Change-Id: I4e4420fbd0f7586721c7bc8f13837c25b4470da9
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465847
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-08-22 15:44:22 +00:00
Ben Walker
085ade57fc event: Add additional checking around valid reactors
Try to catch mistakes when using invalid cores.

Change-Id: I3caef9d3898ab76f80a45799cb4305601fb02f2a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465990
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-08-22 14:55:42 +00:00
Ben Walker
e30e1596b2 event: Remove rusage_poller
This was unused. The rusage polling is done in another way.

Change-Id: I478ddb2d664647e922f3049a64199fdc61f25ce1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465989
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-08-22 14:55:42 +00:00
Tomasz Zawadzki
c8dfae7b8f lib/event: expose spdk_app_json_config_load() in internal header
Expose spdk_app_json_config_load() in internal to SPDK header.
In future patches it will be possible to use this function
without depending on rest of event framework (such as app.c).

Applications that do not use SPDK reactors (have their own threading
model) or no need to initialize using spdk_app_start(), will be
able to utilize subsystems and their json configuration loading.

Change-Id: I093181977d121e39ddbf212f8dff3182a4102fd6
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464178
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-08-22 14:53:28 +00:00
Ben Walker
f8d687bdb6 iscsi: Properly unregister iscsi_tgt io_device
Fixes #923

Change-Id: I5c1e02a7d6e2e22db9c0a1345c03a351e07a15d4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465976
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-08-22 14:50:45 +00:00
Jim Harris
f09be44ee3 setup.sh: modprobe msr if /dev/cpu/0/msr not available
SPDK/DPDK startup time can be very important - especially
in secondary processes.  If DPDK cannot figure out the
TSC via cpuid or rdmsr, it will instead use a 100ms sleep
to calculate the TSC.  On Fedora kernels, the msr module
is linked into the kernel, enabling rdmsr and bypassing
this 100ms sleep.  But on Ubuntu kernels, the user must
explicitly load the msr module, otherwise it will incur
the 100ms sleep.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I779f023bb1681570da81c99cefa66debf3e1adc6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465711
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-08-22 11:05:52 +00:00
paul luse
40b14690db ut/compress: add and beef up mbuf testing
In prep for testing the 2MB boundary condition multiple changes
were needed:

* update mocked mbuf function for chaining
* init next pointer to NULL during mbuf allocation
* set and check expected physcal addresses in _compress_operation()
* init iovec values in test routines to more sane values

Change-Id: Icff030e8bef693952f7da66e7aae77e207fbfd40
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465983
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>
2019-08-22 04:34:18 +00:00
paul luse
0072823360 ut/compress: fix memory leak
Present since the refactoring on driver init function.

Change-Id: I5b2877f4278b62a9efa53395f6910ef199f2c100
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465981
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>
2019-08-22 04:34:18 +00:00
paul luse
5d91d5e296 ut/compress: expand tests to use 3 src & 3 dst IOVs
Will be needed to add specific tests for crossing a 2 MB boundary
later in this series.

Change-Id: I7404a019ff2f837f54ffdef39c6219e86aa258f1
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465968
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>
2019-08-22 04:34:18 +00:00
paul luse
7e1f967c13 bdev/compress: support host buffers that cross a 2MB boundary
Only affects QAT where only partial data transfers would occur
when a host buffer crossed a 2MB boundary.

fixes issue #897

Change-Id: Ib20bfb3557c11a6da996f4b209e9bb7c634f8f49
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464719
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: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-08-22 04:34:18 +00:00
paul luse
c8e034b092 ut/compress: fix compress UT
Remove code that was freeing memory in the code under test. It was
no longer needed following a refactor of the init code and was
causing a double free.

Change-Id: I99018587ac12e01d4fe950e0718c23790ce7ce41
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465966
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-08-22 04:34:18 +00:00
paul luse
68e7da44ec bdev/compress: add RPC to list orphaned comp bdevs
The previous patch in this series introduced the notion of an
orphan comp bdev which is available only for deletion due to
a missing PMEM file.  This RPC allows applications to list
orphaned comp bdevs as they will not show up with get_bdevs
because they are not registered bdevs.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I431f9cdebd4e5ae6068308639cb41d6c52f7309b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465812
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-08-22 04:31:46 +00:00
paul luse
09824fa0e7 bdev/compress: enable deletion of a vol w/o a pmem file
When a vol load fails because of a missing pmem file, instead of
doing nothing we now claim the underlying bdev and make an entry
in our global list for a comp bdev so that the regular delete
RPC can be used to delete the comp bdev.

fixes issue #890

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Icd5357060648e722f94e8f6b9038c8dad032feb3
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465807
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-08-22 04:31:46 +00:00
paul luse
fd646a28dc bdev/compress: move function
So it can be called from an earlier one in the next patch.

Change-Id: I1e79669d33d84e54c27305e38076cbdafea627e3
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465986
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>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-08-22 04:31:46 +00:00
paul luse
804ce73296 bdev/compress: factor out setting the comp bdev name
Will be re-used in an upcoming patch.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I676beb7f61c100043189c56484a41c209cd2942d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465829
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: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-08-22 04:31:46 +00:00
paul luse
a480b18eda bdev/compress: update internal delete function to delete by name
Needed in upcoming patches.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0db6f2e4aa99e9c1e3b1080dc63e50291a6f5938
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465825
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-08-22 04:31:46 +00:00
paul luse
ffc17e6e94 lib/reduce: enable deletion of a vol w/o a pmem file
First is a patch series that enables an application to delete
a compression vbdev when the volume is missing it's pmem file.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ida639d2c231833f23131926d442ad430ec903e03
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465805
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-08-22 04:31:46 +00:00
Karol Latecki
ee7024d609 test/vm_setup.sh: update QAT driver URL
Update to version currently used on test systems.

Change-Id: Idbc12f0dd089dbe4b0919a936eac8a36020c3994
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465665
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: Jim Harris <james.r.harris@intel.com>
2019-08-21 23:16:27 +00:00
Wojciech Malikowski
a4881cf82f lib/ftl: Check if write buffer is empty during shutdown
Added assertion to check is there is no any
acquired write buffer entries during shutdown.

Change-Id: I92be8ff07b2bf338acb65a0e37d0cc6ad6962d81
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462934
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
2019-08-21 23:14:25 +00:00
Wojciech Malikowski
b08337c216 lib/ftl: Fix padding size calculation
Padding size calculation should take into account
already acquired write buffer entries in case
number of blocks left for closing band is less than
write buffer size.

Change-Id: I0f9c9bc94eb5a4736eede30ec424c81103e1256f
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463525
Reviewed-by: Paul Luse <paul.e.luse@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-08-21 23:14:25 +00:00
Maciej Szwed
7a260a5e99 bdev: Create generic _spdk_bdev_open function
This is a part of a change that will introduce
new spdk_bdev_open_ext function. This will make
possible to pass callback function while opening
bdev which will be called when some bdev events
occur.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463157
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-08-21 22:39:07 +00:00
Maciej Szwed
c141bd94a1 bdev: Don't open bdev if it is being removed
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I7ddff2d1186ff3c03de9b48c79297b03957002c4

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463156
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-08-21 22:39:07 +00:00
paul luse
2b3365072b test/reduce: support iovecs in compress/decompress UT
To avoid changing the actual compress/decompress routines, just
use a scratch buffer to support incoming iovecs.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I55851866dd1b2d9c0eb44fac35d050d7abd00e4e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465355
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>
2019-08-21 22:09:32 +00:00
Seth Howell
f8433aad23 rpc/nvmf: add tgt_name options to relevant RPCs.
All of the RPCs in lib/nvmf/nvmf_rpc.c rely on knowing which nvmf_tgt
they should work with. They have historically relied on the assumption
that there will only be a single target in a given application. This is
true for the example application in the spdk repo, but it is not
necessarily true generally,

By adding an option tgt_name parameter to the RPCs we enable them for
multi-target NVMe-oF applications. We also further reduce the coupling
between the library and the example application.

Change-Id: I03b6695da05a42af3024842ed87d2ce2c296f33f
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465442
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-08-21 17:20:28 +00:00
Seth Howell
a54a6a266c lib/nvmf: extract RPCs from the subsystem directory
There are one or two RPCs that deal with application specific
configuration. We can leave these there for now.

Change-Id: I9c40aa3403d32d3e2214c8c904fb1c414ad99967
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465365
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-08-21 17:20:28 +00:00
Seth Howell
c795aa70cf nvmf_rpc: remove references to g_spdk_nvmf_tgt
The global nvmf target is really an example application specific
feature. This should be separated from the generic RPC functions as much
as possible.

Change-Id: I7671aa88c20a39129aa13d1a7100b537bf34b00d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465364
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-08-21 17:20:28 +00:00
Seth Howell
79d876716c nvmf: add spdk_nvmf_get_tgt function
This function will allow applications (and RPCs)
to obtain an spdk_nvmf_tgt pointer by name.

Change-Id: I82792e06a819e06d9fddb5429830008653d92cd1
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465349
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-08-21 17:20:28 +00:00
James Bergsten
0eb4e6d5ed scripts: Update check_format.sh shellcheck to ignore SC1117 warnings.
So, in an attempt to be a “good SPDK citizen,” when I noticed that
check_format.sh suggested I install shellcheck, I did and re-ran
my commit.

Got bunches of errors like this on unmodified SPDK bash scripts:

In scripts/ceph/start.sh line 58:
echo -e "\tosd data = ${mnt_pt}" >> "$ceph_conf"
         ^-- SC1117: Backslash is literal in "\t".
          Prefer explicit escaping: "\\t".

Adding SC1117 to the list of ignored warnings lets check_format
run clean.

ShellCheck is at version 0.5.0, Ubuntu at 19.04.

Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Change-Id: I1705b3d15338a18a3fde3ae796a7c46bbf92b1cd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465448
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-08-21 17:07:14 +00:00
Maciej Wawryk
40c959cbcc RPC: rename RPC crypto_bdev series
RPC: rename RPC delete_crypto_bdev to bdev_crypto_delete
RPC: rename RPC construct_crypto_bdev to bdev_crypto_create

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ib93714504ee7a97cbbe36457f7826f0af69b1fe5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465057
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-08-20 22:44:58 +00:00
Maciej Wawryk
9a91a45c99 RPC: rename RPC compress_bdev series
RPC: rename RPC construct_compress_bdev to bdev_compress_create
RPC: rename RPC delete_compress_bdev to bdev_compress_delete

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I768825269967e6af079e87094a4b3ce0b11444ab
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465051
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-08-20 22:44:42 +00:00