Commit Graph

9298 Commits

Author SHA1 Message Date
paul luse
c2d441226a lib/reduce: close hole in compress optimization
If a write operation comes in and is not a read-modify-write but
we don't end up compressing the data (because of either error or
we decide the compression ratio isn't good enough) then we not
only need to copy the data to the host buffers but we need to
zero any offset and/or remainder in the decomp scratch buffer.

Change-Id: Ifb2235507826f9ef1110dd9dbaf88045d8979e7c
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463337
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-07-29 03:33:40 +00:00
Jeffry Molanus
bc315deae3 bdev_iscsi: fix crash when connecting to a non existing iqn
When connecting to an iscsi url that effectively does not exist we free
the data structures of the very context we are processing. This results in a
use after free and subsequently in a crash.

Signed-off-by: Jeffry Molanus <jeffry.molanus@gmail.com>
Change-Id: I67cab1efb161bfa23fa1022e150661080d90b556
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462614
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Jeffry Molanus <Jeffry.molanus@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-29 03:18:33 +00:00
Anil Veerabhadrappa
ed56a3d482 NVMe-oF Target: Add FC transport.
- New files and updates to existing SPDK files to add the NVMf-FC transport.
  - Depends on an existing low level driver library. This driver is not part of SPDK repository.
  - Makefile updates to build FC transport (using CONFIG_FC)
  - Update configure script for FC build.
  - New FC unit test for FC-LS commands.
  - Update unittest.sh to run FC unit test (when built).

Signed-off-by: John Barnard <john.barnard@broadcom.com>
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: If31d4d25feab76c2dbe90a7faf71d465c2c3a354
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450077
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>
2019-07-26 22:17:17 +00:00
Ben Walker
e10fc6ea00 nvme: Don't use spdk/config.h in spdk/nvme.h
Some definitions in spdk/nvme.h were hidden behind a CONFIG
that other libraries can't compile against a "clean" SPDK
repository's headers because spdk/config.h is missing. Just
remove the use of that #define from the header. That means the
RDMA stuff is declared, but it is never called and never
implemented when RDMA is off, so it is just stripped out by
the linker anyway.

Change-Id: I72ce4902eb327fc4a893ba78503fe0f9c6f6ee3f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463245
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-26 22:17:17 +00:00
Ziye Yang
6d4f580e79 nvmf/tcp: Remove spdk_nvmf_tcp_qpair_process_pending
Phenomenon:
Test case:  Using the following command to test
./test/nvmf/target/shutdown.sh --iso --transport=tcp
without this patch, it will cause coredump.
The error is that the NVMe/TCP request in data buffer
waiting list has "FREE" state.

We do not need call this function in
spdk_nvmf_tcp_qpair_flush_pdus_internal, it causes the
bug during shutdown test since it will call the function
recursively, and it does not work for the shutdown path.

There are two possible recursive calls:

(1)spdk_nvmf_tcp_qpair_flush_pdus_internal ->
spdk_nvmf_tcp_qpair_process_pending ->
spdk_nvmf_tcp_qpair_flush_pdus_internal ->
>..
(2) spdk_nvmf_tcp_qpair_flush_pdus_internal->
pdu completion (pdu->cb)
->..
-> spdk_nvmf_tcp_qpair_flush_pdus_internal.

And we need to move the processing for NVMe/TCP requests
which are waiting buffer in another function to handle
in order to avoid the complicated possbile recursive
function calls. (Previously, we found the simliar
issue in spdk_nvmf_tcp_qpair_flush_pdus_internal for
pdu sending handling)

But we cannot remove this feature,
otherwise, the initiator will hang for waiting the
I/O. So we add the same functionality in spdk_nvmf_tcp_poll_group_poll
function.

Purpose: To fix the NVMe/TCP shutdown issue.
And this patch also reables the test for shutdown and bdevio.

