Commit Graph

458 Commits

Author SHA1 Message Date
paul luse
946853736a module/crypto: fix one missing free() in error path
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I28b6c149ea341bbacf0d884c1bb0a7287076c9c9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483530
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-02-03 12:46:59 +00:00
paul luse
1880df4daf module/crypto: fix comment block for create_crypto_disk()
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ibcf49c84bd23fb8c8de631e79fea15d0f367b204
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483528
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-02-03 12:46:59 +00:00
paul luse
b8a618db14 module/crypto: use the correct error code for rpc decode failure
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iabea7dfeaae7a57c8cbc2781882ee9e1600058a2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483527
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-02-03 12:46:59 +00:00
paul luse
17f7cf9b29 module/raid: fix typos in comments
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iafacd934a04c0f162f38b80a03e278c97ff4d5d3
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482601
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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-03 12:46:22 +00:00
paul luse
e914958951 module/compress: rename set_compress_pmd RPC to match convention
set_compress_pmd -> compress_set_pmd

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Icb1ecc7adfe10485c44f98ab9e31eaa6857596e7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482597
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-31 12:37:31 +00:00
Ziye Yang
08249f00b5 sock/posix: Change the return type of function _sock_check_zcopy
Purpose: The function spdk_sock_request_put may
return an error code, and close the socket, so we should change the
return type of  _sock_check_zcopy.

If the return value of  _sock_check_zcopy is not zero,
we should not handle the EPOLLIN event.

Fixes #1169

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ie6fbd7ebff54749da8fa48836cc631eea09c4ab8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483311
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-01-31 09:29:07 +00:00
Tomasz Kulasek
8b74c02390 bdev/nvme: fix crash when invoking apply_firmware RPC
When structure for output of json decoders in not initialized
spdk_json_decode_string may fail trying to free uninitialized
string.

This patch changes mallocs used to allocate context and structure
for output of decoder with calloc.

Fixes #1151

Change-Id: I180b2ec52350b4ca90e7c318b4f2d13af554ec49
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483107
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-28 15:41:26 +00:00
Ben Walker
7ef33c86b8 sock/posix: Zero copy send
If available, automatically use MSG_ZEROCOPY when sending on sockets.
Storage workloads contain sufficient data transfer sizes that this is
always a performance improvement, regardless of workload.

Change-Id: I14429d78c22ad3bc036aec13c9fce6453e899c92
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471752
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: Or Gerlitz <gerlitz.or@gmail.com>
2020-01-27 17:42:24 +00:00
Maciej Szwed
34bac0bad6 bdev/nvme: Fix compare and write command completion
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I16f6842703eead32318d2aca53cbf1e2b5b15bce

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481976
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-27 17:39:52 +00:00
Maciej Szwed
058ec60eab bdev/nvme: Fix: bdev_nvme_comparev_and_writev using only compare iovs
bdev_nvme_comparev_and_writev function takes as an argument
only iovs for compare operation and uses them for write
operation. It should also take iovs for write operation.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481806
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-27 17:39:52 +00:00
Maciej Szwed
8a3042b714 bdev/nvme: Fix comments in nvme_bdev_io structure
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I04b310a9f50c1728b9cd260517591c5e9108cc95

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481673
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-27 17:39:52 +00:00
Mike Carlin
076821454d lib/nvme: fix hotplug trtype 256 not available
There was an issue in the hotplug poller where it would fail to
probe the added/removed nvme pcie devices due to an error trying
to find the PCIe transport type. This happened because the
`struct spdk_nvme_transport_id` needs to have its trstring filled in
after a change was made to get transports by name to allow for custom
transport types. This change fills in the trstring so that downstream
checks correctly pass.

Fixes #1159

Change-Id: I35d2834f3ba58a8e6f8e91d290c1f4cb9c158e5a
Signed-off-by: Mike Carlin <mikefcarlin@protonmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482449
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-01-23 16:40:29 +00:00
Konrad Sztyber
42226f33ed bdev/ocssd: store nvme_bdev_ns in a separate variable
Change-Id: I5a8cb443929c0749aa50e19da1a57244479d2895
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482411
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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>
2020-01-23 04:05:39 +00:00
Konrad Sztyber
d5ffabca72 bdev/ocssd: verify namespace population in notification cb
Each namespace should be checked if it is populated when handling chunk
notifications.  Otherwise we risk segfaulting if a namespace gets
depopulated before the notification callback is executed.

Change-Id: Ic55104a52087b1ea7090eeaede3e2221682cd331
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482410
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
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>
2020-01-23 04:05:39 +00:00
Changpeng Liu
56c7da0e3b bdev/nvme: check the return value for spdk_nvme_probe_poll_async()
When there is an error returned from low level driver, we should unregister
the poller and free the context, or it may get double free when reaching next
poll round.

Fix issue #1156.

Change-Id: I34ca605f11249b885756d761291aebbb7a382d7e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482215
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-01-23 02:41:41 +00:00
Shuhei Matsumoto
2c8ddd08bd module/crypto: remove need to allocate a buffer for writes
Use new bdev aux buf feature.  Huge performance benefit for writes.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I5a27460a369ef5f13bf490a287603e566071be41
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478384
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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-01-23 02:36:51 +00:00
Ziye Yang
be6aa42708 sock/vpp: Add spdk_vpp_sock_writev_async support
Purpose: To support SPDK iSCSI target applications
when it uses spdk_sock_writev_async.

PS: for some duplicated code between posix and vpp,
we should consider it later. Since if we do it early,
if it cannot be abstracted in the common header,
it will invoke addtional work.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I30d8ee81f80ea5e74c53ff726ee44b0612867c71
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481749
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-23 02:29:58 +00:00
Jacek Kalwas
a715543325 nvmf: change default connection scheduler
CONNECT_SCHED_TRANSPORT_OPTIMAL_GROUP is preferable to use by default
for rdma/tcp and CUSTOM transport types.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I1d0e89e6e48e69bfd3c99247c79193f75a4bf264
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481770
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-22 13:53:45 +00:00
Or Gerlitz
8e8a5f7c28 nvme/tcp: Use writev_async for sending data on sockets
Amortize the writev syscall cost by using the writev_async socket API.

This allows the socket layer to batch writes into one system call
and also apply further optimizations such as posix's MSG_ZEROCOPY
when they are available. As part of doing so we remove the error
return in the socket layer writev_async implementation for sockets
that don't have a poll group.

Doing so eliminates the send queue processing.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Change-Id: I5432ae322afaff7b96c22269fc06b75f9ae60b81
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475420
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-22 13:53:09 +00:00
Or Gerlitz
e61b0904a8 sock/posix: Add flush
Initiator drivers (e.g nvme/tcp) don't use poll groups but rather directly
poll the qpair. In this case we want to allow the polling function (e.g
_qpair_process_completions()) to flush async writes pending on the socket.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Change-Id: Ibd8c73691213d58e287b7110d0f5a381a89a64d0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475419
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-22 13:53:09 +00:00
Mateusz Kozlowski
a6ff97602c bdev/zone: Zone append handling added to vbdev
Changed write function to be able to work in zone append mode.

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I3af98f1d8e69eac6922e19addebabbc6ce847c63
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468042
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
2020-01-21 08:43:31 +00:00
Mateusz Kozlowski
68c3a79a15 bdev/zone: Add finish zone handling to zoned vbdev
Handle finish zone management function to zoned block vbdev

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: Iffe24572609e741a79b6bb92f72b56cede4906ca
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468041
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>
2020-01-21 08:43:31 +00:00
Mateusz Kozlowski
011cc5d61c bdev/zone: Add close zone handling
Handle close zone management function to zoned vbdev

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I001e25a157ba738724012ca366ef901016733944
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468040
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
2020-01-21 08:43:31 +00:00
Mateusz Kozlowski
d8ccf6e7e5 bdev/zone: Read IO handling
Added handling of reads to a zone; blocks outside of a write pointer
are zeroed out.

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: Iaf60d6ff74caf9831998862e048446ccd0a0fa3f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468038
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>
2020-01-21 08:43:31 +00:00
Mateusz Kozlowski
ab1641eb30 bdev/zone: Write handling
Added handling of write commands, including zone state changes and write
pointer updates.

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I576ca18b52474bb299c20296a7561f25e5afa85b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468037
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
2020-01-21 08:43:31 +00:00
Mateusz Kozlowski
d530c103ab bdev/zone: Open and reset zone handling
Add handling of two of the zone management commands for vbdev.

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I2868a96d15acbc2d13d18dea405b6d98cb4573d6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468039
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>
2020-01-21 08:43:31 +00:00
Michael Haeuptle
c9874b91a7 lib/nvmf: custom admin handler config
This commit disables the custom identify handler by default.
The user has to explictly enable this handler via the set_nvmf_config
RPC or conf file.

Change-Id: I767816ba7639ebe78683993408ce6db02c7620fe
Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479603
Community-CI: 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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-20 09:56:35 +00:00
Michael Haeuptle
3fa2205647 lib/nvmf: custom admin cmd handler
This commit provides the capability to install a
    custom admin command handler for NVMF.
    It can be used to implement or replace NVMe admin commands that
    are currently not handled by the NVMF subsystem.

    The handler implementation is pretty generic and the handler function
    has to figure out what to do with the command based on the bdevs
    that are configured for the subsystem.
    In cases where admin commands need to be forwarded to an NVMe bdev,
    the commit provides functions that allow access to the underlying bdev.

    There is an example handler in lib/nvmf/custom_cmd_hdlr.c.

