Commit Graph

527 Commits

Author SHA1 Message Date
Maciej Szwed
b1bb9917a9 bdev/delay: Return poller status based on completions number
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I54d4a41602f678aed4d2df61d7059adc1ae37f78
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3235
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-08 07:54:38 +00:00
Maciej Szwed
eb05cbd677 pollers: Fix pollers to return correct busy status
Poller should return status > 0 when it did some work
(CPU was used for some time) marking its call as busy
CPU time.

Active pollers should return BUSY status only if they
did any meangful work besides checking some conditions
(e.g. processing requests, do some complicated operations).

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Id4636a0997489b129cecfe785592cc97b50992ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2164
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-07 07:29:31 +00:00
Changpeng Liu
021ebb3529 bdev_nvme/opal: remove unnecessary opal configuration
For base bdevs, we maintain a global list g_opal_base, and
for part bdevs, there is also a global list g_opal_vbdev,
so it's not necessary to use the configuration again, just
unpack it to opal part bdev.

Change-Id: Ia0943610dee3c194a80e44ed8eed8f2370d780fc
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3106
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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-07-01 07:50:59 +00:00
Changpeng Liu
c3ace4f40c bdev_nvme/opal: use spdk_bdev_unregister() when deleting a vbdev
The base bdev's reference number is maintained in the bdev
layer, so we don't need to maintain it in this module.

Change-Id: Iffadbde2dbf35d934f273fdcb4b7d19e96394343
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2986
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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: wanghailiang <hailiangx.e.wang@intel.com>
2020-07-01 07:50:59 +00:00
Ziye Yang
c833729b22 sock/uring: Fix the nvmf_shutdown_tc3 failure issue.
If the socks parameter(passed in uring_sock_group_impl_poll) is NULL,
we do not need to handle the sock_flush and prep the pollin task,
otherwise it will cause the assert issue when we reap the task when
we handle the nvmf_shutdown_tc3 issue.

Because in uring_sock_group_impl_remove_sock, we finally
set sock->group = NULL. Without this patch,
when we call uring_sock_group_impl_poll in this function,
pollin_task or write_task are prepared, then in the next round,
we will reap those tasks again.

PS: Error info can be found in
https://ci.spdk.io/results/autotest-per-patch/builds/19186/archive/nvmf-tcp-vg-autotest/build.log

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I7e6deaa05e958b52e71e0bbf0ccdd20e35583685
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3031
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-29 09:18:13 +00:00
Ziye Yang
d81d7a2c22 bdev/nvme: fix the compilation warning for unused variable.
The error message is:

bdev_nvme.c:456:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
  456 |  int rc;

Reason: The CI testing pool will always use --enable-debug, but without this
flag, we will see complilation warning.

If we really want to catch this, it is better to really use this rc variable and print
some information.

Change-Id: Iec0ffcec4ec091d36044e3b36a9ac85e677b5c70
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3001
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-24 08:22:11 +00:00
Seth Howell
62ded32fd7 bdev/nvme: add failover option to bdev_nvme_reset
When we fail to process admin completions on a controller
attempt to failover to a previously registered trid

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Icdb43a726969fede4665f2fe59723dd90c5dad0d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2883
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-22 10:13:29 +00:00
Seth Howell
5f13e0f67f bdev/nvme: add a function for specifying a multipath trid.
This is part of a larger series enabling failover at the bdev
layer for NVMe.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0d89e1afab8aeaa90237d0ba780d708154f6e3be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2881
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-22 10:13:29 +00:00
Seth Howell
af9e73302f bdev/nvme: make the controller trid a pointer.
This lends itself to easily changing the trid during failover.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iae21a98de4f9dd1192a50abac0ec7fb0dd8a2e99
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2882
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-22 10:13:29 +00:00
Ziye Yang
a37fd6e03d uring: remove user's ring file descriptor operation.
According to the description of io_uring_queue_exit:

Tear down function for io_uring. Unmaps all setup shared ring buffers
and closes the low-level io_uring file descriptor returned by the kernel.

