Commit Graph

11399 Commits

Author SHA1 Message Date
paul luse
e753402aa1 lib/accel: add RPC to select which accel module should be used
Startup RPC only to avoid issues trying to switch while in use.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I7f1801905de0927f3610c4065182dd8fa88cdfdd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/660
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-18 08:05:34 +00:00
paul luse
aa3cf73311 accel: move code, add/edit comments, etc.
* Moved code around in accel framework as the sw implementation
is included in the same file (it's always present) so that its
easier to differentiate framework functions from sw accel
* Renamed some functions for the same reason
* Added/edit comments to clarify things

All in prep for extending the API to more functions.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I465ee743d999999df4c06e3f68feddcd73c6e6a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/580
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-18 08:05:34 +00:00
paul luse
aa7a13afc7 global: rename copy to accel
The copy engine library, modules and public APIs have been renamed.
Use of the word `copy` has been replaced with the word `accel`
short for accelerator in preparation for adding new capabilities
in the future. Additionally, APIs for what was previously called
the `memcpy` engine have been renamed to identify the engine as a
software accelerator.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia607aa718416146fbba1e6792b8de0f66bd8a5de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/576
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-18 08:05:34 +00:00
Seth Howell
b1daf62be5 nvme: add internal function to iterate over transports.
This will come in handy in the new poll group API.

Change-Id: I9cf14082270b28b35f4a440c5cb2471c81e374ba
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/578
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-18 08:05:08 +00:00
Seth Howell
19260848f6 nvme: publicly declare spdk_nvme_transport
This will be useful in the upcoming spdk_nvme_poll_group api.

Change-Id: Id83340a2ce9887817312f5aac38db4de8c588974
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/577
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-18 08:05:08 +00:00
Ziye Yang
c515a7cab7 sock ut: enable the posix_ut testing in auto test.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ia1c3e68430c44d54ccdc2d42f6c59b1df265f96e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/917
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-02-18 08:05:00 +00:00
Darek Stojaczyk
8c37b10702 sock/posix: fix potential segfault in zero-copy
CMSG_FIRSTHDR could theoretically return NULL. Check it for the
peace of mind.

CMSG_FIRSTHDR() returns a pointer to the first cmsghdr in the
          ancillary data buffer associated with the passed msghdr.
          It returns NULL if there isn't enough space for a cmsghdr
          in the buffer.

Change-Id: I6c7e1eb59121b59c568d3ad7f5eda649a49026f4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/771
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-18 08:04:55 +00:00
Karol Latecki
71efe5db24 Fix Markdown MD026 linter warnings - trailing punctuation in header
MD026 Trailing punctuation in header

This rule is triggered on any header that has a
punctuation character as the last character in the line

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3ab4894092ef6b5f920d89b74e43c2e46e9581c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/657
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:07:21 +00:00
Karol Latecki
93be26a51d Fix Markdown MD022 linter warnings - headers blank lines
MD022 Headers should be surrounded by blank lines

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I768324b00fc684c254aff6a85b93d9aed7a0cee5
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/656
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:07:21 +00:00
Karol Latecki
8ba413a7a4 Fix Markdown MD019 linter warnings - multiple spaces after header
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I6f7bd6db36feb723aceac74df4136a22ef01deb1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/655
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:07:21 +00:00
Karol Latecki
a41c031609 Fix Markdown MD012 linter warnings - multiple blank lines
MD012 - Multiple consecutive blank lines

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3f48cdc54b1587c9ef2185b88f608ba8420f738b
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/654
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:07:21 +00:00
Karol Latecki
c344dac9cc Fix Markdown MD003 linter warnings - header style
MD003 - Header style
Triggered when inconsistent header styles are used accros file.

Also adjust other headers in file to fix
MD022 - Headers should be surrounded by blank lines
MD025 - Multiple top level headers in the same document

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I1937abc0d29dc8a21a8eac54d0af2427ebf95bdc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/653
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:07:21 +00:00
Shuhei Matsumoto
39068b6b5c lib/iscsi: Fix a scan-build warning
1 warning generated.
  LIB libspdk_nvmf.a
iscsi_subsystem.c:1285:25: warning: Result of 'calloc' is converted to a pointer
of type 'struct spdk_iscsi_sess *', which is incompatible with sizeof operand type 'void *'
        g_spdk_iscsi.session = calloc(1, sizeof(void *) * g_spdk_iscsi.MaxSessions);
                               ^~~~~~    ~~~~~~~~~~~~~
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

Change-Id: Ieb8dcac8ec172405c5ca97a4867582ff9bfaa569
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/827
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-17 10:06:47 +00:00
Shuhei Matsumoto
aefe3fe23c lib/iscsi: Remove dry run processing from portal config file parsing
Dry run processing in iscsi_parse_portal() now only checks if
portal string is not NULL. Portals are managed not by fixed size
array but linked list now. Hence dry run processing is not needed
itself now.

So remove the dry_run parameter from iscsi_parse_portal() and
the dry run loop in iscsi_parse_portal_grp().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib7cb444b51581b8ee603388aad34bc58d1cc9023
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/493
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-17 10:06:47 +00:00
Shuhei Matsumoto
16724dc135 lib/iscsi: Free session pool after all connections are exited
Global session pool had been freed immediately after starting
connection shutdown.  iSCSI connection shutdown is asynchronous.
It will be safe to free global session pool after completion of
all connections shutdown.  Hence move free(g_spdk_iscsi.session)
from spdk_iscsi_fini() to _iscsi_fini_dev_unreg().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4c16930a0e861a190115049cba3739ec01f0a8a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/494
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>
2020-02-17 10:06:47 +00:00
Shuhei Matsumoto
de5f1ea0ba lib/iscsi: Create and terminate poll group threads explicitly
Login acceptor still runs on one of the default reactor threads,
but we move iSCSI poll group from the default reactor threads to
dedicated threads created at startup.

At startup, use reference count to detect completion and
move to the next step. By returning completion message to the init
thread, we can avoid using any atomic operation.

At shutdown, we can use spdk_for_each_channel() conveniently. Put
voluntary spdk_thread_exit() calls into the callback to
spdk_put_io_channel().

Moving login acceptor to a dedicated thread is another task.

To maintain the original behavior, number of threads created is
the number of cores that SPDK app uses.

Change-Id: Ifd1de9343ac0183254ca608d1fd8faa94acc254e
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/492
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>
2020-02-17 10:06:47 +00:00
Shuhei Matsumoto
7d26adb6c0 lib/iscsi: Move iscsi_parse_configuration() up in a file
This is a preparation to the next patch. We don't have to pass
iscsi_parse_configuration() as an argument of
initialize_iscsi_poll_group(). We can refer iscsi_parse_configuration()
directly in initialize_iscsi_poll_group() instead.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I96715399e68ebfa0d292c0b4591d271e975e1a04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/491
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>
2020-02-17 10:06:47 +00:00
Shuhei Matsumoto
239a407897 lib/iscsi: Send message to request logout to active connection
The next patch will create a SPDK thread for each poll group at
startup. Hence iSCSI connection will be created or destroyed on
these threads. On the other hand, logout request to the active
connection will be still invoked by the default thread.

This unmatch will hit assertion such that poller is unregistered
different thread that registered it.

Fix this unmatch by sending message to the thread explicitly to
request logout and wait for the logout process to start.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iff361e78b9ba077230e38d9586f7187968e33314
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/490
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>
2020-02-17 10:06:47 +00:00
Shuhei Matsumoto
5adeda4807 lib/iscsi: Send message to add connection to poll group even at startup
The next patch will create a SPDK thread for each poll group at
startup. Hence iSCSI configuration management will be done by
different thread from these poll group threads.

Hence send message explicitly to add connection to poll group even
at startup. We can do this for the current master branch.

Remove some code related with SPDK thread framework from unit tests
for iSCSI portal group because thread management is moved to
connection.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I40cacdb2066f65866f7ef83cf3b3e4e8b8cd322e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/489
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>
2020-02-17 10:06:47 +00:00
Alexey Marchuk
f8cbdf2c81 rdma: release incomplete requests during qpair desctruction
qpair might be deleted with incomplete requests (e.g. when NIC
is removed or when huge amount of qpair are being destroyed
simultaneously), this reduces the capacity of the transport
buffers pool. Check that qpair qd is nonzero and process
requests whose state is not FREE. Processing of requests
when qpair is being deleted leads to their release.

Change-Id: I0e42b5cb78f35add9f37942db77781db72c1e59c
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/676
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>
2020-02-17 10:06:38 +00:00
Alexey Marchuk
33204a4354 nvme/tcp: Align local variables types
Some of variables have types which don't match their
usage in code

Change-Id: Ic2bd5fd6561c70143dde436ce9cddc0be4d3b0d0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/521
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-17 10:06:30 +00:00
Alexey Marchuk
8c1859067f nvme: Move trid to "cold" spdk_nvme_ctrlr section
This field is not used in data path, so move it to "cold" data

Change-Id: I25f2fdb3aff613f9e16a2e13b2b06f8180a60fb2
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/520
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-17 10:06:30 +00:00
Alexey Marchuk
c3ba9127d0 nvme: Store NVMEoF ioccsz and icdoff in ctrlr structure
This allows to avoid calculation of ioccsz bytes on each request
and removes access to "cold" ctrlr structures in data path.
Add UT to check validness of calculation

Change-Id: I55ceff99eb924156155e69a20f587a4f92b83f0b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/519
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-17 10:06:30 +00:00
Ben Walker
450d19d117 nvme/cuse: Don't allocate data buffers from CMB for cuse commands
These data buffers can't later be freed and need to be carefully
managed by the host. Also, this is very likely slower.

Change-Id: I0d205c0c7136e0aa972e927361bd88e765d218c6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/784
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:06:20 +00:00
Ben Walker
5ac51a3214 nvme:Make ctrlr_alloc_cmb_io_buffer optional for transports
If the transport doesn't define one, don't call it.

Change-Id: I8b83132f9fc0accbd4faa8fa0fc17a6bd11e543e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/783
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:06:20 +00:00
Ben Walker
c29cca539d nvme/pcie: Don't allow both sq and data in CMB at same time
This is allowed by the specification, but preventing using both
of these features simultaneously will make some upcoming patches
much simpler.

Change-Id: I1abb7d9c02c105a50b1603bfab8eec2025289123
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/782
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: Changpeng Liu <changpeng.liu@intel.com>
2020-02-17 10:06:20 +00:00
Ben Walker
c96579410e nvme/pcie: Put all CMB-related registers into a struct
Keep them grouped together for clarity.

Change-Id: I51be01802b69aa722dec458fda56e4e396edbfeb
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/781
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-17 10:06:20 +00:00
Ben Walker
b649a1dc3e nvme: Add new NVMe 1.4 definitions for controller memory buffer
Change-Id: I00f1880a6b0f018c291d015b3f65a7579541c069
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/837
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-17 10:06:20 +00:00
Maciej Wawryk
344c318464 scripts/vagrant: Create prebuild box and allow using spdk boxes
Build local vagrant box and add it to local vagrant box list.
Check if spdk box exist and use it instead of generic boxes.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ib3b87c9783354680657f96b5b5adea1706712c5e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/848
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@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>
2020-02-17 10:06:09 +00:00
Maciej Wawryk
dd9a88cc7f scripts/vagrant: Unified distribution names in Vagrantfile and create_vbox.sh
Remove unnecessary case statement in Vagrantfile

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I6aa5d0650d268851ee5af73ffc2aa54d9396fec5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/834
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-17 10:06:09 +00:00
Maciej Wawryk
22310f6176 scripts/vagrant: Make the Box as Small as possible
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I23b92fb6ef7d1169712f81d6d842db3981b8f764
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/677
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-17 10:06:09 +00:00
Maciej Wawryk
58e6ef44f8 scripts/vagrant: add option to build box for spdk
New option --package-box will install all dependencies needed to build SPDK

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

	bdev_nvme_apply_firmware

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

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

Change-Id: I692d4ec9d078acfc4c28aa7b0f40c0acd7c8af12
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/756
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:05:35 +00:00
Alexey Marchuk
c29247e1fe nvmf/rpc: Destroy subsystem if spdk_rpc_nvmf_create_subsystem fails
Destroy subystem if spdk_nvmf_subsystem_set_sn or spdk_nvmf_subsystem_set_mn
failed. Check status in spdk_rpc_nvmf_subsystem_started callback, destroy
subsystem and report an error on error.

Fixes #1192

Change-Id: Id6bdfe4705b5f4677118f94e04652c2457a3fdcc
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/832
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-17 10:05:27 +00:00
richael zhuang
94b04d4f2c test: solve error about uninitialised data_buf
When running sock_ut in fedora29 with memcheck, there is an error
"Syscall param sendmsg(msg.msg_iov[0]) points to uninitialised
byte(s)".

Signed-off-by: richael zhuang <richael.zhuang@arm.com>
Change-Id: Iaddb85ed2da2f45e200569c936f05174bc89c99b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/874
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-17 10:05:18 +00:00
Darek Stojaczyk
dcac8e9706 memory: reverse the order of calling mem_map unregister cb
Memory maps might be dependant on one another, so
make sure their dependencies are unregistered after
the dependees.

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

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

Fix issue #1133.

Change-Id: I115ff97113915630f539c3458c57116d9ff16179
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/668
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-14 09:37:45 +00:00
Changpeng Liu
2505b93862 blobfs: remove _file_read() function
_file_read() is only be called in spdk_file_read() API, and we only
need to count the children IOs sent to the backend, and skip the IOs
which hit the cache buffer.

Change-Id: I36e4a464e5810beaf30f1b580dc15ea3d3a68582
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/667
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-14 09:37:45 +00:00
Changpeng Liu
19d5c3ed8e rocksdb: free existing channel when allocating a new channel
ASAN will report memory leak if we didn't free the old thread context,
it's related with Rocksdb version, I didn't get this issue with Rocksdb
v5.6, but Rocksdb v5.14 and v5.18 will complain the memory leak.

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

Resolves #840

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

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia3bdb5e4cd9f65bd65f84853ed2f5df1b26dd952
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/820
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:52:46 +00:00
paul luse
017f875132 module/gpt: use correct ch when queueing IO
Was using the ch provided by submit(), needs to use base ch

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4ac4ec6d4e1810ede622d3625b9c9e74b690ed8c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/819
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:52:46 +00:00
paul luse
223108d16e module/opal: fix use of wrong ch when queueing IO
Was using the ch provided at submit, needs to use the base ch

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I383eb418a6448b829c25da5eb2f75a9420475ca2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/817
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:52:46 +00:00
paul luse
dc6da12cba module/delay: use the correct ch when queueing IO
Was using the ch provided by submit, should be using the base ch

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2f49dcd62c246f72b11abd24ef4674ff529fefaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/816
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:52:35 +00:00
paul luse
31851b152c module/compress: use the base bdev channel when queueing IO
Was incorrectly using the channel provided by the submit function.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I97ca626906508e00959d24009017be9106a1ce60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/815
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:52:22 +00:00
paul luse
7b16d58b1f module/passthru: fix bug with queueing IO to bdev layer
The PT channel was used as a parameter for spdk_bdev_queue_io_wait()
when it should have been the underlying base bdev's channel.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I6c4cf32016935a20eafd565e5688ffc43b1d9533
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/790
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-13 09:52:02 +00:00
Seth Howell
a95a92208d doc: update system_config to include igb_uio.
This will be a useful workaround for kernels which don't support binding
NVMe drives to uio_pci_generic.

Change-Id: Idf895882c1a5adb50935083c9176b3af0ddd637e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/814
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-13 09:51:54 +00:00