Change-Id: I4f9d538c53669c176a836e8bdd379db0070a87dc
Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479167
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: <jacek.kalwas@intel.com>
2020-01-20 09:56:35 +00:00
paul luse
989261d6c3 module/crypto: load balance QAT qp assignment
For the latest QAT devices there are 3 CPMs each with 16 VFs and
2 qp each VF. To load balance for multi-thread operations we want
to assign each new queue pair (QP) on a per CPM (processing module)
basis so this patch assigns the next QP, for QAT,  by taking the
last + 32 modulo the total number of QP. This will results in each new
channel getting a QP on the next CPM.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iea608ada68517b6f2faecd45701c7aae6d23a2d0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477082
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-17 14:07:12 +00:00
paul luse
1a6878db61 module/crypto: break out device/qp code into helper function
Mainly to make it way easier to write the UT in the next patch
in the series.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I00b00d8a83edfad51f3945c49764ae6442fb6f52
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477332
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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-01-17 14:07:12 +00:00
paul luse
5db021089d module/crypto: split global device/qp list into one per PMD
Previously one global list of device/qp combinations was used
regardless of PMD and when assigned, the device name was checked
to make sure a matching one was pulled from the list.

Later in this series a patch will make use of having different
lists as we discovered a decent way to load balance QAT but the
implementation with all PMDs on one list was too complex.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I54dfbd0206a881d126831ba27a4ae05cdc6f7c11
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477152
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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-01-17 14:07:12 +00:00
Wojciech Malikowski
39965ab048 lib/ftl: Change "lbk" name to "block"
"lbk" name is more OCSSD specific so in
generic FTL "block" name is more suitable.

Change-Id: I792780297b792bf5e02f13cc20346da56b032918
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472284
Community-CI: 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: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-17 08:59:08 +00:00
Mateusz Kozlowski
c3e3e81a50 bdev/zone: Get zone info
Added handling of get zone info command

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I2d80885af83345c945af22a46a41abf55e1eb413
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468036
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: 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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-16 09:13:55 +00:00
Kozlowski Mateusz
3ba5dd2852 bdev/zone: Per zone information
Added zone specific information during initialization (starting LBA,
capacity etc.)

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: If0599960f0f872117691c801dce497649da20da6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468034
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-01-16 09:13:55 +00:00
Ziye Yang
d1a8a7bee1 sock: Add a priority parameter in SPDK_NET_IMPL_REGISTER
Purpose: Prepare for setting priorities for different
kernel based sock implementations.

The g_net_impls list is maintained in decreasing order
according to the priority of each sock implementation.

For examaple, if there are 3 sock implementations, i.e.,
posix (priority = 0), vpp (priority = 1), sock_ut (priority =2),
then the list will be maintained as:
sock_ut -> vpp -> posix.

Then if users use spdk_sock_open/listen with impl_name as NULL,
then the order to try is: sock_ut, vpp, then posix

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I43899de5bac14751ab060a11eb814cd7a0a83cc6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479488
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-16 09:11:32 +00:00
Seth Howell
b397546e9d lib/nvmf: get_transport now takes a string.
This function previously accepted a trtype enum, but needs to be able
to accept a string to support custom transports.

Change-Id: I931aed30ca3be65468552ffa1bb1ef3f91275fda
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479601
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>
2020-01-16 09:10:38 +00:00
Seth Howell
5b3e6cd137 lib/nvmf: opts_init and transport_create use string now.
This will help enable pluggable NVMe-oF transports.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1947cc2e6e4ff078609f8bdbbdfefc5b110674c2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478753
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>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
2020-01-16 09:10:38 +00:00
Seth Howell
7ed0904b9b lib/nvme: update trid struct with trstring.
The trtype should be stored as both an enum and string. This is intended to
help pave the way for pluggable NVMe-oF transports.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I6af658d7a17c405e191ff401b80ab704c65497e7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478744
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: Alexey Marchuk <alexeymar@mellanox.com>
2020-01-16 09:10:38 +00:00
Maciej Szwed
32a961fc5d bdev: Add check for atomic compare and write unit
Compare and write fused operation num_blocks should
not exceed value of 'atomic compare and write unit'.
In case of NVMe native support we should read this
value from 'namespace atomic compare and write unit'
if set in namespace identify data, otherwise from
'atomic and write unit' field in controller identify
data. If bdev does not support this natively we should
set this value to 1.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib1ea02dbf9d1eed476d9dd0114ea96b1376e0c45
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477911
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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>
2020-01-15 12:25:26 +00:00
Maciej Szwed
61d6254d18 bdev/nvme: Add bdev_nvme_comparev_and_writev function
This function will be used for NVMe which supports
fused commands natively.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I5c41d98e1830ea9e14a521ccb06c6e9284857eb6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477026
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>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-15 12:25:26 +00:00
Wojciech Malikowski
8ffec69bff bdev/nvme: ftl_managed flag is no longer needed
bdev_ftl is virtual bdev now and is not associated
with nvme_bdev anymore so ftl_managed flag could be
removed.

Change-Id: I720e05aed9c36a9d36079276fbd27fe9ad70c0c0
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478614
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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-15 12:24:44 +00:00
Wojciech Malikowski
151e37cfaa bdev/ftl: Examine config support
Bdev FTL is dependent on base bdev and cache
bdev. Allow for examine config if dependent
bdevs are not ready during bdev FTL creation.

Change-Id: I917994d7015f3b74a29ccd066f0c6989ad3c1c4e
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471375
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-15 12:24:44 +00:00
Wojciech Malikowski
e2e6254651 bdev/ftl: Remove NVMe dependencies
This patch changes FTL bdev to vritual bdev.

Change-Id: I7b96af56053874b670a76b910a846837396119d9
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479703
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-15 12:24:44 +00:00
Wojciech Malikowski
843f296e2e lib/ftl: Replace Open Channel dependencies with zone bdev API
This patch replaces NVMe Open Channel API usage
inside FTL library with corresponding zone bdev
API calls. This include following calls:
 - spdk_nvme_ctrlr_cmd_get_log_page -> spdk_bdev_get_zone_info
 - spdk_nvme_ocssd_ns_cmd_vector_reset -> spdk_bdev_zone_management
 - spdk_nvme_ns_cmd_read -> spdk_bdev_read_blocks
 - spdk_nvme_ns_cmd_write_with_md -> spdk_bdev_write_blocks

Change-Id: I1b5a6863d9ce72f4af1cfbb0e449fc1a5b638144
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479702
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-15 12:24:44 +00:00
Changpeng Liu
e7379fc22f virtio: remove VHOST_USER_F_PROTOCOL_FEATURES from virtio.h
spdk_internal/vhost_user.h head file defines common vhost user
protocol, and it can be used both in the vhost target and virtio
initiator, so remove the definition from virtio.h.

Change-Id: I1fac1cb5a16f803cd0d49962c07d2179f881c76a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478411
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-01-10 08:45:45 +00:00
Wojciech Malikowski
2ff623b504 bdev/ftl: spdk_ftl_module_(init|fini) are not longer needed
There is no need for spdk_ftl_module_(init|fini)
after ANM functionality was removed from FTL lib.

Change-Id: Id8d05aed8620217869c56fca35b490bc9c716541
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472335
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-01-10 08:42:51 +00:00
Wojciech Malikowski
52a9661d94 bdev/ftl: Remove punit parameter from ftl bdev configuration
FTL library is consuming whole OCSSD device
so punit parameter is not needed for bdev ftl
configuration.

Change-Id: I56f62ea6d09b3157b70c02ccfffcd3cb07ba4597
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467950
Reviewed-by: Konrad Sztyber <konrad.sztyber@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>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-10 08:42:51 +00:00
GangCao
70db9e5cb9 bdev/nvme: allow the nvme opts set when no nvme bdev configured
In the case that there is no NVMe bdev configured and RPC is
running, it shall still allow the NVMe options set. Once there
is one NVMe bdev configured, it will not allow the NVMe options
set.

Change-Id: Ib6a527174137a5d4df7babe206d2527e600500c0
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479489
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>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2020-01-08 15:47:30 +00:00
Maciej Szwed
8ce615e4ee bdev/nvme: Add bdev_nvme_comparev function
This patch adds support for compare operation in
bdev nvme layer.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iac54e85af5b377d10124c72e26ed2a4d8f078af4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477457
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
2020-01-07 12:31:32 +00:00
GangCao
5d541746f3 nvmf: properly cleanup when failing to create subsystem
In the case of using CONF file, if two subsystems are assigned
with same subnqn, it fails at the second subsystem creation,
however the state machine is not set correctly.

The fix here is to properly set the state machine to roll back
the operations and destroy the created subsystem and exit the
application cleanly.