So we should remove the close operatoin on ring fd.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I910c6e8acd935925b7985c2aa750df385004eb55
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2922
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-19 07:18:40 +00:00
paul luse
8d2c520048 lib/idxd: add support for dual cast
Dual-cast copies the same source to two separate destination buffers.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Icadae34a75c35e2db672a193287b147416012a5a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2129
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>
Community-CI: Mellanox Build Bot
2020-06-17 07:21:05 +00:00
Ben Walker
ff24db746f nvmf: spdk_nvmf_tgt_accept no longer takes a new_qpair pointer
Calling spdk_nvmf_tgt_accept() now automatically assigns new qpairs
to the best available poll group.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I3df2a2c5a28dba45c5ba0cbd1e8c28dd7e56cf9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2813
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-16 07:44:49 +00:00
Ben Walker
c37cf9fbd8 nvmf: Make transport-chosen the only valid qpair scheduler
The transport always knows best.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: If66f539033fe11c50dc42e12ec990468588d5739
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2812
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-16 07:44:49 +00:00
Maciej Szwed
e7e10859d3 nvmf: Make spdk_nvmf_tgt_accept return the number of events accepted
This will be usefull for pollers/threads stats.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I4d1651f3ff6410c258c8bc75c2a68640b67d2ed9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2849
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-15 15:28:00 +00:00
Shuhei Matsumoto
82d77ca6f5 bdev/delay: Set zcopy I/O type to be unsupported regardless of backend bdev module
Delay bdev module does not support delaying zcopy I/O. So change
vbdev_delay_io_type_supported() to return false if the passed I/O
type is zcopy to clarify the use case of delay bdev module.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icea5ae351d7139250710ce491e4ac466b0cc7f98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2622
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
a954d2bf30 bdev/delay: Abort I/O delayed to complete
This addition enables us to test the new abort I/O feature on top of
any bdev which supports I/O type ABORT.

Add the abort I/O handler vbdev_delay_abort() into vbdev_delay_submit_request().

vbdev_delay_abort() aborts the target I/O if it is delayed to complete,
or calls spdk_bdev_abort() otherwise.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I191143357b95eeb56ada708d2d7ce30cf772bdcf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2602
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
c01fe4c530 bdev/delay: Abort all I/Os delayed to complete at reset I/O
Improve reset I/O to abort all I/Os delayed to complete by parsing
all channels. The generic bdev layer stops new I/O submission during
reset processing. So freezing/unfreezing channels is not necessary.

Additionally, clean up the code which run if I/O submission failed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I63e1ba78971944558d9317b63befecd86a6d6b60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1993
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-09 07:37:29 +00:00
Shuhei Matsumoto
bfc9ddde2d bdev/passthru: Support I/O type ABORT
Passthrough bdev module sets the passed bdev_io to the cb_arg of
the bdev_io submitted to the underlying bdev. Hence call
spdk_bdev_abort() with bdev_io->u.abort.bio_to_abort for the I/O
type ABORT.

Passthrough bdev module returns the supported I/O type of the
underlying bdev. Hence vbdev_passthru_io_type_supported() is not
necessary to change.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifb7627a92409649ab08ae233ba517fbc1bc55a9f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2799
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-09 07:37:29 +00:00
Shuhei Matsumoto
269f4a3c25 bdev/null: Support I/O type ABORT
As malloc bdev module supports I/O type ABORT, it will be helpful
if any bdev module other than NVMe bdev module supports I/O type
ABORT.

Update bdev_null_io_type_supported() to return true for
SPDK_BDEV_IO_TYPE_ABORT and update bdev_null_submit_request() to
try aborting the target I/O if queued.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4614c48840ef069a11991486d184d45789bc3000
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2798
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-09 07:37:29 +00:00
Shuhei Matsumoto
e2d1dfb4fa bdev/malloc: Always return failure but support I/O type ABORT
Malloc bdev module does not manage submitted I/Os by any list,
and so cannot abort any submitted I/O. However malloc bdev module
can always fail any submitted abort request.

Hence let's update bdev_malloc_io_type_supported() to return true
for SPDK_BDEV_IO_TYPE_ABORT and update _bdev_malloc_submit_request()
to complete with failure for SPDK_BDEV_IO_TYPE_ABORT.

This will enable us to use delay bdev + malloc bdev to test I/O
abort feature conveniently.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If4c411f5ab8589291ac90c10264d3ef30c06df83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2797
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-09 07:37:29 +00:00
Shuhei Matsumoto
7cd20dd3f5 lib/bdev: Add spdk_bdev_abort API
Add spdk_bdev_abort function as a new public API.

This goes all the way down to the bdev driver module and attempts to
abort all I/Os which has bio_cb_arg as its callback argument.

We can separate when only a single I/O has bio_cb_arg and when multiple
I/Os have bio_cb_arg, but unify both by using parent - children I/O
relationship. To avoid confusion, return matched_ios by _bdev_abort() and
store it into split_outstanding by the caller.

Exclude any I/O submitted after this abort command because the same cb_arg
may be used by all I/Os and abort may never complete.

bdev_io needs to have both bio_cb_arg and bio_to_abort because bio_cb_arg
is used to continue abort processing when it is stopped due to the capacity
of bdev_io pool, and bio_to_abort is used to pass it to the underlying
bdev module at submission. Parent I/O is not submitted directly, and is
only used in the generic bdev layer, and parent I/O's bdev_io uses bio_cb_arg.
Hence add bio_cb_arg to bdev structure and add bio_to_abort to abort structure.