Change-Id: Ifa193faa3f685429dcba7557df5b311bd566e297
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462658
Reviewed-by: Seth Howell <seth.howell@intel.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-07-26 21:16:23 +00:00
Evgeniy Kochetov
fbe8f8040c nvmf/rdma: Add request latency statistics
This patch adds measurement of time request spends from the moment it
was polled till completion.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I1fcda68735f2210c5365dd06f26c10162e4ddf33
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445291
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-07-26 20:30:00 +00:00
Evgeniy Kochetov
251db8144f nvmf/rdma: Add NVMf RDMA transport pending statistics
This patch adds statistics for pending state in NVMf RDMA subsytem
which may help to detect lack of resources and adjust configuration
correctly.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I9560d931c0dfb469659be42e13b8302c52912420
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452300
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-26 20:30:00 +00:00
Evgeniy Kochetov
38ab383a8f nvmf/rdma: Add RDMA polling statistics
RDMA polling statistics: number of polls and number of completion
entries returned.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: Iabcf2cb6f6a35f595b89b58cdfcd177a637dda13
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445289
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-07-26 20:30:00 +00:00
Evgeniy Kochetov
43bb4e6b1f rpc: Add NVMf transport statistics to nvmf_get_stats RPC method
This patch adds transport part to nvmf_get_stats RPC method and basic
infrastructure to report NVMf transport specific statistics.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: Ie83b34f4ed932dd5f6d6e37897cf45228114bd88
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452299
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-07-26 20:30:00 +00:00
Vitaliy Mysak
e7ef737702 test/spdkcli: test vhost_target show_details method
Add a match test for vhost_target show_details method.
In spdkcli source the equivalent function is `UIVhostTargetObj.show_details`.
This method is one of few that left untested in spdkcli.

This patch is related to trello task:
https://trello.com/c/CHOOxcGj/151-spdkcli-extend-test-coverage

Change-Id: I3747b0bef4a54606765c81a003bbc9e12fe32858
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463281
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-07-26 19:50:13 +00:00
paul luse
ca1a3bf18e bdev/compress: use base bdev alias as base for comp_bdev name
If available, if not use the bdev unique name. This results in
a much friendlier comp_bdev naem for the user.  For example,
now it would look something like this: COMP_lvs0/lvs as opposed
to like this COMP_0b149b31-b66b-4cf7-ab39-a55b50788cd1

Change-Id: I319a141221ed8880edcec930ca5be9f256b105e0
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463246
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-07-26 19:47:33 +00:00
paul luse
e9211cbf45 bdev/compress: fix qpair assignment code
Was previously creating the number of qp based on the # of cores
reported via DPDK function.  Also was assigning one qp per comp_bdev.
After testing w/multiple threads in fio 2 things needed to change:

* remove use of rte core related functions as fio threads are not EAL
threads.  This required choosing an upper limit for the number of
threads that the bdev module will support
* changing the qp assignment code such that comp_bdevs share the
same device_qp if on the same thread

Fixes issue #879

Change-Id: Ib968ee04bef63013616546341974a4431d8f266a
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463107
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-07-26 19:47:33 +00:00
Jan Kryl
59339feac3 jsonrpc: tolerate null json value for parameters in json-rpc call
Rust lang has notion of empty value `()` which is translated to json null
value using serialization library like serde. Thus it means that jsonrpc
methods having no parameters translate to parameters with null value (as
opposed to a request without parameter member as it is done now in spdk).
This change handles null parameter gracefully instead of returning an
error - improving interoperability with such clients.

Signed-off-by: Jan Kryl <jan.kryl@mayadata.io>
Change-Id: I8c3cc5613582aebb10ac6eaee3ac4e6538aaa0b1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463171
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>
2019-07-26 19:30:57 +00:00
Darek Stojaczyk
490b06e24b queue: redefine TAILQ_REMOVE for scan-build
scan-build can't follow double pointers in tailqs and
often assumes that removed elements are still on the
list, so now if we detect __clang_analyzer__ we'll
redefine TAILQ_REMOVE with extra asserts to silence
those scan-build errors.

Change-Id: I14134d8e75f7829e178b74d19f711f77cf018f14
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459285
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
2019-07-26 19:28:31 +00:00
Wojciech Malikowski
825ae66bd0 event/subsystem/vmd: RPC support
Added enable_vmd RPC call.