Change-Id: I4356802a12f7a2982485f61a69eceeb979033788
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476904
Community-CI: 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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-01-07 12:20:44 +00:00
Ziye Yang
c322751769 nvmf/tcp: Add the sock priority setting in conf file.
We already support in rpc and we also need the support in conf
file.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic0d64c48c21954d913ef7345ce35a767e8e285bd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476186
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-01-07 12:20:20 +00:00
Shuhei Matsumoto
25c5e3f59d lib/event: Rename context switch monitoring APIs to be concise
spdk_reactor_enable_framework_monitor_context_switch and
spdk_reactor_framework_monitor_context_switch_enabled had been
a little long and not easy to get the meaning.

spdk_framework_enable_context_switch_monitor and
spdk_framework_context_switch_monitor_enabled will be a little
more concise, and hence change the names accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5f1d50e8b62846cbd0f91b94f94cbaf16fefa39b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478538
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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-01-03 08:33:25 +00:00
Shuhei Matsumoto
876fdf2a59 event/rpc: Add framework_get_reactors RPC
Add an new RPC `framework_get_reactors` to retrieve list of all
reactors.  Running threads on each reactor are included
in the output.  Update jsonrpc.md and CHANGELOG accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I985d087dd41afe3033b7678af141ec8e5a2a822e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478027
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2020-01-03 08:33:25 +00:00
Ziye Yang
cebc20d9be uring: Add a uring.h file.
Purpose: The liburing library has recently changed the liburing.h,
io_uring_enter is removed in liburing.h, so proposed this patch
to fix this issue.

And after applying this patch, it could work for both old and new
liburing library.

Change-Id: Ifdfe74038f626d36ae8cf1fb01efc297814f094a
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478576
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-30 11:45:51 +00:00
Ziye Yang
232756e119 ioat copy engine: free the registered io device.
The registered io_device by spdk_ioat_copy_engine
is not freed, and we should free it.

Since spdk_ioat_copy_engine is a static variable,
which can not be referenced by the function defined
before this variable. So we also adjust
the location of copy_engine_ioat_exit.

Change-Id: Ic196fe3234655c81364b3b4ceccd715979545f8e
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478838
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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>
2019-12-30 03:09:01 +00:00
Wojciech Malikowski
77d591e172 lib/ftl: Change ftl_chunk structure to ftl_zone
This is starting point for moving current FTL
implementation which is working on top of
Open Channel NVMe driver to work on top of
abstracted zoned bdev.

This patch is changing name of ftl_chunk structure
to ftl_zone and start using zone states from zdev
interface.

Change-Id: I5429f489cc08a1ac27f09aba3dca4b40ea95eeb3
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467391
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: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:14:55 +00:00
Konrad Sztyber
926ea79ab8 bdev/ocssd: fixed leaking range buffer
The char* buffer storing parallel unit range was never freed in
bdev_ocssd_create RPC call.

Change-Id: Ic24f09c441fa8edba432425c9e2d969cacec8518
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478612
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-23 08:43:34 +00:00
Konrad Sztyber
6db4a00c58 bdev/nvme: depopulate namespaces in module_fini callback
Currently the namespaces are depopulated in two cases: if the controller
is detached (either due to its hot unplug or RPC call) or due to
"namespace attribute changed" asynchronous event.  It means that during
shutdown, when nvme_bdev_ctrlr is destroyed, the namespaces aren't
depopulated.

For regular NVMe namespaces it isn't a big issue, since their only
depopulate task is to unregister bdevs created on that namespace, which
is already done by the bdev layer.  However, it can be a problem for
other types of namespaces (e.g. Open Channel), as they might allocate
their own context in nvme_bdev_ns.type_ctx, which, unless the namespace
is depopulated, cannot be freed.

Change-Id: I91c7f2a50b206b45eb5bdcada278d6454c4cf144
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478190
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-12-23 08:43:34 +00:00
Seth Howell
26a02f72e8 bdev/crypto: remove asserts around vtophys calls
The IOVA is only needed by the QAT PMD. In order to allow the other PMDs
to support the alignment requirements of the underlying bdev, we need to
remove the asserts that assume a specific alignment for buffers.

Change-Id: Id659cd833cf827d42c400e577afe140a0af26233
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478375
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: Paul Luse <paul.e.luse@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-12-20 10:06:47 +00:00
Seth Howell
1384ad007c module/bdev: add zcopy abilities to virtual bdevs.
These bdevs claim native support for zcopy operations. They should
actually support them when running on top of a bdev that claims zcopy
support.

For example, if you were to build a part or passthru bdev on top of a
malloc_bdev (which is just for testing primarily) and then try to run
bdevperf on top of that, you will currently get errors. This patch fixes
that problem.

Change-Id: I023557a3a5b1baf177cc29f1cbc1cd391cc67a8a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478243
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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-12-20 10:06:47 +00:00
Konrad Sztyber
01f356ab70 bdev/ocssd: pause / resume pending_poller
Pause and resume pending_poller instead of registering it each time a
request needs to be dealyed.  This should improve performance for
workloads during which the poller is constantly paused / resumed.

Change-Id: I951bf0a3e4bf7e0fda2d485958f2f40ff47bf8d6
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477921
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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-12-20 10:02:15 +00:00
Konrad Sztyber
f4576dec88 bdev/ocssd: media management events
This patch adds the logic for retrieving chunk notification log and
translating it into media management events to be sent to appropriate
Open Channel bdev.

Change-Id: I7e4860eda23e61d6208fc5f5861e8fd2b75685d3
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471461
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-20 10:02:15 +00:00
Konrad Sztyber
64fe514efa bdev/ocssd: parallel unit ranges
This patch adds the ability to create bdevs on specified parallel unit
ranges on one OCSSD controller.  It allows the user to create multiple
isolated bdevs, each operating on a separate set of parallel units.

To create a bdev on a specified range, a new parameter -r|--range was
added. For example:
 rpc.py bdev_ocssd_create -c nvme0 -b nvme0n1 -r 0-4

will create a bdev on parallel units 0 through 4 (inclusive).  If the
parameter is ommited, the bdev will span across all available units.

Change-Id: Icd94cf1e22fcc72806ef1ce1efd2d7031010009f
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469898
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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-12-20 10:02:15 +00:00
Konrad Sztyber
3a58b2fb2f bdev/ocssd: append command
This patch adds support for the append operation.  The user doesn't need
to specify the exact location of where the data should be placed, but
only need to pass starting LBA of a zone to append to.  The user can
retrieve the address the data was written at during completion callback.

Change-Id: Ic03abcf2e7a953a7a229a6b6b6122fffa01cb714
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469120
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
1ad438311e bdev/ocssd: request resubmission
If a spdk_bdev_io cannot be completed, because it is sent to a zone that
is currently busy, reschedule its submission.  This mechanism will be
used by appends, as mutliple append commands can be directed to the same
zone at the same time.

Change-Id: I60da2bd1835380812d22536ea275fb8fed9f8561
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477437
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
ffd53b6bad bdev/ocssd: update write pointers
Update write pointers during successful write / reset completion.  This
is needed in order to support the append operation.

This patch also introduces the zone busy flag, which makes sure only one
write (or reset) operation can be active at a time.  If a request is
directed to a zone that is already processing another operation, it will
be completed with a failed status.

Change-Id: I085438431577e4f0cd2d5d9eff7a220090f21176
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469119
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
b63be39461 bdev/ocssd: move bdev_ocssd_get_zone_by_slba
Move bdev_ocssd_get_zone_by_slba up in the file.  This function is going
to be used by many others, so it makes sense to be defined near the top.

Change-Id: I7db438bac032966430b9ca6a56e977f7c7c3fe43
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477298
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: 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-12-17 09:28:35 +00:00
Konrad Sztyber
153fbcb1f8 bdev/ocssd: JSON configuration
This patch adds support for saving JSON configuration of the OCSSD
bdev module required to recreate the current state.

Change-Id: Iedbdb8b4a2b7dd02a223ce6f073553e71b9c040a
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469090
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>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
ba4b326cda bdev/nvme: per-namespace config_json callback
Added per-namespace config_json callbacks, so that each namespace can
dump its own configuration.  This is a nop for regular NVMe namespaces,
but it will be used by Open Channel ones to save their bdev configuration.

The callbacks are executed after controller configuration has been
saved.  This ensures that when a config is loaded, any namespace related
RPC calls (e.g. creating bdevs) are run after associated controller has
already been attached.

Change-Id: Ia18e15b46f10b058c1b6a9b74edb386e1b4874de
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477436
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>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
0468ce5343 bdev/nvme: mark controllers used by bdev_ftl
Currently, the controllers managed by bdev_ftl are skipped in
bdev_nvme's config_json output by verifying if they support Open
Channel.  Since new bdev_ocssd also uses Open Channel controllers and
it relies on bdev_nvme's config_json, additional flag was added to mark
that a controller is used by bdev_ftl.

This is a temporary solution that should be removed once bdev_ftl
becomes a virtual bdev and starts using bdevs instead of NVMe
controllers.

Change-Id: Ib25b61a72f0912d7a51119357f5c221941af50ad
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477297
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
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-12-17 09:28:35 +00:00
Konrad Sztyber
88406f3302 bdev/ocssd: retrieve chunks' info during initialization
OCSSD bdev needs to keep track of some portion of zone's state (write
pointer, its capacity, whether it's busy) in order to support the append
operation.  To achieve that, all the info needs to be retrieved for all
of the chunks and translated to zone format.