In the meantime of abort operation, target I/Os may be completed. Hence
check if the target I/O still exists at completion, and set the completion
status to false only if it still exists.

Upon completion of this, i.e., this returned zero, the status
SPDK_BDEV_IO_STATUS_SUCCESS indicates all I/Os were successfully aborted,
or the status SPDK_BDEV_IO_STATUS_FAILED indicates any I/O was failed to
abort by any reason.

spdk_bdev_abort() does not support aborting abort or reset request
due to the complexity for now.

Following patches will support I/O split case.

Add unit tests together to cover the basic paths.

Besides, ABI compatibility check required us to bump up SO version of
a few libraries or modules. Bump up SO version of blob bdev module simply
because it does not have any out-of-tree consumer, and suppress bumping
up SO version of lvol library because the affected struct spdk_lvol
is not part of public APIs.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I515da688503557615d491bf0bfb36322ce37df08
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2014
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-06-08 09:28:27 +00:00
Tomasz Zawadzki
e757878190 accel: always write JSON with an array of objects for accel modules
Patch below added writing out json configuration for accel modules.
(fad052b0) accel: add write_config json for accel modules

Out of two current modules, only idxd reported its confi out.
When idxd was not compiled in, then "framework_get_config accel"
RPC did not return a valid JSON. Following JSON was returned:
{\"jsonrpc\":\"2.0\",\"id\":1,\"result\":}

Where "result" never had any property given.

This patch adds array object to encompas all accel modules.

Next patch in series will try to address the issue on JSON
level.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib0758db5406896f2a204920417619a3ab6fbde98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2550
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-03 07:38:01 +00:00
Maciej Szwed
a2606d4b5d all: Fix warnings found by gcc 9.3.0 and 9.3.1
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ie7c5b7b1c2d59a1f927eb5602f4ea5a003eff287
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2433
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
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>
2020-06-02 09:51:57 +00:00
Ziye Yang
d8cafc28bb Sock: The created pipe for sock should have a minimal value.
Thus, we can make sure that when read data is larger than
the pipe size, it will not read the data into the pipe.

Change-Id: I87f3b03fd9b81eb693e9eae0fea9eef7d1b9eaa8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2450
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-02 09:48:59 +00:00
Ziye Yang
ef9fd47d07 sock/uring: Fix the connection close issue when the initiator closes the connection unexpected.
When the initiator terminates the connection suddently, we

found the keep alive timeout issue, e.g.,

nvmf_ctrlr_keep_alive_poll: *NOTICE*:
Disconnecting host from subsystem nqn.2016-06.io.spdk:cnode1 due to keep alive timeout.

The root cause is that we did not closes the connection on our target side on time
whening using uring sock, and this patch can fix the issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I295f58bbdbae0ac3f5308f6eadef6a75c5ad07d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2544
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-06-02 09:48:15 +00:00
Evgeniy Kochetov
74b184e73a sock/posix: Add recv_buf_size and send_buf_size socket layer options
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: Ifb7d542c4da83070344c4baa512da459ba73ec90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/610
Community-CI: Mellanox Build Bot
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>
2020-06-02 09:48:00 +00:00
Evgeniy Kochetov
bc157de238 sock/posix: Add get/set_opts methods to posix socket implementation
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: Ibfd731dd6e84f9fd4074ff88d1159ffe8c913970
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/609
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-02 09:48:00 +00:00
Seth Howell
4bca12f1fe lib and module: remove remaining _spdk prefixes.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I84ae9fd59ea6472762083aae88ed50a20a28eceb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2463
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-01 13:07:30 +00:00
yidong0635
f7a4356b21 ocf/ctx: Fix warning of using uninitialized value.
Warning:
ctx.c: In function ‘vbdev_ocf_ctx_log_printf’:
ctx.c:503:2: warning: ‘spdk_lvl’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  503 |  spdk_vlog(spdk_lvl, NULL, -1, NULL, fmt, args);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compiling with ocf module, here should add default.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I645a1044e58b63d5a58fde19baa3c125f97e0a7b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2603
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-27 07:37:12 +00:00
Ziye Yang
59e44bcbb3 Revert "sock/uring: use batched manner to get the cqes."
This reverts commit 79215d80c1.

Reason: Find the bugs while using batched. For example, if
we fetch 3 CQEs, A, B, C and put it in a cqes[] array.
Then we leverage io uring cqe seen to handle, Then we handle the
CQE A, then invokes the call back related with A. In A's call back,
it may also call the reap function (sock_uring_group_reap),
then the CQEs will be handled again. Thus the CQEs B and C can be already
handled. Then we will handle B or C again, then it triggers the error.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I67ece3b24e677b88d66d08722b00539693b42e1e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2543
Community-CI: Mellanox Build Bot
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>
2020-05-27 07:35:40 +00:00
Shuhei Matsumoto
cac5022e61 bdev/crypto: Stop access bdev_io->internal from bdev module and fix an issue
crypto_dev_poller() had set IO error to bdev_io->internal.status
but _crypto_operation_complete() checked io_ctx->bdev_io_status
and overwritten bdev_io->internal.status by spdk_bdev_io_complete().

On the other hand, internal fields of struct spdk_bdev_io should
have been avoided.

This patch fixes both.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia3d4887f34fdecc765b88246c3e66ce1871ff30f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1907
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-05-21 09:19:23 +00:00
Seth Howell
d18e63206a mk/lib: add a check that major and minor version is set for libs.
Also, while we are here, consolidate setting SO_SUFFIX to one spot.

Previously, it was possible for a library to slip through
without an SO version.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I4db5fa5839502d266c6259892e5719b05134518c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2361
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-21 09:19:00 +00:00
Seth Howell
2c56786eca module/accel_idxd: add an SO version.
This was overlooked when the module was merged.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ia7bd8710741bf5a82e7dd27925ecef1e59ed2938
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2360
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-21 09:19:00 +00:00
Changpeng Liu
b2947f528f nvme/opal: deprecate spdk_opal_supported()
The spdk_opal_supported() is redundant with spdk_opal_dev_construct(),
because we only return the spdk_opal_dev structure when the drive
can support OPAL feature.

Change-Id: Ieadf271a0c8530f2440cded05ad139483a8c5937
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2383
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-20 14:16:44 +00:00
paul luse
b57103a0c8 lib/idxd: add support for compare operation
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ibfcc5c2f4a169c4625ab4f58fbcb8957677a3427
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2108
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: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2020-05-20 14:16:22 +00:00
Xiaodong Liu
7cb0266191 module/event: add SIGUSR1 in spdk_kill_instance
Change-Id: I6d2384203efcb4024448aac17ea91ec73b4f23f7
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2445
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-19 09:44:19 +00:00
Liang Yan
f2ede6b486 bdev/rbd: increase the segment in flush opeartion
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Change-Id: Ibde0f924c1b78c9a8f0f440e944c7eb81631ed1b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2490
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
2020-05-19 09:43:44 +00:00
Seth Howell
2623c4c4d8 module/sock_vpp: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I06ead997eebd1122f1e504a1176776f5061bcf8b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2358
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-05-18 09:48:18 +00:00
Seth Howell
937d828f90 module/sock_uring: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8c68fc09952d920d6dcf1d8112ba08490e578f84
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2357
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-05-18 09:48:18 +00:00
Seth Howell
0bc117a470 module/sock_posix: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I593c0c1500b2175c4d3dc8ac19289f854895b00f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2356
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-05-18 09:48:18 +00:00
Seth Howell
5ad576336a module/event_vmd: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie7c85eb24f75592a79d09c5bbd07f6d11c9a6abd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2355
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-05-18 09:48:18 +00:00
Seth Howell
650ced4c39 module/event_vhost: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1467ea67269b50f346d84bb926b885c6e581a78f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2354
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-18 09:48:18 +00:00
Seth Howell
d5570379db module/event_scsi: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Idb31b8e98bfd12f69519e174b1ef27065ddc035a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2353
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-18 09:48:18 +00:00
Seth Howell
b257424be4 module/event_nvmf: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ibfaa6bca27faf12455bf325bfb97303805c51f14
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2352
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-05-18 09:48:18 +00:00
Seth Howell
ab56b08875 module/envet_net: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id1d7226ee3abbcd558d1ec38ababbb3cb1fd5e09
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2351
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-18 09:48:18 +00:00
Seth Howell
5c0b8f39a8 module/event_nbd: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id2920389b7cf762cf80006da5dbe582dfdc81438
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2350
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-18 09:48:18 +00:00
Seth Howell
e503deb1d2 module/event_iscsi: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8253838975a44ba8dcccb55ca1b41c27d5e3d231
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2349
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-18 09:48:18 +00:00
Seth Howell
0a52f4e5fc module/event_bdev: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I7f82a634ee9c8a28fd52ab288cd1195f7a1ef9c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2348
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
2020-05-18 09:48:18 +00:00
Seth Howell
578cc1c8ea module/event_accel: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I75e3ab924c46208ac8055d4363c732b29c84dabf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2347
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-18 09:48:18 +00:00
Seth Howell
2259084102 module/app_rpc: add a map file and remove spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1f3cfd9d712b8dc0111a58af6bfe61f4d1c3f08a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2346
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-18 09:48:18 +00:00