Change-Id: Ib0bea12f097a46a8be537a1db8aace6cb3b9b699
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459949
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-26 18:27:40 +00:00
Darek Stojaczyk
890a7f2bfc dpdk: move submodule to latest commit
Pull the following:
"config: comment out vhost"
"config: allow the shared library to be built."

Change-Id: I9ca1c2a52a33954bb4c51b1ed4a3c23c89bfa42d
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460531
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-26 17:49:34 +00:00
Darek Stojaczyk
84420e8300 dpdkbuild: fix CONFIG_RTE_BUILD_SHARED_LIB
We commented out this build option in our DPDK fork,
but DPDK makefiles check its value specifically against
'n' to set linking flags properly. It's currently unset,
so it fails both == 'n' and == 'y' checks, which fails
the build. Shared lib build has some issues on FreeBSD
right now, so to fix the immediate problem, just define
the shared lib option to 'n' for now.

This matches the original behavior. We've always built
DPDK as a static library.

Change-Id: I5a880b777153cc169c3a135d412aa2014f4de8e0
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463290
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-26 17:49:34 +00:00
Darek Stojaczyk
ba3db1d2ea ut/nvme: silence scan-build warnings about null dereference
nvme_ut.c:755:2: warning: Dereference of null pointer
        TAILQ_REMOVE(&probe_ctx.init_ctrlrs, dummy, tailq);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/jenkins/workspace/Other/unittest_autotests/spdk/include/spdk/queue.h:62:6:
note: expanded from macro 'TAILQ_REMOVE'
        if (((elm)->field.tqe_next) != NULL)

Change-Id: I8ee6a476f2658668304e182a6c8cff4d79ae2f40
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463257
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-26 17:47:34 +00:00
Darek Stojaczyk
b701087f87 ut/bdev: silence scan-build warnings about garbage value comparison
bdev_ut.c:1300:17: warning: The left operand of '!=' is a garbage value
        CU_ASSERT(desc != NULL);
                  ~~~~ ^

Change-Id: Ie87cd4d7218a380e61616a83f3a9bceccc0798cb
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463258
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-26 17:47:34 +00:00
Darek Stojaczyk
26f6c2a03d ut/bdev: silence scan-build warnings about histogram memory leaks
bdev_ut.c:1863:2: warning: Potential leak of memory pointed to by
'histogram'
        poll_threads();
        ^~~~~~~~~~~~~~

We used to free g_histogram instead of histogram. Those
should be the same thing, but scan-build gets confused.

Change the code to free histogram - this should also make
it slightly easier to read.

Change-Id: Ifaad1c2d9c7f9cc1a106f6edf3d22b54e42fe867
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463256
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-26 17:47:34 +00:00
paul luse
f9cae9d20f lib/reduce: minor cleanup for consistency in recent changes
Had used a few different means to determine if there's space
remaining in a chunk after accounting for offset and host data,
just making them all consistent. Nothing functionally changes.

Change-Id: Iffd3b0b6d8ab1253f5b1bebda88d6f63d5061e19
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463023
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-07-26 17:44:18 +00:00
Amelia Blachuciak
3def834c65 make: add cross-compilation support
There might be a need for user to cross-compile SPDK for other platforms
than native. Since DPDK supports cross-compilation already, only enablement of
cross-compilation for SPDK is missing. This patch aims to provide the user
with additional option to configure script that works similar to what DPDK already provides.

To enable cross-compilation run ./configure.sh with additional --cross-prefix parameter.
The parameter should work in similar manner to DPDK CROSS parameter
and specifies prefix of cross-compiler defined in PATH variable.

Note: To cross-compile, toolchain must have SPDK dependencies such as e.g. Libaio.

Signed-off-by: Amelia Blachuciak <amelia.blachuciak@intel.com>
Change-Id: Ia7cb879d39d624552cad1af98a563070ea7676b2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460977
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.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-07-26 16:22:27 +00:00
Ben Walker
1a56982da3 build: Make detect_cc.sh handle --cross-prefix
This internal tool can now be passed an optional --cross-prefix,
which sets up the prefix used for a cross compiler.