Change-Id: Id88282576aba337b50e7c7e1b9e9ff5aba25a3db
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468937
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
7ac802e848 bdev/ocssd: get zone information command
Added zone information command translating Open Channel's chunk
information to spdk_bdev_zone_info structure.

Change-Id: Ifdb15f2e0ea2fb8422810fa64f18942fcb6e4582
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468213
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
6e640cfcbf bdev/ocssd: wrap IO part of bdev_ocssd_io
Wrap the part of the bdev_ocssd_io responsible for describing IO
operations in a separate structure.  Currently all fields are wrapped
this way, but it'll allow the bdev_ocssd_io to become a union of several
different types of structures (one for the IO operations, one for
getting zone information, etc.).

Change-Id: I72276ce786d3c9ef0d1762c5ac20071b7a163ef5
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477023
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
704830b3b7 bdev/ocssd: zone reset command
Added zone reset command.  It's very similar to a regular data set
management deallocate command with the only difference being that it
operates on zones instead of blocks.

Change-Id: Iae4d77c6877b6906231336b13fad1167de149f20
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467920
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: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 09:28:35 +00:00
Ben Walker
7db1ed8b67 sock/posix: Use sendmsg instead of writev when flushing
This is preparation to add flags to the call.

Change-Id: I36109c069b42bd3ec22e023079c62d41a435f44c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471771
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-16 12:34:02 +00:00
Ben Walker
ab22d249e2 sock/posix: Add a pending list for asynchronous requests
Add an additional queue for requests that have been sent on the network
but aren't complete yet. As of this patch, the code
is still calling writev with no flags in the POSIX layer, so it completes
synchronously. That means requests pass through this new pending list
only very briefly inside of one function.

Change-Id: Iaab6efc118a6d5fe9589199515eb3a7293db4b8e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471768
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Or Gerlitz <gerlitz.or@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-16 12:34:02 +00:00
Ben Walker
b7ad942612 sock: Add an asynchronous writev
Add spdk_sock_writev_async for performing asynchronous writes to
sockets. The user of this call is responsible for allocating their own
spdk_sock_request structures to pass to this call.

spdk_sock_writev_async will not return EAGAIN and will instead leave the
requests queued until they are fully sent or aborted due to socket
error.

Change-Id: Idf3239e65d26a3024e578122c23e4fb8f95e241b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470523
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: 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-12-16 12:34:02 +00:00
Seth Howell
de467ec91d env_dpdk/rpc: add rpc to get memory stats.
This will enable us to create a helper applciation to print memory
statistics for a given SPDK application.

Change-Id: I0ad5a8163166a5d67d9a5533303ec0858297ba6b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477511
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-13 11:05:57 +00:00
Shuhei Matsumoto
b99df8ee33 app/rpc: Add cpumask to output of thread_get_stats RPC
Thread's core affinity had not been visible to users.  This patch
adds thread's core affinity information to the existing
thread_get_stats RPC.  We can create an new RPC to retrieve
thread's core affinity information but using thread_get_stats
RPC will be enough for now.

Besides, the name of SPDK thread 0 is not reactor_0 but app_thread
now.  So fix it together in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I634da46c411d648837538ebf227074d307273c97
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475187
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2019-12-11 11:05:36 +00:00
Evgeniy Kochetov
d18874592d nvme/conf: Make 'delay_cmd_submit' configurable via config file
Option 'DelayCmdSubmit' has been added to 'Nvme' section of
configuration file.

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: Ie367d0012d8274b9bf12c0377d1c4804a700ac94
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475307
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>
2019-12-10 17:32:10 +00:00
Evgeniy Kochetov
542be8790b nvme/rpc: Make 'delay_cmd_submit' configurable via RPC
Optional parameter 'delay_cmd_submit' has been added to
'bdev_nvme_set_options' 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: Ia09c57bbac8078ee6ab1e8f0bd279ffeb9e08cb8
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462584
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-12-10 17:32:10 +00:00
Evgeniy Kochetov
38520df476 bdev/nvme: Add 'delay_cmd_submit' to nvme bdev options
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: I7dada3265f57dda61202797e5a02251b28dd0b30
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475306
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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-12-10 17:32:10 +00:00
Evgeniy Kochetov
ffc7c4a9a9 nvme: Rename 'delay_pcie_doorbell' to 'delay_cmd_submit'
'delay_pcie_doorbel' parameter in 'spdk_nvme_io_qpair_opts' structure
was renamed to 'delay_cmd_submit' to make it suitable for every
transport. Old name is also kept for backward compatibility.

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: I09ef8028133c4a3d4a5bbc5329ced1f065bcaa46
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475305
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>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-12-10 17:32:10 +00:00
Tomasz Kulasek
b7b45bc7bc lib/nvme: remove device name parameter from nvme cuse
This patch removes posibility to set cuse device path. Instead
"/dev/spdk/nvme*" path is used.


Change-Id: I7c3087772a3661eebe03fce21356c35cc8204b49
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474598
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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>
2019-12-09 17:40:35 +00:00
GangCao
b8d0691ff3 nvmf: correct the return code when parsing the subsystem
If succeeded, return 0. Otherwise, return -1

Change-Id: I7c966e09a5efd13a3ddb72ffaaeee4a9d8ca31b0
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476983
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
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>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-12-09 14:01:39 +00:00
paul luse
487eb66e24 module/crypto: enhance recent session optimization
When we moved to shared session a limitation of one crypto
volume was accidnetally introduced. Add a limit to keep the
session pool size down and print debug message when its hit.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic55efd554f37c4f44149edfbfe037420d8d61ce6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474264
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-12-06 14:49:40 +00:00
Konrad Sztyber
860a075094 bdev/ocssd: read / write support
The patch adds zone address to Open Channel LBA translation as well as
initial support for read  and write commands.  Each IO command is
currently limited to a single zone (chunk).

Change-Id: I3ee6d58323871f0651ac1d5e8dda28eb6d687a95
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467149
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-12-06 14:45:05 +00:00
Konrad Sztyber
b9635c2f16 bdev/nvme: move nvme_io_channel to common.h
Other NVMe bdev modules (e.g. OCSSD) need the definition of the
nvme_io_channel to be able to send IO requests, so this structure has to
be defined in the common header.

Change-Id: I550d15d091078588c6c7ab824d883e049ec5a72c
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470019
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-12-06 14:45:05 +00:00
Konrad Sztyber
6bda87b324 bdev/ocssd: create / delete calls
Added a way to create and delete OCSSD bdevs on top of OC NVMe
controller.  The controller can be created using the regular NVMe bdev
RPC call.  For instance, the following (assuming 0000:00:04.0 is an
OC device):

 rpc.py bdev_nvme_attach_controller -b nvme0 -a 0000:00:04.0 -t pcie
 rpc.py bdev_ocssd_create -c nvme0 -b nvme0n1

creates Open Channel controller nvme0 and OCSSD bdev nvme0n1 on top of
it.  The bdevs can be deleted either by the bdev_ocssd_delete call or by
deleting whole NVMe controller, in which case all bdevs are destroyed.

Change-Id: I9f2f02103fc5570a53bd26479c8690be206829c3
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468984
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-12-06 14:45:05 +00:00
Konrad Sztyber
a116324c88 bdev/ocssd: initial Open Channel bdev implementation
This patch adds initial Open Channel zoned bdev implementation.  The
bdev will allow to use the zoned API on top of OCSSD devices.

Added the ability to create the OCSSD NVMe controller.  The controller
is created using the regular NVMe's RPC when the controller is detected
to be Open Channel.

Change-Id: I31d271126dba4369ac2eaebd4cc7bdd460e5f808
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467147
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-12-06 14:45:05 +00:00
paul luse
dc8788d150 module/crypto: handle enqueue errors
A recent change in the CryptoDev API means that failure to enqueue
all attempted submissions does not automtically mean busy. We need
to check the status of the last submitted op and only retry if
busy, otherwise fail the IO.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0873d07a430a08f5aee25581e47187ef60ba8542
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472400
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-12-05 13:06:35 +00:00
paul luse
c602bd81f6 module/crypto: change how we handle crypto device full condition
Previously we would sit in the submission routine and spin on the
poller and then retry in the event that we could not get CryptoDev
to take all of the ops that we had available.

The implementation was fine however a recent CryptoDev change
requires us to now check the status of attempted submissions
instead of assuming that the device was busy. If there was
another reason for the failure we don't want to retry or we'll
be stuck in an endless retry loop.

Changing the current device full handling to match what was
done in the compression vbdev makes it easier to handle the
new condition and also makes the two vbdevs more consistent
with regards to how they manage the DPDK framework API.

This patch only changes how we handle full conditions to put
the ops on a linked list and resubmit them the next tie the
poller runs naturally. A following patch will handle the
CryptoDev API change that instigated this change.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Idcb6e06b6826045f23e59b64eca051f3eee2b850
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472309
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-12-05 13:06:35 +00:00
Jim Harris
2389caa4f5 bdev/nvme: explain the "populated" flag with a comment
This was previously named "active" as in "active
namespace".  But we're really using this flag to keep
track of whether the namespace structure is currently
populated with data structures, bdevs, etc. for the
associated namespace.  If we find an active namespace
on an SSD that is not populated with bdevs in the
bdev/nvme module, then we need to populate it.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475933
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-02 11:20:05 +00:00
Jim Harris
b7d00f19e6 bdev/nvme: add type_ctx to nvme_bdev_ns
This gives per-type ns handlers a way to associate
the generic nvme_bdev_ns structure to any type-specific
context.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475926
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-02 11:20:05 +00:00
Jim Harris
ed35ca1de1 bdev/nvme: remove bdev_nvme_populate_namespaces
This function can now be easily moved inline to
its single caller.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475925
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-02 11:20:05 +00:00
Jim Harris
0cdcf62a65 bdev/nvme: make nvme_ctrlr_populate_namespaces asynchronous
Some namespace types such as OCSSD need to do some additional
operations before being ready to populate bdevs for a namespace.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475924
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-02 11:20:05 +00:00
Jim Harris
169e19c320 bdev/nvme: add nvme_ctrlr_populate_namespace_done()
This is in preparation for making this code path
asynchronous.  For now we will just call this function
immediately after calling the per-ns-type populate
namespace function.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475923
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-02 11:20:05 +00:00
Jim Harris
743292aa0f bdev/nvme: move code to nvme_ctrlr_populate_namespaces_done
This is in preparation for making this code path asynchronous.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475922
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-28 12:14:50 +00:00
Jim Harris
d3726b6e19 bdev/nvme: pass probe_ctx to populate_namespace functions
This is in preparation for making the per-ns-type
populate_namespace functions asynchronous.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475921
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-28 12:14:50 +00:00
Jim Harris
de76e8105f bdev/nvme: simplify bdev_nvme_populate_namespaces
There's no need to support cb_fn/cb_arg parameters
to bdev_nvme_populate_namespaces.  Just have it
call populate_namespaces_cb() directly.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475920
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-11-28 12:14:50 +00:00
Jim Harris
a3dd00ed97 bdev/nvme: remove extra OCSSD check
OCSSD is handled specially now by nvme_ctrlr_populate_namespaces,
so we don't need any extra handling.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475919
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-28 12:14:50 +00:00
Maciej Szwed
d179541e0f bdev/nvme: Add nvme_bdev_attach/detach_bdev_to/from_ctrlr functions
Some NVMe modes will be creating bdevs by their own.
For such case they have to have a way to add and remove
bdevs to/from controller.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ia188ad43695689358569cfd230b6bc39c15efce2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469980
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-28 12:14:50 +00:00
Maciej Szwed
b5b6a1ce81 bdev/nvme: Rename common remove functions
Rename common remove functions so that they align
with naming convention.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474248
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-28 12:14:50 +00:00
Maciej Szwed
b56d8100b6 bdev/nvme: Move bdev_nvme_ctrlr_destruct function to common.c
This is a part of changes required by upcoming patch.
This will also require moving bdev_nvme_unregister_cb
function to common.c.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Icc14534db4aec903542a94588d22b0ea9d43f47a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470439
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-28 12:14:50 +00:00
Jim Harris
6a13d85778 bdev/nvme: add per-ns-type populate/depopulate func ptrs
The OCSSD ones are just nops for now.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475799
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@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>
2019-11-28 12:14:50 +00:00
Jim Harris
d1f8893968 bdev/nvme: reuse nvme_ctrlr_depopulate_namespace
Let's reuse this function in the remove path, to avoid
some code duplication.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475798
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-28 12:14:50 +00:00
Jim Harris
922fc42418 bdev/nvme: rename nvme_ctrlr_deactivate_namespace
Now call it nvme_ctrlr_depopulate_namespace, to match
some of the recent renaming.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475797
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@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>
2019-11-28 12:14:50 +00:00
Jim Harris
7501235a35 bdev/nvme: rename 'active' flag to 'populated'
This will better match the recent renaming to the
functions associated with this flag.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475796
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-11-28 12:14:50 +00:00
Jim Harris
62db72caaf bdev/nvme: add namespace types
Eventually these may be defined by the NVMe spec, but
for now add something local to the bdev/nvme module.
These will currently only differentiate "standard"
namespaces from ocssd namespaces.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475795
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-28 12:14:50 +00:00
Jim Harris
9fa0006912 bdev/nvme: merge update/populate namespaces functions
These basically do the same thing.  We'll basically
keep the populate function name, but apply it to the
existing update function.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475794
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-28 12:14:50 +00:00
Jim Harris
85a7f53e69 bdev/nvme: remove NOTICELOGS in update ns path
We're going to reuse this code in a more common path
which would raise the visibility of these noticelogs
significantly.  These aren't exceptional conditions,
so there's no need to print them when they happen.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475793
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-28 12:14:50 +00:00
Jim Harris
9a78ffbbc8 bdev/nvme: remove noticelog for no namespaces
A controller with no namespaces is perfectly valid.
So remove the noticelog when a controller with no
namespaces is found.  This helps reduce some complexity.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475792
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-28 12:14:50 +00:00
Maciej Szwed
6f65c6c170 bdev/nvme: Change some bdev create functions names
It is done to allign with the new way of handling NVMe
bdevs vs namespaces.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ic541e3ef244e538dff3990bf2be003dcc0349721
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471703
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-28 12:14:50 +00:00
Ben Walker
f56f15cc28 sock/posix: Release socket memory even if close() fails
Close can't fail. And if it did, we still want to release
the sock memory.

Change-Id: I0e4f4d23d49f32132f4526fef8587823ace0a774
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475311
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-11-22 13:54:58 +00:00
Seth Howell
a816afaaaf bdev_nvme: check for admin queue failures.
This will allow us to reset the controller when we get disconnect events
from the underying transports.

Change-Id: I825985219f98ff65cfcf7581757bd26db5bd08ba
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473762
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>
2019-11-21 14:33:44 +00:00
Seth Howell
d786a7eccf bdev_nvme: always use bdev_nvme_reset.
When doing a controller reset on an nvme bdev, we should always use the
bdev_nvme_reset function which ensures that we destroy all of the I/O
qpairs before performing the reset. This prevents us from performing a
reset and leaving the I/O qpairs in a disabled state preventing I/O from
being processed.

Change-Id: I6309421322f6c884327ade4515fc9402b25c0c1a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473743
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>
2019-11-21 14:33:44 +00:00
Seth Howell
f57b098e7c bdev_nvme: add synchronization to reset.
The generic bdev layer currently has a lot of snychronization built into
spdk_bdev_reset. However, in a couple patches I am going to introduce a
few instances where I call bdev_nvme_reset directly from this module.
The reason I call bdev_nvme_reset directly from this module is so that I
don't have to open a descriptor to the bdev in the module itself.

In order to be able to call bdev_nvme_reset from both this module and in
response to a bdev_io, we need to synchronize and queue reset requests.

Change-Id: I7ece41119cba705a7481d365d20a1eb746a80f64
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473754
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>
2019-11-21 14:33:44 +00:00
Shuhei Matsumoto
ed2a638e89 bdev/rpc: Add current ticks to bdev_get_iostat RPC
This is used to calculate more accurate interval between two
calls of bdev_get_iostat RPC.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib561b056bc8095aa23d04cb5f9ae6f558b157124
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475167
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: GangCao <gang.cao@intel.com>
2019-11-21 08:05:23 +00:00
Hailiang Wang
dd3632975d module/bdev: fix a inconsistent order of parameters
Two parameters' order in deference and definition are inconsistent.

Change-Id: I62c6ef81b8044a75646dd3279ad2e6861436ef41
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475192
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: Jim Harris <james.r.harris@intel.com>
2019-11-21 08:04:53 +00:00
Tomasz Kulasek
b078bc8e42 bdev/nvme: fix handle error on rpc cuse register
Change-Id: Ie746af29026bb6f9fdbcb67fb454a6eb8b9bec11
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473711
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-11-21 08:01:57 +00:00
Yao Liu
c8ef5793e3 bdev/uring: add JSON config dump
Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: Ic060a62f20c97dcc0c52ad761f848074efaade3d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474180
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-20 10:01:07 +00:00
Yao Liu
bc7b39a5f0 bdev/uring: dump filename in driver_specific JSON
Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: I9a3bf72175d8bf9ede7149fb6ea14dc9931ce1f6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474179
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-11-20 10:01:07 +00:00
Yao Liu
81b4f2fec2 bdev/uring: add support for bdev_uring_get_spdk_running_config()
Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: If86ef2dad60260b5261fc05d075625dfa2ed0340
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474178
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-20 10:01:07 +00:00
Seth Howell
d6034240f1 bdev_nvme: pass nvme_bdev_ctrlr to bdev_nvme_reset
This is the data structure we end up using here anyways, and it will
make this function a little bit more versatile.

Change-Id: I530cb5b1b94f57cad4bb3931fc4b7a6335b6a00e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473742
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: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-19 09:09:40 +00:00
Seth Howell
5ad0db1cf2 bdev_nvme: allow bio to be null in resets.
Also, add a small callback function to display an error when reset
fails.

Change-Id: I74c9e9f6842cbd3b608eae2178bd3605cd642fbd
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473741
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-11-19 09:09:40 +00:00
Seth Howell
0cdf3f5189 bdev_nvme: rename _bdev_nvme_reset_done.
The new name, _bdev_nvme_reset_create_qpairs_done will help distinguish
it from a future function _bdev_nvme_reset_complete which will become
the new completion point for a reset.