Change-Id: Ia4bbbae3bd5a2e4ddc9da342cd03d600e9ee6099
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463016
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
2019-07-26 16:22:27 +00:00
Ben Walker
c510bd8830 build: Disable ISA-L if the target build architecture is not x86
It doesn't matter what the system itself is - it matters what the
compiler is targeting.

Change-Id: Ifb901f137a828725c3064aca2c1142d6214eec14
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463015
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-07-26 16:22:27 +00:00
Ben Walker
73439e6f46 build: Detect compiler toolchain in configure
We need to know this up front.

Change-Id: I3a9ceb90cf62eacbf3fdf518a9ccb4c4978b3a05
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463014
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-26 16:22:27 +00:00
Darek Stojaczyk
f89166c089 scsi: remove bdev_scsi_mode_select_page()
The function didn't do anything.

Change-Id: Id44a7d0c129ab60751eda382911935d677730ec9
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463066
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-07-26 04:14:59 +00:00
Konrad Sztyber
fb15434659 lib/ftl: store non-volatile cache's current write address
Remember current write position within the cache when shutting down.  It
allows for faster recovery after clean shutdown (no need to scan the
device) as well as grants a quick way to distinguish between clean and
dirty shutdowns.

Change-Id: I79c22caa0b1ca4373951ac43f747b085d331cdd0
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460796
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: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
2019-07-25 22:36:31 +00:00
Konrad Sztyber
3e911e17c7 lib/ftl: non-volatile cache's header validation function
Moved metadata header verification to a separate function, since the
metadata read callback got pretty large.

Change-Id: I0c8b2eb493631a6495ce2ef7d9586d2c7cb7772f
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460795
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-07-25 22:36:31 +00:00
Konrad Sztyber
5c9a503990 test/ftl: use non-volatile cache in functional tests
This patch adds non-volatile cache to some of the test configurations if
required device exists in the system (regular NVMe disk with separate
metadata support).

Change-Id: I0ea43990b360712361f34aeeb1982755f48b4dc5
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459624
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-07-25 22:36:31 +00:00
Changpeng Liu
28439890e4 nvmf: always update discovery log page if the offset is zero
Global tgt->discovery_log_page may contain old hostnqn log
page, so we will update the discovery log page if the offset
is zero.

Change-Id: Iba24409b16626d157d2782c6813fe5a0c27f1082
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463123
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <shahar.salzman@kaminario.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-07-25 18:05:13 +00:00
Hailiang Wang
563b98223b lib/compress: fix a compilation error for low GCC version
Some low GCC(such as v4.8.5) can't recognize this style:
static struct rte_comp_xform g_comp_xform = (struct rte_comp_xform)
Fix issue #877.

Change-Id: I021c62b7b1437d67ce87cc2e13d1b90ea6a18140
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463126
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-07-25 15:49:24 +00:00
Pawel Kaminski
19359f8669 test/openstack: Add scripts to test spdk-vs-openstack
This test requires openstack to be installed to use it
with spdk target. Also one nvme disk is demanded.
Following steps are taken in run_openstack_tests.sh script:
1. Run spdk target and create lvol store.
2. Restart cinder service to connect with spdk target.
3. Run some tempest tests.
4. Destroy lvol store and close spdk target.

Change-Id: I8c7b7dea3232a5eab1b8a4b96f26cf42ba45e02c
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457301
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-25 15:27:43 +00:00
Tomasz Kulasek
9307ff5a54 net/vpp: move to VPP 19.04
This patch updates net/vpp implementation from version VPP 19.01 to
VPP 19.04.

1. Some binary APIs are deprecated in 19.04 and message queue is used
   to handle control events:

   - vl_api_bind_sock_reply_t_handler by SESSION_CTRL_EVT_BOUND,
   - vl_api_unbind_sock_reply_t_handler by SESSION_CTRL_EVT_UNLISTEN_REPLY,
   - vl_api_accept_session_t_handler by SESSION_CTRL_EVT_ACCEPTED,
   - vl_api_connect_session_reply_t_handler by SESSION_CTRL_EVT_CONNECTED,
   - vl_api_disconnect_session_t_handler by SESSION_CTRL_EVT_DISCONNECTED,
   - vl_api_reset_session_t_handler by SESSION_CTRL_EVT_RESET