Change-Id: I4f538a57e3c3de6c21afdd79febcdf01ad079342
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474606
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-11-19 09:09:40 +00:00
Maciej Szwed
c330fbe618 bdev/nvme: Correct variable name
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: If7d55636eed5e03d002ca6ea6a24d96b127ae705

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471621
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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>
2019-11-18 12:53:17 +00:00
Maciej Szwed
c30609c9ea bdev/nvme: Allow multiple bdevs per namespace
Some future NVMe namespace types will be able to
create multiple bdevs per one namespace. This
patch makes it possible.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I47b4c1fc545c59dcc3171ab0960f1835b6aa6d24
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471620
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-18 12:53:17 +00:00
Maciej Szwed
77dcf4534b bdev/nvme: Use Namespace object for tracking bdevs
In future implementations it will be possible to create
different types of namespaces (standard, OCSSD, ...).
This patch introduces new nvme_namespace type which
will make possible to implement such cases.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I27747d3985915f45c0e0a28dd5f391cca06b13cc
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471273
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-18 12:53:17 +00:00
Mateusz Kozlowski
cabbe1b179 bdev/zone: Register/unregister zoned bdev
Add registration and unregistration of block zoned bdev. Attach it to the
underlying bdev during creation and unattach at deletion.

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I773aff6c7609952f28c02dd1794f0529a781b2e1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468033
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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: Jim Harris <james.r.harris@intel.com>
2019-11-15 20:27:14 +00:00
Mateusz Kozlowski
195be29e9b bdev/zone: Rpc functions for zoned block bdev
Added rpc handling for creation and deletion of zoned block bdev

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: Ib7b6f3928511aa840cbe098472682c951e92e5ed
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468031
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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: Jim Harris <james.r.harris@intel.com>
2019-11-15 20:27:14 +00:00
Mateusz Kozlowski
76fb903a74 bdev/zone: Create and delete zoned block device vdev
Adding new bdev module - zoned block device virtual bdev. It should be
possible to build on top of a regular (ie. non-OCSSD) bdev and surface
a zoned device API instead.

Added create and deletion functions for this bdev.

Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: Ia383483007117d1c826298fd391467a51fa2fe4e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468030
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-15 20:27:14 +00:00
Artur Paszkiewicz
0b4ca5225a module/raid: raid level specific start/stop callbacks
Add a function pointer to raid_bdev_module to be called before the bdev
is registered and a corresponding one to be called before the bdev is
unregistered. This allows setting up the bdev parameters and any custom
initialization/cleanup required for the raid module.

Change-Id: Ib9fe8f0365ca47f499a50630f582399e7bb9fd0f
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472714
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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-11-14 16:25:55 +00:00
Artur Paszkiewicz
9d94e1f53e module/raid: don't declare variable inside 'for' statement
Fix all occurances in raid source files.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I1862b703e213ca133fb81e46dd9502b0b9d32d9f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474071
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-11-14 16:25:55 +00:00
Artur Paszkiewicz
94ea87541e module/raid: add asserts in raid_bdev_configure()
This function should only be called for raid_bdev in 'configuring'
state, so convert the 'if' statement that checks that to an assert. Also
add an assert for the number of discovered base bdevs.

Suggested-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ib2fdf2af64ff0e9b458af4070321d138508a3df8
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473966
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-11-14 16:25:55 +00:00
Artur Paszkiewicz
182278c093 module/raid: function pointers for submit_request in raid_bdev_module
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I3186ea3450b91a73fa976d3d1d9cc67326daa10d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471088
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-11-14 16:25:55 +00:00
Artur Paszkiewicz
6ba11b194e module/raid: function for raid bdev_io completion
Use a dedicated function to complete the raid bdev_io.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I2ef0d19b31064b56c63866713f18deccafaeb8f7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471087
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-11-14 16:25:55 +00:00
Artur Paszkiewicz
ae70d6a4a6 module/raid: simplify raid_bdev_queue_io_wait()
Pass raid_io instead of bdev_io to raid_bdev_queue_io_wait() and its
callbacks to eliminate unnecessary type conversions. Pass bdev and
io_channel directly as parameters instead of passing a base device
index.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Iecbf351ec1598b29709e7ccff2efb1776faf11f9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471086
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-14 16:25:55 +00:00
Artur Paszkiewicz
235cc2c956 module/raid: assign some values to variables to improve readability
These will also be used in the next commit.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Iffd1a6e7fda2fc1688f3923777c085dcacc8613d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473453
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-11-14 16:25:55 +00:00
Artur Paszkiewicz
d3a04643bf module/raid: move error code check out of raid_bdev_queue_io_wait()
Don't pass the error code to the function and instead move the -ENOMEM
check to the callers where it makes more sense.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ib2fa92315dc2973d4023fd9509950589de946614
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473452
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-11-14 16:25:55 +00:00
Artur Paszkiewicz
cb8dbf17dc module/raid: add raid_bdev pointer to struct raid_io
This will make it easier to get to the raid_bdev when we only have the
raid_io.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I91df14f788a51ada10b0f8356de2162c1f34520c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471085
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-11-14 16:25:55 +00:00
Alexey Marchuk
3cf9ff7495 rdma/conf: Add parsing of no_srq parameter via conf file
Change-Id: I67e8e1f4ce1f3be9a4bb0d470eac4927a6c3fbbd
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473846
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-11-14 03:46:17 +00:00
Yao Liu
ec2ba7aade bdev/uring: add an argument to specify block size
The block size of non-disk files can't be automatically detected,
so add an argument to specify it.

Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: Ia11ab177b78c66ede4a09a997bba28827d83ec25
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473607
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-13 15:06:30 +00:00
paul luse
921c378d79 module/crypto: stop touching bdev internal status field
Add a status field to the IO context struct and use it to track
whether an indiivdual crypto op has failed or not so we know
how to complete the bdev IO.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If93bc9938c578184c2db9e015eee50ab758c90f0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471693
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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-11-07 23:05:55 +00:00
Konrad Sztyber
933bf632d6 event/vmd: write_config_json support
This patch adds support for saving VMD subsystem's configuration to a
JSON formatted file.  It allows saving and then loading configuration
with VMD enabled without having to send the `enable_vmd` RPC.

Change-Id: I59b380ec1e1f25f60f45d2363724ed7ac78c365c
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473405
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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-11-07 23:05:38 +00:00
Yao Liu
6f3ca0804e bdev/uring: try without O_DIRECT flag if non-disk file first open fails
Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: I74b5b146c23e5395d26f80ca4f950631bd4721cb
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473373
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-07 23:05:06 +00:00
Yao Liu
adf19fe6a3 bdev/uring: open bdev file with O_RDWR flag
Without this flag, write requests will lead to I/O errors.

Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: I39a453683f7b2cbcd49fb8e0b532bf09f9180a8c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473372
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-11-07 23:05:06 +00:00
Xiaodong Liu
138e6daec3 rpc/blobfs: add cache size setting rpc
This RPC method can be used to set cache size of
blobfs, in case a smaller or larger memory scale
is requred by cache pool.

Change-Id: I8046c7caeaa15c67825f86d14ae0b79395d51daf
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471870
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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-11-07 00:33:25 +00:00
Artur Paszkiewicz
0ae5a89dc4 module/raid: unify submit_request function signatures
Pass raid_bdev_io instead of spdk_bdev_io.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I8ecc39abafe54a7bc5034caa126f961c444230a2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471084
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-11-06 14:57:25 +00:00
Artur Paszkiewicz
77b8618ecc module/raid: remove redundant functions
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I8d872e4cf8911f20e9d2758ec9c6a5e397d231c4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471083
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-11-06 14:57:25 +00:00
Artur Paszkiewicz
485c79126c module/raid: put raid_io initialization in one place
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ie2b647031d00624e3faff57830c6e7e0e645a394
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471082
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: Paul Luse <paul.e.luse@intel.com>
2019-11-06 14:57:25 +00:00
Artur Paszkiewicz
152cce0d53 module/raid: replace ch with raid_ch in struct raid_bdev_io
The original io channel is not used directly, only its context (struct
raid_bdev_io_channel) which contains member bdevs' io channels. Store it
directly in raid_bdev_io to eliminate conversions.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ibff64f75ceff9bf1d431cc3071dfc99f374107ea
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471081
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-11-06 14:57:25 +00:00
Artur Paszkiewicz
706029d5be module/raid: register RAID modules
Add the ability to register RAID modules. Supported RAID levels are
determined based on the list of registered modules.

The module descriptor structure will hold the function pointers for
RAID-level specific operations.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I7a579ac381f1764b427a48d1dc31260725217c4e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471080
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-11-06 14:57:25 +00:00
paul luse
7c77c29268 module/compress: handle enqueue errors
A recent change to the compression API means that we can no longer
assume that rejection from the API means that it was busy. We need
to only queue operations that were from the busy condition and
fail others.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I7fa5d27559eacdf1bdf6982bdc142939333076ae
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472465
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-11-06 14:49:37 +00:00
paul luse
fede944d8c module/compress: small code cleanup in poller
Previously used while loop with a break to pull one entry off of
the queued list. Clarrify comment and get rid of while/break.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ifdedf988072a4d79b4d84ed6fef2279d4883ee54
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472456
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-11-06 14:49:37 +00:00
Konrad Sztyber
af4e2a3277 lib/vmd: hotplug / hotremove support
This patch adds support for hotplug / hotremove detection for devices
behind the VMD.  The detection acts similarly to the one implemented for
regular PCIe devices, that is user has to periodically call probe
function.  Additionally, for applications not using SPDK's event
framework, spdk_vmd_hotplug_monitor has to be called periodically as
well.

Change-Id: I9f6839560efcf16c839b01976639d835f119cb47
Signed-off-by: orden smith <orden.e.smith@intel.com>
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472741
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-06 14:47:39 +00:00
Konrad Sztyber
2e2f383c3a event/vmd: single module initialization function
Use one function for VMD module initialization, regardless of whether
the initialization is performed via config or RPC.  It'll allow the
module to perform additional steps during its startup that can be shared
between the config / RPC paths.

Change-Id: I1062545a9ea109bd69e01f759e701ca279d0d8de
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473271
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-06 14:47:39 +00:00
Chunyang Hui
6ed832db34 bdev/nvme: Check error when init Opal
Change-Id: I53034e591a2c549cbc7591bf61ba90be22ddeba5
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472893
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-11-01 20:11:53 +00:00
Ben Walker
81a47d9820 sock/posix: Move repeated socket allocation code to a function
Change-Id: I71726be5dbe2bb112b7569869dd456ef38f84d9d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472649
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-11-01 17:56:16 +00:00
Maciej Szwed
9c64110700 bdev/nvme: Change NVMe controller unregister flow
This patch moves around code related to unregister
flow. This is a preparation for upcoming changes.
It also changes IO device for NVMe bdev to
nvme_bdev_ctrlr to make code clearer.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ic97a5b1973923a0cf44ed6c2d51b707dd7628d2c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468980
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-11-01 14:37:54 +00:00
Maciej Szwed
63c2e95c42 bdev/nvme: NVMe probe ctx free change for async bdevs creation
If specific NVMe mode requires asynchronous bdevs
creation we cannot free probe ctx until all bdevs
are created.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ie758f2fa8068c4090b7ce76c73967483441166cd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468453
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: 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-11-01 14:37:54 +00:00
Maciej Szwed
81d6bcd02c bdev/nvme: Make bdev_nvm_create_bdevs asynchronous like
With this change the new callback create_bdevs_cb
is introduced. This callback may be used by future
NVMe controllers which require asynchronous creation
of bdevs. This will make future implementation easier
because we will only have to call callback function.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib46a38cf71bc783db58be9021efd06fcd547c4d9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469699
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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-11-01 14:37:54 +00:00
Artur Paszkiewicz
445e667f41 module/raid: make raid_level an enum instead of plain integer
Also add functions to convert it to/from string.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I6f7964d832c308b815150fff39eb3dc5c5ae5853
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471079
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-11-01 14:34:32 +00:00
Artur Paszkiewicz
fc9ca1d0d6 module/raid: move raid0 functions to separate file
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Icf74bda40303b3c38a7c58a5331589f3ec229634
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471078
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-11-01 14:34:32 +00:00
Artur Paszkiewicz
6e6d04b683 module/raid: move duplicated error handling code
Both callers of raid0_submit_rw_request() perform the same error
handling. Put it inside the function and change its return value to
void. After that, raid0_get_curr_base_bdev_index() becomes unused, so
remove it.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ifbe88700e413c3af9bb513538b3026c19e857d74
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471077
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-11-01 14:34:32 +00:00
Artur Paszkiewicz
1d246e97ab module/raid: remove a redundant function
The raid_bdev_io_submit_fail_process() and
raid_bdev_base_io_submit_fail_process() functions both do essentially
the same thing, so remove the former and replace its usages and rename
the other.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I8eda933e23d4bc840a6740e21a48d9c411998f6d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471076
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-11-01 14:34:32 +00:00
Artur Paszkiewicz
ef775d6453 module/raid: remove struct raid_fn_table
Something similar will be re-introduced in the upcoming patches, but
remove this for now to simplify refactoring.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I6b520a63ecfe9a1ae0c855507601c8aeeca03e8a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471075
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-11-01 14:34:32 +00:00
paul luse
f614a7014c module/crypto: reduce session mempool size
The initial implemenation of the module used a unique crypto
session per operation.  Later an optimization was made to use shared
session, 1 for encrypt and 1 for decrypt. The size of the session pool
and assocaited cache were not adjusted at the time.  This patch reduces
the session pool size to just 2 and uses 0 for session pool cache size.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ief3e867ec6bf4ff9c90d8ea60427ed8b85345275
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471692
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-11-01 14:33:45 +00:00
paul luse
88e48baaaf module/crypto: fix some typos & clean up comments
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I21b6992d2a3a914e44c61d489633b5c3741e70cb
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471690
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-11-01 14:33:45 +00:00
Ben Walker
11739f3cb1 nvme/cuse: Poll the io_msg queue when the admin queue is polled
Users already have to poll the admin queue, so embed the io_msg
queue polling there to simplify the API.

Change-Id: I4d4d3be100be0798bee4096e0bbda96e20d2405e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472833
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-31 14:05:23 +00:00
Tomasz Kulasek
74906b01b6 lib/nvme: add RPC for interacting with CUSE devices
Added RPC commands to register/unregister CUSE devices
to NVMe controllers:

 - bdev_nvme_cuse_register
 - bdev_nvme_cuse_unregister

Additionally two RPC now return CUSE device names:

 - bdev_get_bdevs for namespaces
 - bdev_nvme_get_controllers for controllers


Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I69c4bf41ec8f78a7522894268a67dd733881712f
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472211
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 23:43:59 +00:00
Maciej Szwed
5027dc7184 bdev/nvme: integrate NVMe character device with NVMe bdev
Added spdk_nvme_io_msg_process() in bdev_nvme_poll_adminq()
to process io messages that were passed from non-polled mode
threads to the controller.

This is used as part of nvme cuse support for surfacing
/dev nodes that can be used by standard Linux management
applications like nvme-cli.


Change-Id: If9e2e0b472c332aee54e3c6674bdd5fe616ab07c
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469692
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 23:43:59 +00:00
Chunyang Hui
71a1bbdd54 bdev/opal: Add check for strdup
Change-Id: Ic3005bc0b854ed9e5ff4a2288c3715d1e79b1fb4
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472113
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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-10-24 23:02:54 +00:00
Michael Haeuptle
53b92a6c18 nvme: allow setting of completion queue CDW0
This change allows setting of the NVMe completion queue
CDW0 in spdk_bdev_io_complete_nvme_status.

Before that change, handling of vendor specific NVMe IO
commands was limited since there wasn't a way to return
command specific info back to the initiator.

Change-Id: I250d5df3bd1e62ddb89a011503d42bd4c8390f9b
Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470678
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 18:02:38 +00:00
John Kariuki
c8b6a884fd bdev/uring: add rpc calls
added rpc calls for configuring uring bdevs

Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Change-Id: I6c8273fd6e869402fcc244c9a08226d0c2db025c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471323
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-24 17:31:06 +00:00
Chunyang Hui
bc40f5f661 bdev/opal: Add rpc commands for multiuser
Add rpc commands bdev_opal_lock_unlock, bdev_opal_new_user.
Admin can add new user for opal bdev created and the user can
lock/unlock the bdev by himself.

Change-Id: I9a1e360399617b5a039dc5353097ab525c7eb964
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471475
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-10-24 17:09:57 +00:00
Chunyang Hui
36c9ac2dde bdev/opal: Add rpc for init, revert and get info
Add bdev_nvme_opal_init, bdev_nvme_opal_revert,
bdev_opal_get_info rpc commands.

Change-Id: Ib53492c02a1c18603834640d23f9fb2e7eb08657
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468917
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: Jim Harris <james.r.harris@intel.com>
2019-10-24 17:09:57 +00:00
Chunyang Hui
0a18f228c3 opal: Add rpc for create and delete opal bdev
Change-Id: Ic2cbe079aa16d839b92fc4d0b3ee64c061fa2d3e
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468191
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: yidong0635 <dongx.yi@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>
2019-10-24 17:09:57 +00:00
Chunyang Hui
8466e2c610 bdev/opal: Add Opal vbdev
Init commit for opal vbdev. Opal vbdev is built based on
bdev part module. We split nvme namespace to spdk_bdev_part
with user specified offset and length. And then use this
configuration also to set up locking range for Opal.

Use linked list g_opal_vbdev to track all configuration for
each vbdev. And use g_opal_base to track the part_base for
all vbdevs.

This patch only shows the process for creating/deleting a vbdev
for an opal-enabled nvme ctrlr.

change-Id: I6073637d7360ebdd6b53fb7b6a01ad73f1daa98e
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468190
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-24 17:09:57 +00:00
Anil Veerabhadrappa
a6f667af1d nvmf/fc: initialize 'adrfam' and 'trsvcid' in fc transport id
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I28476ec019f8e9ae98b9925e030f3c09ccfd726c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471950
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-22 17:23:23 +00:00
Marcin Dziegielewski
c4b94d878b lib/bdev/ocf: remove unused code related to polling utils
After switch all management operations to asynhronus way, utlis connected
with polling are no longer needed, this patch removes that code.

Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Change-Id: Ia30e733c51089b1659f79c99d8cd711945a98fa0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470353
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
2019-10-22 17:22:41 +00:00
Marcin Dziegielewski
c74b4b32ba lib/bdev/ocf: use asynhronous management API from OCF instead of polling
New version of OCF library provided full asynhronus management API,
therefore this patch changes all uses of polling in management
operations in vbdev to asynhronous way.