2. Fixes for Fedora 29/30:

   - added "-Wno-address-of-packed-member" (DPDK 19.02 fails to compile
     with gcc9.1),
   - force "-maes" compile flag for gcc9.1 to compile crypto_ia32 and
     crypto_ipsecmb plugins (gcc9.1 doesn't do that for -march=silvermont)
   - some minor fixes

3. Default path for VPP instalation is changed for test scripts from
   /usr/local/src/vpp to /usr/local/src/vpp-19.04 to avoid VPP version
   conflict.

Change-Id: I1d20ad7f138f5086ba7fab41d77d86f8139d038e
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459113
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-25 14:51:21 +00:00
Tomasz Kulasek
bee1130c03 net/vpp: prepare vpp 19.01 to move to 19.04
No functional changes done, just reordering for next patch in series.

Change-Id: I32022fddffbc7b00eeecb29a2fcbaa85fbf2e99f
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462473
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-25 14:51:21 +00:00
Wojciech Malikowski
093bc3390a lib/ftl: Wait for IO retry queue drain during shutdown
In case shutdown occurs during band relocation
we can have situation that on retry queue are
some internal IOs and we need to wait to drain
this queue before we start shutdown sequence.

Change-Id: Ie5b33732568aeda0586f4de384b22dcf463bf31e
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460421
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-07-25 14:50:58 +00:00
Mateusz Kozlowski
4d9faf7c6b lib/ftl: Add check if device is halted during reloc
It's possible there's a delay between spdk_ftl_dev_free setting
dev->halt and sending message to core thread which would set
reloc->halt. This patch should bridge this gap and prevent potential
additional/unneeded relocations from happening.

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I3d69fe86900c9233fadd8e3795accb36b1c01791
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461598
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-25 14:50:58 +00:00
paul luse
7384ca015b lib/reduce: for compress path, copy data from host buffers if needed
If the data was not compressed for whatever reason, it needs to be
copied from the host buffers much in the same way as the patch before
this did.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I5c92db16afbce3ca573c556ee78a51ba6511c564
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462895
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-07-25 14:50:25 +00:00
paul luse
907ec7268d lib/reduce: conditionally memcpy data to host follow decompression
If the decompression code path runs into a chunk that wasn't
compressed, the data needs to be copied to the host as the
compression engine was not engaged.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ibabd6d6bd2bc5db79953a0a55d7f49d556c08af7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462892
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-07-25 14:50:25 +00:00
paul luse
0242a80793 lib/reduce: fix problem with size of chunk map area in PMEM
This fixes a segfault found by using a very small logical volume.
The PMEM file chunk map area wasn't including the chunk map struct
itself.  In PMEM, a single entry as returned by _reduce_vol_get_chunk_map()
is made up of a 'struct spdk_reduce_chunk_map' plus one uint64_t for
each backing IO unit for the volume (# depends on vol parms). So when
an app got close to the end of the chunk map indices it would run off
the end of PMEM and segfault.

With this fix that no longer happens however data integrity issues now
show up with fio. I believe this fix is valid though and am pursuing the data
integrity issue as something new.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I69a223064c7bbd44bcd0a62d155cf409603970a3
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461316
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-07-25 14:50:25 +00:00
Seth Howell
30ca1a9083 test/nvmf: fix edge condition in check_ip_is_soft_roce
When individual tests were run with --iso --transport=tcp, the
check_ip_is_soft_rocefunction incorrectly marked the loopback ip address
as soft_roce due to 'lo' matching with a notice message from the rxe_cfg
config command "module rdma_rxe is not loaded". Instead, grep
specifically to make sure that the argument we are matching against,
which is supposed to be an rxe interface name, contains rxe.

rxe interfaces are numbered sequentially as rxe0 rxe1 . . . rxen

Change-Id: Ibe8afb3e038e104173eb1e2bbf671ce9f417ffeb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463127
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-07-25 14:49:17 +00:00
Ben Walker
0e6ddfd66a build: Allow the user to set target architecture in configure
Change-Id: I7f2a1464c0c8872e5e7856a830aaf7ea8cdf4e81
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463013
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-07-24 22:55:06 +00:00
Ben Walker
ebd32197ba build: Allow TARGET_ARCHITECTURE to be specified on ARM
Previously it always forced armv8-a+crc. Now it only does that
if not otherwise specified.

Change-Id: I7c1d73fca8e89779cc3e8780a38f52975488d97a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463012
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-07-24 22:55:06 +00:00
Darek Stojaczyk
30ff7f7d85 dpdkbuild: completely rebuild dpdk on SPDK config change
Configuring SPDK with different options might result
in enabling different CONFIG_RTE_LIB* options, but since
it does not modify any DPDK config files, DPDK doesn't
get rebuilt and keeps using older, potentially outdated
build options.

We'll now clear dpdk/build whenever SPDK config is modified,
which will result in automatically re-configuring DPDK.

Change-Id: I9c7c3434dc317e4f47767d7b3df3df48db2b0d5b
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460563
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-07-24 21:27:16 +00:00
Karol Latecki
5f96e92c8c bdev/pmem: add more descriptive rpc error messages
Improve error messages where possible.
Also change return code values to negative in bdev_pmem.c so that
it follows the same pattern as other bdev modules.

Change-Id: I81b205a41104e15457154d1e31540210636ef9d3
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461548
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-24 18:28:46 +00:00
Karol Latecki
0fc5acea8c bdev/nvme: add more descriptive rpc error messages
Improve error messages where possible.

Change-Id: Ief04cf32f7a65ef94f3d994ca76da2637ba66ca1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461875
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-24 18:27:44 +00:00
Tomasz Zawadzki
438d1beee7 lib/blob: amend docs regarding io_units for spdk_blob_io_*()
Some of the spdk_blob_io_*() still described pages as units
for submission instead of io_units.

No API change is occurring with this patch.

Change-Id: I6530db59de97a494ca7c5bf191e26d2a207c1159
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463067
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-24 18:26:21 +00:00
Vitaliy Mysak
b2caa1f0eb test/spdkcli: test vhost_ctrl show_details method
Add a match test for vhost_ctrl show_details method.
In spdkcli source the equivalent function is `UIVhostCtrl.show_details`.
This method is one of few that left untested in spdkcli.

This patch is related to trello task:
https://trello.com/c/CHOOxcGj/151-spdkcli-extend-test-coverage

Change-Id: I4f13f863bdc815430c5fb2b67b12056f01201f8c
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462860
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: Ben Walker <benjamin.walker@intel.com>
2019-07-24 18:24:22 +00:00
Vitaliy Mysak
56c696a9a7 test/spdkcli: test set_coalescing method
Add spdkcli command that will invoke set_coalescing method
  during vhost test.
This is the only usage of set_coalescing in our tests,
  so it would be nice to at least have an invocation of it.

Following commits will add a match-test that will check if
  set_coalescing worked as expected.

This patch is related to trello task:
https://trello.com/c/CHOOxcGj/151-spdkcli-extend-test-coverage

Change-Id: I15f54d92c4af2cf3f400743425e268b3645a5b3c
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462859
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: Ben Walker <benjamin.walker@intel.com>
2019-07-24 18:24:22 +00:00
Karol Latecki
4462653272 scripts/rpc: change construct_crypto_bdevs args to positional
Arguments for this function were added as optional arguments
and were listed as such by argparse when using rpc.py --help.

This is confusing as all of these arguments are obligatory
in order to create a crypto bdev in SPDK configuration.

Change-Id: I7c31413314f28e44ee008d3d7c28759063700b61
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/460968
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-07-24 18:23:02 +00:00
Tomasz Zawadzki
99b25f1c98 ut/cunit: added missing semicolon on CU_ASSERT macros
This was inconsistent on all CU_ASSERT macros,
so now it is fixed.

Change-Id: I6d20f98528c4041baf02cb419ab9644a45b807c4
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459760
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-07-24 18:21:22 +00:00