Change-Id: I7bf76fa2919fac4a068ef5c39f5b667b2be68ff7
Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470352
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-22 17:22:41 +00:00
Marcin Dziegielewski
59a296465d lib/bdev/ocf: error handling in register path
This patch introduces error handling in register path, in case of
error in the middle of chain we will call vbdev_ocf_mngt_stop with
appropriate rollback path.

Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Change-Id: I78e5796b7eda2fe0848d5533cdea283b17397b61
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468472
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-10-22 17:22:41 +00:00
Marcin Dziegielewski
790669cc46 lib/bdev/ocf: increase capabilites of vbdev_ocf_mngt_stop function
In current code there is no possibility to clean up vbdev in case
of error during management path. This patch introduces new version of
vbdev_ocf_mngt_stop function, now developer can pass handle to
path with rollback functions and therefore clean up not full initialised
vbdev instance. Changes in this path also allows to pass status explicitly
to vbdev_ocf_mngt_stop function.

Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Change-Id: Ie9684981e48d24b3e55e4b1ab828dc8c01baa838
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468471
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>
2019-10-22 17:22:41 +00:00
Marcin Dziegielewski
20894340f2 lib/bdev/ocf: update of ocf library to version 19.06
This path updates ocf library to version 19.06 and also introduces
all necessary changes required to integrate ocf bdev adapter with
new version of ocf.

Summary of changes introduces with new OCF in ocf bdev:
- ocf_env.h increased limit for memory operations, changed behaviour
of strncpy to less restrictive, both changes are required to run new OCF
- ctx.c changed functions to new from new OCF
- added new cache mode "write only"
- added missed cache modes wa and wi to RPC scripts
- rewritten spdk_rpc_bdev_ocf_get_stats function to use asynhronus
ocf_mngt_cache_read_lock
- used new asynhronus ocf_mngt_cache_flush instead of waiting for request
- removed no longer valid filed - cfg->device.min_free_ram
- changed expected result in metadata_probe_cb

Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Change-Id: I83e4335e16600e4d22e6bb517931102de42d39e9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468132
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-22 17:22:41 +00:00
Marcin Dziegielewski
1b6d1c80f9 lib/bdev/ocf: fix potential issue around base->management_channel
This patch improves management of base->management_channel in code and
fixes potential issue described below. In situation when we want to create
configuration like this:

$rpc_py bdev_ocf_create C1 wt Malloc NonExisting
$rpc_py bdev_ocf_create C2 wt Malloc Core

In current code on C1 vbdev creation we are creating not fully
initialized vbdev_ocf_base for cache (without management channel).

On C2 creation, because in vbdev_ocf_volume_open we are looking for
right base by name, we can grab cache base from C1 and then, there is
possibility, to hit segmentation fault due to uninitialized
mangament_channel.

This patch moves initialisation of managemnet channel to attach
base function and thanks to that we have guarrnte that each copy of
cache base (we have copy in each parent in case of multicore cache)
are valid.

Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Change-Id: Iab1ced3a4bf8ba0fec947bbf77b55dc3620a58a7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468131
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
2019-10-18 17:31:39 +00:00
Jan Kryl
0a04c076ea nvmf: Add context parameter to new_qpair() callback
It can be useful for passing additional information about nvmf
target to a handler for new nvmf connections. Context can be
stored in globals as it is currently done in nvmf code. However
in case of multiple targets or languages where accessing global
state is challenging (i.e. Rust), this becomes inconvenient.

Change-Id: Ia6a2fdba4601531822b3e5fda7ac5ab89d46f6c5
Signed-off-by: Jan Kryl <jan.kryl@mayadata.io>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469263
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Sasha Kotchubievsky <sashakot@mellanox.com>
2019-10-17 16:29:36 +00:00
Anil Veerabhadrappa
6d2989fdec nvmf: optimize listen address parsing code
Optimize code

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: I2debb9ec8af04a13feedfe53f56a3e539d06caf5
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471206
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-10-17 16:29:04 +00:00
Anil Veerabhadrappa
5e25bbdd49 nvmf/fc: Add listen address support in FC transport
Enables access control to allow subsystem access on one or more FC ports.

If a subsystem definition does not have a single valid "Listen" directive,
then the subsystem will allow dynamic listen address binding. For such
subsystems,
   * When a FC port comes online, FC transport will add port's address
to subsystem's listen list.
   * When a FC port goes offline, FC transport will remove port's address
from subsystem's listen list.

If subsystem definition has 1 or more valid "Listen" directives then FC ports
coming online or going offline will not affect subsystem's listen address
whitelist.

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: Ic7fed76e4bf8d1df0aeeae1d4fa5e6d207afccf3
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471025
Community-CI: 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>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-17 16:29:04 +00:00
Yan Wang
3dc7db825d bdev/aio: delete unnecessary code
Signed-off-by: Yan Wang <wangyan122@huawei.com>
Change-Id: I99269d8e6889fe08b44b32b26c667da12dd4f577
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471339
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-16 15:55:46 +00:00
Yao Liu
1b805ae4a8 bdev/uring: fix no data length set in bdev_uring_writev
This will result in SPDK_BDEV_IO_STATUS_FAILED when bdev_uring_reap

Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: I24bea544af7130b09c41156920d918200fe792e5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471157
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-10-16 15:55:35 +00:00
Anil Veerabhadrappa
32e3e269a3 nvmf/rdma: parse listen address directive for rdma and tcp transport
Package ip address parsing code into a separate function. This change
is the first patch in the series to enable FC listen address support.

Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: Ia86c61d001a091dfb9f825b68f76cdaf94537303
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471024
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-15 16:43:17 +00:00
Ben Walker
a0889ece60 sock: Add a function to check if a socket is connected
This is useful for detecting sockets that have been disconnected
by the other end without reading data.

Change-Id: Ieb6529984d282d48373766d9f5555cf11720f19b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470513
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-10-15 16:35:09 +00:00
yidong0635
2cb14abc95 mk : Fix compiling error.
Add DEPDIR in module Makefile for blobfs.
Avoid compiling blobfs_bdev before blob_bdev.

This is to fix issue: #982

Change-Id: I7f7bd35ec56cb5a7d0545d9966aaeb7249ffb4f4
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471019
Tested-by: SPDK CI Jenkins <sys_sgci@intel.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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-10-15 16:32:24 +00:00
Xiaodong Liu
9c6e742679 blobfs: add blobfs_mount RPC as FUSE
This RPC method will mount blobfs on bdev to one host
path through FUSE. Then on the host path, user can
directly do some file operations which will be mapped
to blobfs.

Note:
* The FUSE mount of blobfs can be umounted directly by
SHELL umount or fusermount command.

Change-Id: I7c322d978b39bbc7255fced345a749ad5bfa7077
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468777
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: Paul Luse <paul.e.luse@intel.com>
2019-10-15 16:25:09 +00:00
Xiaodong Liu
4c10e0bbca blobfs/fuse: put FUSE code in module blobfs_bdev
FUSE operations in blobfs_fuse.c are extracted from
test/blobfs/fuse/fuse.c to blobfs_fuse.c in module blobfs_bdev.
And it is extended to create one new thread dedicatedly for one
FUSE mountpoint to handle FUSE requests by blobfs sync API.

spdk_blobfs_bdev_mount is implemented as the export API. So
related code can be utilized by other modules/apps.

Now test/blobfs/fuse/fuse.c is much simplified with function
spdk_blobfs_bdev_mount.

Change-Id: Iefa16977fabbae2008c8f65fe1b69d650b6fd18d
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469347
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-10-15 16:25:09 +00:00
Seth Howell
797aa7d813 bdev_nvme: register a remove cb for bdev_nvme.
Change-Id: I68c7e6270e7e2d79abe288a933dd284ed1fdc045
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469906
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: JinYu <jin.yu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-10-11 20:13:26 +00:00
Pawel Kaminski
31e77a7331 rpc: Rename delete_nvme_controller to bdev_nvme_detach_controller
Change-Id: I1402fcb24a779e7af3d108c91a0abcc09082410b
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466144
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>
2019-10-10 16:19:33 +00:00
Maciej Szwed
3a9b5f3cd2 bdev/nvme: Do not use the same pointer in rpc and bdev code
Due to upcoming change we cannot use the same count
pointer in rpc call and bdev creation function.
With async bdev creation there will be a problem
when freeing context.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I98da89481d7f506161d8adf5a1b2365907385a13
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468463
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
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: Ben Walker <benjamin.walker@intel.com>
2019-10-09 14:34:16 +00:00
Maciej Szwed
05e97101b2 bdev/nvme: Change nvme_async_probe_ctx->count type to uint32_t
This also requires change of type for count field
in rpc_bdev_nvme_attach_controller_ctx structure
and argument type in spdk_bdev_nvme_create function.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470135
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: Ben Walker <benjamin.walker@intel.com>
2019-10-09 14:34:16 +00:00