Commit Graph

7495 Commits

Author SHA1 Message Date
Ziye Yang
4c9aad0299 nvme/tcp: Report the free entries if sending_ack is set
Previous we fix the same issue in this commit:
cb98b2ab3e

But we forget to fix it here. And we also need to update here,
otherwise we will still face the same issue described in
commit: cb98b2ab3e

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I3660dbb6e97c92ea4cb347cfce4bf23c6dfe97ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3242
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-07-09 07:23:19 +00:00
Seth Howell
3b830202ca lib/nvmf: add an acceptor_backlog transport opt.
This allows users to configure the number of
connection requests outstanding to an rdma port
at once.

RPC included.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I8a2bb86b2fb7565cb10288088d39af763b778703
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3097
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-08 07:57:04 +00:00
Evgeniy Kochetov
c5c9a150a3 make: Create variable for event_bdev dependencies
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I7468dd242b83af8b41d72e503c212c1ffac1abd1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/614
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-08 07:56:46 +00:00
Jacek Kalwas
3dff6a3b48 nvmf: add util to get id from ctrlr
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If9246be80d9d43863c1f9cc6ee33c1126dc67fd8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2983
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-08 07:55:03 +00:00
Maciej Szwed
5550beb879 nbd: Make nbd_poll return real busy/idle status
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ibced4f525b1fb8f57d493358f5b60a2d4009b5ac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3150
Reviewed-by: Jeffry Molanus <Jeffry.molanus@gmail.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>
Community-CI: Mellanox Build Bot
2020-07-08 07:54:38 +00:00
Jacek Kalwas
42f2f01a0e nvme: fix timeout log during ctrlr state change
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Icf6741f059ed92fdf0ee9fd0952acdd07711c69c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3226
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-08 07:54:29 +00:00
Shuhei Matsumoto
d80c9f6257 lib/nvme: Add underscore prefix to nvme_qpair_abort_queued_reqs()
This is a preparation to the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I15356c69e676dc41d3af69caa6d12c1fcb282152
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3071
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-08 07:54:01 +00:00
Shuhei Matsumoto
f2bd635ecf lib/nvme: Add qpair_iterate_requests() to iterate the common operation among transports
To abort requests whose cb_arg matches, add child abort request greedily.
Iterating all outstanding requests is unique for each transport but
adding child abort is common among transports, and adding child abort
is replaceable by other operations.

Hence add qpair_iterate_requests() function to the function pointer table
of transport, and pass the operation done in the iteration by a
parameter of it.

In each transport, the implementation of qpair_iterate_requests() uses
TAILQ_FOREACH_SAFE() for potential future use cases.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic70d1bf2613fce2566eade26335ceed731f66a89
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2038
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-08 07:54:01 +00:00
Shuhei Matsumoto
aa2ea2bed5 nvme/rdma: Follow the fix in TCP transport and restore nvme_rdma_req_put()
Recently two patches were merged but we should have get more reviews.
The fix done in TCP transport will be better because we can keep
the existing functions and make the code change minimum.

Restore nvme_rdma_req_put() and move removing rdma_req from
rqpair->outstanding_reqs to nvme_rdma_req_complete(). One exception
is the case that only nvme_rdma_req_put() is called. For the case
remove rdma_req from rqpair->outstanding_reqs before calling
nvme_rdma_req_put().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3f68dbc88c60af6b8f4ecc3209fde9b763ac3189
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3073
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-07-08 07:54:01 +00:00
Shuhei Matsumoto
ad69e739e1 nvme/tcp: Dequeue request from outstanding list before calling completion
Each request has a callback context as cb_arg, and the callback to
nvme_complete_request() for the completed request may reuse the context
to the new request.

On the other hand, TCP transport dequeues tcp_req from
tqpair->outstanding_reqs after calling nvme_complete_request() for
the request pointe by tcp_req.

Hence while nvme_complete_request() is executed, tqpair->outstanding_reqs
may have two requests which has the same callback context, the
completed request and the new submitted request.

The upcoming patch will search all requests whose cb_arg matches to
abort them. In the above case, the search may find two requests by
mistake.

To avoid such error, move dequeueing tcp_req from tqpair->outstanding_reqs
before calling nvme_request_complete(). One exception is the case that
only nvme_tcp_req_put() is called. For the case remove tcp_req from
tqpair->outstanding_reqs before calling nvme_tcp_req_put().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5f2ac292c60431ac1e27b8657db92b220860a0a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2865
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-08 07:54:01 +00:00
Shuhei Matsumoto
e060285ea6 nvme/tcp: Change nvme_tcp_req_complete() to take tcp_req instead of req
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ida0ee76015821d7db54b273d14383a245a18047b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3058
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-08 07:54:01 +00:00
Evgeniy Kochetov
b1074c4905 sock/rpc: Add sock_impl_get/set_options RPC methods
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: If1193ef647c85b045d7f14a03a9942783583f553
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/612
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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-07-07 07:32:32 +00:00
Ziye Yang
449dee3563 nvme/tcp: Fix the sending conflict between cmd and h2c pdu.
As is well known, we may also handle the r2t data pdu receving earlier
before calling the cb function of send_cmd due to the outof order execution
of the lower layer uring socket interface.So we need to fix
this issue, otherwise the data of the sending_pdu will be placed with the
wrong data.

And it will cause the issue shown in
https://github.com/spdk/spdk/issues/1473

Fixes #1473

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Idac1ad65761695f3a655b85003861c1d1f4f3875
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3215
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-07 07:31:53 +00:00
yupeng
cb619b5229 bdev: add allowlist to bdev layer
When set bdev_auto_examine to false, the bdev layer will only
examine a device if it is in the allowlist. Currently the allowlist
is always empty. Will add api to add bdev to the allowlist in the
future.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: Iee7597623e7dd4172acc88736d23e0e5a4a2b03e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3101
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-07-07 07:31:22 +00:00
Ben Walker
30ee8137cf blob: Add a bitmask for quickly checking which blobs are open
This can speed up the check for whether a blob is already open
significantly.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: If32b0b1f168fcdb58e61df6281d7b7520725a195
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2781
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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>
2020-07-07 07:30:58 +00:00
yidong0635
eb15a29f27 iscsi/tgt_node: Fix truncation warning on clear-linux-os-33460
Compiling warning :
spdk/lib/iscsi/tgt_node.c:550:42: warning: ‘%s’ directive output may be truncated
writing up to 2927 bytes into a region of size 1024 [-Wformat-truncation=]
  550 |  snprintf(port_name, sizeof(port_name), "%s,t,0x%4.4x",
      |                                          ^~
In file included from /usr/include/stdio.h:867,

gcc -v:
gcc-10.1.0-290-gc32074f6de

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I56fd5adfc461254751b54fd8610949e72ecbd8f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3216
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-07 07:30:31 +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
Jin Yu
d76951c7ba nvme_rdma: fix the recvs_to_post.first to NULL
nvme_rdma_qpair_submit_recvs is not judged in
nvme_rdma_poll_group_process_completions path.
If we do not clean the recvs_to_post.first we
may get the wrong current_num_recvs when the rc
is non-zero and call it again.

Change-Id: If0046e711525dcfcb419132a01fed7a09db13ba0
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3163
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@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-07-06 07:20:33 +00:00
Jin Yu
05805e54a0 nvme:disconnected state then destroying state
Put the destroying state after the disconnected state.
Because nvme_transport_ctrlr_disconnect_qpair will modify the state
of qpair to disconnected, and in the path of rdma, it will postpone
the deletion of qpair until the release of pg by judging the
destroying state. So qpair is not deleted.

Change-Id: Ica606905cddf67d0ffda14bd48cc5f4e424f01ee
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3136
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: <dongx.yi@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-07-06 07:20:26 +00:00
Jin Yu
19228a0602 nvme_rdma:fix current_num_sends to current_num_recvs
Change-Id: I1a3067165c06db3fe7d7fd1c1ec149e845100b27
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3162
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>
Reviewed-by: <dongx.yi@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-07-06 07:20:26 +00:00
Simon A. F. Lund
ae6c40a4a5 lib/nvme: fallback to NVM when then given command_set is not supported
When the user requests a non-default command set configuration, via the
probe_cb() supplied to spdk_nvme_probe(), which is not supported, then
the controller initialization will not proceed.

This patch changes that behavior into falling back to the NVM command
set and continue with the controller initialization. It is done by
assigning the NVM command set to opts.command_set such that the user
knows in attach_cb() with which command_set the controller is
configured/enabled.

The fallback is needed since the user does not have access to the
controller capabilities register. The strategy left for the user is thus
to try. However, this is an issue, as the user only has one attempt, as
subsequent calls to spdk_nvme_probe() will not trigger probe_cb() for
the controllers whose initialization did not proceed.

Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: Ia414628fcd7d56956649647775462e62d98c0a90
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2931
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: Jim Harris <james.r.harris@intel.com>
2020-07-03 07:31:31 +00:00
Jim Harris
7ff9609f3d nvme: add security send/receive quirk for Intel 900P SSDs
These SSDs set the oacs.security bit but do not actually
support OPAL.  So do not set the controller flag indicating
SECURITY_SEND_RECV support in this case.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3156
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-07-03 07:31:20 +00:00
Sochin Jiang
7137bde120 lib/blob: fix a potential wrong release of md page
blob_insert_cluster_msg() will release the already claimed
md page(intended for extent page) if the corresponding extent page
is found to be allocated. But later blob_insert_extent() may fails,
and this cause blob_insert_cluster_cpl() to release the same md page again,
this could be wrong if this specific md page is clamied by others, thus
cause data corruption. So, put it to zero after released in
blob_insert_cluster_msg().

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: I46eba79b24b1950318002dcb27cb51b01ca566ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3152
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
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-07-03 07:30:30 +00:00
Jim Harris
16364fdc14 nvme: copy 8 bytes at a time into virtualized CMB
QEMU won't emulate wide (>8 byte) instructions on an MMIO
region.  We tried to fix this previously but it wasn't sufficient.
So this version adds an explicit copy function that will only
copy 8 bytes at a time from the source cmd pointer into the
SQ cmd point in the virtualized CMB.

Fixes issue #1458.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3135
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-02 07:21:38 +00:00
Alexey Marchuk
e762508854 nvme_rdma: Add check for keyed SGL length
The length of a keyed SGL data block is limited by 3 bytes.
Add a check to fail requests which length exceeds 3 bytes.
In other case we can send an incorrectly formed SGL request with
an invalid or zero length.

Fixes issue #1450

Change-Id: I77cdaff5fbf4be5754a3ac6008b8ccd532ac5905
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3056
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>
2020-07-02 07:21:31 +00:00
Ziye Yang
cb98b2ab3e nvme/tcp: Report that we have free entries if send_ack is set.
Without this patch, we will face the following warning code
when compiled with (--with-uring --enable-debug) while testing
big I/O size: 256KB, e.g.,

"nvme_qpair.c: 474:nvme_qpair_resubmit_requests: *ERROR*:
Unable to resubmit as many requests as we completed"

The reason is because the nvme_tcp_request structure is not freed yet
if send_ack is not set, so there will be no entries when there
are other requests submit again.

And this patch can mitigate such issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I4c7616fbd3c82a883b4e9facd257a1a4f66e876d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3123
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-01 07:51:17 +00:00
Ziye Yang
a213592c89 nvmf/tcp: Fix the error return code
It should return "NVME_TCP_PDU_FATAL". I think that
this issue is introduced after we move the data
copy from tcp transport layer to the socket
layer. And it should return "NVME_TCP_PDU_FATAL now",
and it will be consistent with the logic in the same
function.

With this patch, it will fix the big I/O size write
from the initiator.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ide018adb603eb13d002fc98886258dd1e2424f7c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3122
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>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
2020-07-01 07:51:17 +00:00
Tomasz Zawadzki
4c156e6379 lib/scsi: downgrade SCSI SO version
Internal headers (such as one in SCSI) should not trigger the
SO versoning fialures. This was addressed by patch:

(f53bf76)test/check_so_deps: limit scope of header checks.

Additionally quite recently another patch increased the SO version
for SCSI:
(6b6a3ff)scsi: add SPC2 RESERVE/RELEASE support

They were not in the same relation chain when being submitted,
so they didn't test against each other.

This resulted in:
SO name for libspdk_scsi.so changed without a change to abi. please revert that change.

For this reason this patch revs down the SO version for SCSI lib.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I69caae6c139e546afe2eeeae3395dc80ff898339
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3114
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-29 15:01:57 +00:00
Yan Wang
abeae98424 lib/blob: check return value after malloc() and strdup()
Signed-off-by: Yan Wang <wangyan122@huawei.com>
Change-Id: Ieaaecfd12ddf7826c2e4ce6dc5f47411e7e077da
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2907
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-06-29 09:20:12 +00:00
Darek Stojaczyk
1befc43b2d json_config: fix error message for loading failures
resp->error is usually a JSON object, but it was printed as
a string. For objects, resp->len was the number of fields in
this object, definitely not a length of the string to print.
There was usually just 3 characters printed with no newline.

To print this object we should stringify it using our json_write
library, so that's this patch does.

Before:
json_config.c: 192:rpc_client_poller: *ERROR*: error response: {"co
(missing newline at the end)

After:
[2020-06-19 13:33:57.060869] json_config.c: 220:rpc_client_poller:
*ERROR*: error response:
{
  "code": -32601,
  "message": "Method not found"
}
[2020-06-19 13:33:57.061067] app.c: 714:spdk_app_stop: *WARNING*:
spdk_app_stop'd on non-zero

Change-Id: I5d7aeba2b972782f18b8da0141ed4bfd79833f80
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2971
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-29 09:20:01 +00:00
Seth Howell
27f435bc1d lib/nvmf: raise RDMA acceptor backlog to 100.
10 is kind of unreasonable. You could easily start
seeing failures if you had just 3 intiators trying to
connect with 4 io qpairs at once.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I9985ffa3b03ebb33880eb5934b60eaafab57c82d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3096
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-29 09:19:09 +00:00
Seth Howell
203ed4f673 lib/nvme: report rdma_connect errors up the stack.
This will allow applications to discern specific connect
behavior and make choices relative to it.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I46182c285367ceb8a72511defe4508b3592b4572
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3095
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-29 09:19:09 +00:00
Alexey Marchuk
8421f83973 rdma: Fix qpair desctruction in error flow
rdma_qp may not be initialized when qpair is not fully
created. When such a qpair is being destroyed we may pass
a NULL pointer to spdk_rdma_qp_disconnect or spdk_rdma_qp_destroy
and hit an assert. This patch fixes this problem for NVMEoF
target and initiator.

Change-Id: I84787dc1b1211293c2a19f59d47727eaecd9d5a1
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3050
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>
2020-06-29 09:18:52 +00:00
Michael Haeuptle
89013903fe NVME: Fixes stuck IOs during hot remove (#1451)
When a NVMe device is hot removed, subsequent calls to
nvme_qpair_submit_request can fail with ENXIO.
The failure path handling for ENXIO did not free the request which
exhausts the qpair's free_req list eventually and all IOs are stuck
going forward.

This fix adds the same cleanup handling to nvme_qpair_submit_request
for this error case as it is done in _nvme_qpair_submit_request.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Change-Id: I5677d53965bdbd6d339c013483cdf42ce782099a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3018
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-06-29 09:18:29 +00:00
Ziye Yang
ceb07eb8f4 nvme/tcp: Fix send_cb and recv pdu function contention when there is R2T.
When using uring socket, we see following assert

nvme_tcp.c:1018: nvme_tcp_capsule_resp_hdr_handle:
Assertion `tcp_req->state == NVME_TCP_REQ_ACTIVE' failed.
Detailed info is in

https://ci.spdk.io/results/autotest-per-patch/builds/19205/archive/nvmf-tcp-vg-autotest/build.log

We face this issue, because there is also code execution ordering
between "sending callback function" and "pdu receving function".
We did not find it in physical machine testing, but finding it
in vagrant machine in CI.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I5eb241d564c0fc42ce0601b7c85999a2550f0de3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3046
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-29 09:18:13 +00:00
Changpeng Liu
6b6a3ff91f scsi: add SPC2 RESERVE/RELEASE support
Some OS(Windows and VMWARE esxi) will send SPC2 RESERVE/RELEASE
commands when formatting the filesystems, but in our previous
implementation of reservation feature, we didn't add such support,
in specification SPC3/4, they all include one section "Exceptions to
SPC-2 RESERVE and RELEASE behavior" feature for compatible support of
SCP2 RESERVE/RELEASE, so we add this support now.

Fix issue #1414.

Change-Id: I65d85ffb3b8f824b0ae4e130f53f01d95735d700
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2802
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-06-25 07:16:08 +00:00
Jin Yu
eb76afe78b event: add iova-mode parameter
Export iova-mode parameters in spdk which is useful in
VM environment.

Change-Id: I3f4756b2c3b6cf5d1964a50bbf63f9c596997696
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2910
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: Changpeng Liu <changpeng.liu@intel.com>
2020-06-24 08:22:24 +00:00
Ziye Yang
2ac8d3ff5e nvme/tcp: Allocate send_pdu with DMA allocated memory.
Purpose: It will be used to leverage the uring acceleration
later when we use io_uring_prep_write_fixed.

Because for using the Registered buffers feature in I/O uring,
we currently can register all the huge memories. And if we
allocate send_pdus in DMA memory, we can leverage such feature.

Change-Id: Id0ba5f7fe43202027c0378e9cbe74d861aad21e5
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3002
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-06-24 08:22:17 +00:00
Shuhei Matsumoto
465b2f8a6b nvme/rdma: Inline nvme_rdma_req_put()
nvme_rdma_req_complete() and nvme_rdma_req_put() are called in a
row except a single case. Move clearing completion_flags and req
of rdma_req from nvme_rdma_req_put() to nvme_rdma_req_complete(),
and then inline nvme_rdma_req_put() because nvme_rdma_req_put()
does only insert now. To do this, change the type of the second
parameter of nvme_rdma_req_complete() from struct nvme_request
to struct spdk_nvme_rdma_req.

For the exceptional case that only nvme_rdma_req_put() is called,
change nvme_rdma_req_init() to clear rdma_req->req if returned with
error.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibf7e6d245f3a48fb895cd9e6d92596ef833f26d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2876
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
a57aeac1fe nvme/rdma: Dequeue request from outstanding list before calling completion
Each request has a callback context as cb_arg, and the callback to
nvme_complete_request() for the completed request may reuse the context
to the new request.

On the other hand, RDMA transport dequeues rdma_req from
rqpair->outstanding_reqs after calling nvme_complete_request() for
the request pointed by rdma_req.

Hence while nvme_complete_request() is executed, rqpair->outstanding_reqs
may have two requests which has the same callback context, the
completed request and the new submitted request.

The upcoming patch will search all requests whose cb_arg matches to
abort them. In the above case, the search may find two requests by
mistake.

To avoid such error, move dequeueing rdma_req from rqpair->outstanding_reqs
before calling nvme_request_complete().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia183733f4a4cd4f85de17514ef3a884693910a05
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2863
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
299fce881a nvme/pcie: Dequeue request from outstanding list before calling completion
Each request has a callback context as cb_arg, and the callback to
nvme_complete_request() for the completed request may reuse the context
to the new request.

On the other hand, nvme_pcie_qpair_complete_tracker() dequeues tr from
pqpair->outstanding_tr after calling nvme_complete_request() for the
request pointed by tr.

Hence while nvme_complete_request() is executed, pqpair->outstanding_tr
may have two requests which has the same callback context, the
completed request and the new submitted request.

The upcoming patch will search all requests whose cb_arg matches to
abort them. In the above case, the search may find two requests by
mistake.

To avoid such error, change nvme_pcie_qpair_complete_tracker() to
dequeue tr from pqpair->outstanding_tr before calling nvme_complete_request().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie9efc200d06d02d8ee2be3cb8e9fd64591bc210d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2861
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
aacac0b433 lib/nvme: Get ctrlr simply from req->qpair->ctrlr at spdk_nvme_ctrlr_cmd_abort()
req->qpair and qpair->ctrlr are set at their initialization, and
hence we don't have to store ctrlr to req->user_buffer but we can
get ctrlr simply from req->qpair->ctrlr.

Besides, save a local variable by overwriting qpair when it is NULL.
This is also a small clean up.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1cca763fbaae55079b38f7f16fcf779360232797
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2890
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>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
43f3a8d99f lib/nvme: Factor out submit abort request into a helper function
To reuse the code for the upcoming new function
spdk_nvme_ctrlr_cmd_abort_ext(), factor out the operation to submit
an abort request into an new helper function
_nvme_ctrlr_submit_abort_request().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id00bed8fb8dc15b77e3c7f19105c1623588faa53
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2494
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
5322f30787 lib/nvme: Fix aborting queued abort requests at controller reset or destruct
ctrlr->outstanding_aborts is counted only for submitted abort requests.
However ctrlr->outstanding_aborts had been decremented for queued
abort requests by mistake.

Subsequent patches will use parent-children for abort requests but
nvme_free_request() is not aware of such relationship.

Queued abort requests had not been canceled or aborted when controller
was destructed. Retry submitting queued abort requests had been
repeated recursively and had caused stack overflow.

This patch fixes all.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8ce0ae51ddd5ed3e1e8ac86329c8bdb7a9236b2f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2555
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
5cbc1d5cae lib/nvme: Factor out retry queued abort into a helper function
To reuse the code for the upcoming new function
spdk_nvme_ctrlr_cmd_abort_ext(), factor out the operation to retry
queued abort into an new helper function nvme_ctrlr_retry_queued_abort().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I56bdfefe2c54990c9fd0463303b3d65ccf6e8942
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2493
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
9d4751a550 lib/nvme: Fix Abort Command Limit to process as 0's based value
SPDK NVMe driver had processed ACL as 1's based value by mistake,
and SPDK NVMe-oF target sets ACL to 0. Hence If NVMe driver connects
to SPDK NVMe-oF transport, spdk_nvme_ctrlr_cmd_abort() always queued
abort request.

Fix this bug to process ACL as 0's based value in
spdk_nvme_ctrlr_cmd_abort(). Besides, initialize ACL explicitly to
0 in spdk_nvmf_ctrlr_identify_ctrlr() for clarification.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id4f3a469776cdab88bcc6f41e7893885a7b78d8c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2513
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
10c4193363 lib/nvme: Set the parent to failure when submission of any children failed
When one of the children is failed to submit, if any children is
already submitted, the function can return success to wait for those children
to complete, but the parent should be set to failure.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2ea53856ee58da991bceca0058d1e1f55d42af37
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2492
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Shuhei Matsumoto
b3d0c369a8 lib/nvme: Fix wrong completion status when retrying queued abort command
next->cpl should have been set if nvme_ctrlr_submit_admin_request()
failed in spdk_nvme_ctrlr_cmd_abort_cpl().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4114294e398b18148d8a9ad798a656a7686c5a85
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2491
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>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
Wojciech Malikowski
c10c9bf767 lib/ftl: Evict valid cache entries when destroying io channel
When io channel is being destroyed some of its write
buffer entries could still be a valid cache entry.
This patch evicts all entries during io channel destroy
to keep consistent l2p table.

fixes issue #1434

Change-Id: I4e1cd206102c1f565b0f3e2dc90b5c2b3ed3d28c
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2964
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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-06-22 15:48:47 +00:00
Ziye Yang
3a1f5364d2 nvme/tcp: Fix nvme_tcp_req free conflict between cmd sending and incoming pdu receiving
This patch tries to solve the out of order
call back handling for cmd sending and the incoming pdu handling.

Normally, the cmd call back will be called before
receving the next PDU from the target if the application
uses the sync manner.

With the uring implementation, after sending the
cmd to the target, we may have the following scenerio:
(1) Firstly receive the incoming pdu(e.g., CapsuleResp pdu, C2hdata pdu)
due to the group polling read event.
(2) Secondly execute the callback function related with NVMe command sending.

This means that the data from the initiator is really sent out to the target,
and the target receives, then sending back the data to the initiator. But the
uring io_uring_cqe event is not handled, thus if we execute
(1) first, it will clean the data structures related with nvme_tcp_req, and the
nvme_tcp_req will be used for other purpose. Then causes wrong behaviour like
the following:

"Rand Write test failed at QD=128 because fio hangs with the following error:
nvme_tcp.c: 971:nvme_tcp_capsule_resp_hdr_handle: *ERROR*:
no tcp_req is found with cid=66 for tqpair=0x7f23d8001710".

And this patch can address this issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I5043aaa8adf5033d93dedac15f633f0850e0b9f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2818
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-22 07:47:31 +00:00
Jin Yu
4539ac58ae vhost: fix vhost_blk_destroy issue
If the vhost dev can't unregister successfully then we
leave the io channel and desc. In the bdev remove callback
we will free them or It would cause heap-use-after-free
issue.

Fix github issue: #1443

Change-Id: I09f4616e181d6657add3acef0ff92336fb9a9643
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2924
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-19 07:19:20 +00:00
Ben Walker
5584232cce nvmf: Remove new_qpair callback from transport accept function pointer
Transports may now call spdk_nvmf_tgt_new_qpair() instead.

Change-Id: Ib3295c488e22517e82f2051055ae47521d76fe56
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2814
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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-18 07:29:41 +00:00
Alexey Marchuk
268aacb24a rdma: Add new API spdk_rdma_qp_accept
This API is a wrapper for rdma_accept which allows
to remove spdk_rdma_qp_init_attr::initiator_side.

Change-Id: Iba2be5e74e537c498fb11c939c922b2bbda95309
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2908
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-18 07:28:04 +00:00
Alexey Marchuk
5f6ef934df mk/nvme/nvmf: Add deps for RDMA libs
These dependencies were removed in patches that added
RDMA provider. It was incorrect change since it causes
SEGFAULT when SPDK is built with shared libraries

Change-Id: I15f4ff86a75b3d080e1c7c89d75af4959c4ed989
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2900
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-18 07:28:04 +00:00
Jacek Kalwas
eb79ef5727 nvmf: expose api to remove qpair from internal poll group
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I681327d405f60757c43b66592d9af7bd7ac2db0b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2774
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-17 07:21:36 +00:00
yidong0635
7b77e06801 sock/net_framework: Adding a static inline function to get next framework.
This can remove these duplicated codes.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ie6590fc10e72471dbc6f0c1ac9c14eb3edfa3599
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2769
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: Mellanox Build Bot
2020-06-17 07:21:28 +00:00
Ben Walker
ea02571d0f nvmf/fc: Fix issue with multiple AERs and aborts
Recently support for multiple AERs was added to lib/nvmf, but the fc
transport was not updated.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I1755fdc4a6db2c6ce751c34fe5ad1d43e30298f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2912
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-17 07:21:21 +00:00
paul luse
0aca4d91e8 lib/idxd: clean up some casting and type issues
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If196c51deead9828fd75388f34b5622884c5e2d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2204
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
paul luse
d7b0a892bc lib/accel: minor cleanup: remove extra stack variable in functions
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I8d2b286f5e21e0de32f67b3449e3fcf3904a2a9b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2401
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
paul luse
a68b315772 lib/accel: add dualcast function
Add to both accel framework and add sw engine implementation.
IDXD implementation and accel example app patches to follow.

Dual-cast copies the same source to two separate destination buffers.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I7df28518505f0d4bbb32cc8e69eb8a231fb29452
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2127
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-17 07:21:05 +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
Jacek Kalwas
b3767a239d env_dpdk: expose base virtaddr as an option
This might be helpful if secondary processes cannot start due to
conflicts in address map.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I180dc09b4cad3b0064f009b0f553f5929de6566c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2776
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-16 07:45:07 +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
Shuhei Matsumoto
e0cd084bcb nvmf/rdma: Clear num_outstanding_data_wr to zero when read I/O to the controller failed
When read I/O to the controller failed, clear
rdma_req->num_outstanding_data_wr to zero to avoid
rqpair->current_send_depth goes to negative after completing data
transfer to the host.

This bug was apparent when the outstanding read I/O was aborted.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I62e439f946ef81ea0b5de5280670ed97fe8d977f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2341
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-15 15:28:15 +00:00
Shuhei Matsumoto
af61ab90c7 nvmf/rdma: Skip the state DATA_TRANSFER_TO_HOST_PENDING when the I/O failed
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0036e38004bb0a1afc22d67d347dcd33a61eb0a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2134
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-06-15 15:28:15 +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
Ben Walker
e7ceb0b926 nvmf/fc: Fix compilation issue on gcc 9
struct spdk_nvmf_fc_rq_buf_ls_request does not need to be marked
as packed. The static assert that immediately follows will catch
any inserted padding.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Id11ac9865a9c60f6d147d0f829d272ca791d0336
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2683
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-15 15:27:16 +00:00
Jin Yu
918177d6fd vhost: set the packed ring as default
The packed ring can supply up to 10% performance promotion.
Let's set the packed ring format as default.

Change-Id: Ie722417d20f3355769eefce4fec9831c60976e6f
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2821
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-12 15:45:27 +00:00
Jin Yu
817c7b4f6c thread: add info logs
If the operation function is not specified in spdk thread lib init.
Add a info logs to tell user that you should manage and poll the
thread.

Change-Id: I536c6954c129fbbbc2d19776866fa348d49688ee
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2804
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-12 15:40:31 +00:00
yidong0635
d1ad2cc9a4 nvmf/nvmf_rpc: Remove unnecessary returns.
These returns at the end of functions, so remove them.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I1f54d812956727e1871f4879c8bc9a526d7d14c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2848
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-06-11 19:51:59 +00:00
Ziye Yang
41219b2b9e iscsi: Add DataSequenceInOrder in discovery_ignored_param
The implementation of Calsoft case tc_login_29_1
is wrong. We should return "Irrelevant" to the initiator
when Session type is discovery.

Also also update the known failure test cases of
Calsoft.

Fixes 958.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I38cd2cf39bf80fd025ab74bc9dfe6ac412d01328
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2846
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-06-11 19:51:04 +00:00
Ben Walker
9135a72cf8 nvmf: Keep a list of poll groups on each target
The plan is to push the logic that assigns qpairs to poll groups down
into the nvmf library. To do that, we'll need to have a list of the poll
groups.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Iea59ac1a439dbd1bcae68fb2977a47a855884a15
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2811
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
2020-06-10 14:02:38 +00:00
Shuhei Matsumoto
315d47da4b lib/nvmf: Clean up abort AER request operation
Include completion operation into nvmf_qpair_abort() and rename
it by nvmf_qpair_abort_aer() for clarification. Update unit test
accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I763cc7d24b979e27e8775f4e69730466a2351bdf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2712
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: Ben Walker <benjamin.walker@intel.com>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
55c39cd008 lib/nvmf: Change nvmf_ctrlr_abort_aer() to set completion status of aborted I/O to ABORTED
nvmf_ctrlr_abort_aer() has not been used anywhere, and so we may be
able to remove it, but let's update it to set the completion status
of the aborted AERs to ABORTED for future potential use cases, and
then rename it by nvmf_ctrlr_abort_all_aer() to avoid name conflict
with the next patch.

Setting the completion status to SUCCESS is not good in this case
anyway.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie49936429b82dd05724cf8f10a1417e9c5304635
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2709
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: Ben Walker <benjamin.walker@intel.com>
2020-06-10 13:54:40 +00:00
Shuhei Matsumoto
db96437e42 lib/nvmf: Include redirection into spdk_nvmf_request_complete()
Some cases need to redirect spdk_nvmf_request_complete() to the
thread pointed by qpair->group->thread. Abort command will be
included such cases but abort command is executed in the different
file ctrlr_bdev.c. For the convenience, change spdk_nvmf_request_complete()
to include the redirection and extract the core operation of
spdk_nvmf_request_complete() into a private function
_nvmf_request_complete(). In ctrlr.c, call _nvmf_request_complete()
for non-redirected cases.

Besides, locate the definition of _nvmf_request_complete() under the
definition of  spdk_nvmf_request_complete() in a file to trick the format
check tool to avoid false positive, and fix a spell error together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I85546c80e99e01686c9470653e0ddafcf7c6a391
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2115
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: Ben Walker <benjamin.walker@intel.com>
2020-06-10 13:54:40 +00:00
WANGHAILIANG
90be351f87 lib/makefile: move vhost_user.c into lib/virtio directory
'make clean' can't remove compiled file in virtio_user directory.
So I move vhost_user.c into lib/virtio directory and fix it.

Change-Id: Ic7d41709d3a5d6cf2333c4deee285800b414a3fb
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2750
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-06-09 07:37:43 +00:00
Darek Stojaczyk
ba23cec182 rpc: don't allow starting RPC server on a TCP port
`-r` and `--rpc-socket` command line options will now require
path for a UNIX domain domain socket. The socket can be still
exposed over TCP with external programs. Hence, for (some)
compatibility reasons, the test scripts, jsonrpc-client, and
rpc.py will still be able connect directly via TCP.

Change-Id: I22a935f1596ce5f9c313b5be42cb85f772368c03
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/605
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
2020-06-08 09:35:16 +00:00
Shuhei Matsumoto
972b3ae3aa lib/bdev: Use not SPDK thread count but core count for mempool cache size
Cache size of mempool is not based on SPDK thread but DPDK thread,
i.e. CPU core. So replace spdk_thread_get_count() by
spdk_env_get_core_count() to determine cache size of mempool in
spdk_bdev_initialize().

Besides, allocate and free stub cores at the corresponding unit tests.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icc4deae84c74820af4de61e991fa3f8683add058
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2767
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-08 09:33:50 +00:00
Shuhei Matsumoto
8d4b319c98 lib/bdev: Change completion status of I/O aborted by reset from FAILED to ABORTED
Using not FAILED but ABORTED for the completion status of the I/Os
aborted by reset will be reasonable and is done in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8c8181dd33453a330888cffa93505e6fc462f278
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2708
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-08 09:28:27 +00:00
Shuhei Matsumoto
5bc400f382 lib/bdev: Add spdk_bdev_io_get_cb_arg() to get cb_arg of bdev_io
bdev_io is passed to the callback to the timeout I/O, but the context
of bdev_io is stored in cb_arg and spdk_bdev_abort() needs cb_arg.

Hence add an new helper function, spdk_bdev_io_get_cb_arg(), to get
cb_arg of bdev_io.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5eb25ffdad2467c55a1b55f8cf0accef8799bb4b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2621
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
97a5ea5796 lib/bdev: spdk_bdev_abort supports I/O splitting
The last patch ensures that the parent I/O terminate with failure
before continuing splitting process if one of child I/O failed.
This simplifies abort operation for I/O splitting.

Then we can use bdev_abort() and bdev_abort_io() nestedly.

Add necessary unit test together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I562bb6675f1fa380bc53dbe369138317ead66fe0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2235
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
089d178abb lib/bdev: Terminate parent I/O with failure immediately if one of child I/O failed
Previously, bdev_io_split_done() had continued splitting process
even if the status became failed. To abort split I/O, this patch
changes bdev_io_split_done() to terminate with failure before
continuing splitting process if the status became failed. Add
necessary unit test together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifd1ea49c22523e8c06fb45ebdcb2c84a57afd2ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2234
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
fc3e40618c lib/bdev: Add all submitted I/Os to the list including any I/O generated by splitting
This is a preparation to abort split I/Os. To abort any I/O by
bio_cb_arg, they have to be managed by the submitted I/O list.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9459d9d2d3511aad0325dcc20d88610444a4ea04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2231
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
29f86a2630 lib/bdev: spdk_bdev_abort supports queued I/O due to buffer allocation
Buffer allocation is done after redirection to the QoS thread.
Hence add a new helper function bdev_abort_queued_io() and add
its call to bdev_io_do_submit() for both buf_need_small and
buf_need_large.

For zcopy API, buffer allocation is done before buffer allocation
but the caller can get bdev I/O object, and can abort the I/O
directly if needed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2d6170de5ab2ba4d260df99db3e376c0e2c5ffaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2250
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
c2ce2f8540 lib/bdev: Rename bdev_abort_buf_io by bdev_abort_all_buf_io
Current bdev_abort_buf_io() aborts all queued I/Os due to buffer
pool capacity, and we want to use the name for the new function
which aborts only the specified I/O if queued. So rename
bdev_abort_buf_io() by bdev_abort_all_buf_io() in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I50a4ef1f5c4d2f8db9a0781413520345a7f13e59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2395
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
0d31e2bae6 lib/bdev: spdk_bdev_abort supports queued I/O due to out of memory
Add abort queued I/O due to out of memory into bdev_io_do_submit().
Any bdev I/O is queued due to out of memory only on the submitted
channel.

Aborting queued I/O due to out of memory is necessary only if
shared_resource->nomem_io is not empty.

Checking if shared_resource->nomem_io is not empty has been done
in this function.

However add the abort operation without and before checking if
shared_resource->nomem_io is not empty because the following patch
will abort queued I/O due to buffer pool capacity.

The purpose is to improve readability by consolidating all abort
operations into a single place.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I69a40f096aff13b84c1ed345fa8bd0dd80cef0e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2249
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
f048f3d3d3 lib/bdev: spdk_bdev_abort supports the case when QoS is enabled
When the target I/O is controlled by QoS, the abort request is
submitted on the same channel that the target I/O is submitted.

By using this, add a helper function bdev_abort_queued_io(), and
change _bdev_io_submit() to call bdev_abort_queued_io(), and
call _bdev_io_complete_in_submit() with success if bdev_abort_queued_io()
returned true when QoS is enabled on the corresponding channel.
Add necessary unit test together.

Update unit test accordingly, especially, update stub_submit_request()
to abort the matched I/O, update io_during_io_done() because we need to
know not boolean but the exact completion status now, and update
basic_qos() to reset the rate limit to test the abort I/O feature.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I16ca21e7c32cabfdce5d0e5c27a8af8bb00f11c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2230
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
Shuhei Matsumoto
5771019fc0 lib/bdev: Factor out bdev I/O complete operation in _bdev_io_submit()
The following patch will add another spdk_bdev_io_complete() call
in _bdev_io_submit(). Then, factoring out set/clear in_submit flag,
incrementing counts and calling spdk_bdev_io_complete() into a helper
function will be simpler.

in_submit flag is set and clear in bdev_io_do_submit() anyway,
and bdev_qos_io_submit() needs in_submit flag only for
bdev_io_do_submit().

All cases to call spdk_bdev_io_complete() in _bdev_io_submit() are
not performance critical.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibb783d7d001a9c36e61d791c664c67fdc46a09e2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2386
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
339a0419d3 lib/bdev: Rename bdev_abort_queued_io by bdev_abort_all_queued_io
Current bdev_abort_queued_io() aborts all queued I/Os, and we
want to use the name for the new function which aborts only the
specified I/O if queued. So rename bdev_abort_queued_io() by
bdev_abort_all_queued_io() in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2125d91bffc870a0a4be4bb74037c1d27bce2d36
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2385
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-08 09:28:27 +00:00
Shuhei Matsumoto
8889f7b7f4 lib/bdev: Add SPDK_BDEV_IO_STATUS_ABORTED to notify the upper layer correctly
The I/O aborted by the abort command should be completed with SC = 07h, i.e.,
"Command Abort Requested". However, if the generic bdev layer or non-NVMe
bdev module aborted the I/O, the aborted I/O would complete with SC = 06h, i.e.,
"Internal Error". To fix this unexpected behavior, add an new I/O status
SPDK_BDEV_IO_STATUS_ABORTED and update spdk_bdev_io_get_nvme_status() to
set SC to 07h if the I/O status is SPDK_BDEV_IO_STATUS_ABORTED.
If the NVMe bdev module aborts the I/O, the I/O status is set to
SPDK_BDEV_IO_STATUS_NVME_ERROR and SC is set as expected.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifc99a97248a8d54a8c8d2fab74a90c7ce99c2e6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2582
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-08 09:28:27 +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
Shuhei Matsumoto
b62bfbf6a9 lib/vhost: Remove and inline spdk_vhost_blk_get_dev
Having spdk_vhost_blk_get_dev required us to bump up the SO version
the vhost library when we updated bdev.h but spdk_vhost_blk_get_dev
has not been used publicly, and can be inlined very simply.

So remove spdk_vhost_blk_get_dev from include/spdk/vhost.h and inline
it to the place which had used it.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I98c233b81d7980d4e2c5bd3c0a65d747f183e1e9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2747
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-08 09:28:27 +00:00
Ziye Yang
18450e8b82 nvme: solve the spdk_nvme_connect compatibilty issue.
This is used to make spdk_nvme_connect can support
the old library for compatibility.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I49d92fb473c3cbabd8e1240785b920480202eee9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1998
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-05 09:04:11 +00:00
Ziye Yang
05cd548cf1 nvme: Fix the field initialization of struct spdk_nvme_ctrlr_opts
Purpose: Make the initilaization in order.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I66962073a02b6a4c2fc79ac343cdf5310075dd63
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2766
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-05 09:04:11 +00:00
Jacek Kalwas
000e6f5b87 nvmf: move cdata subset from transport to ctrlr
Having that transport can decide about particular ctrlr attributes not
globally but per ctrlr.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ia3fb0d4e576cb9f8ce6df75f775e2fd5727d7f48
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2757
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-05 09:04:01 +00:00
Jacek Kalwas
0ba47879b5 nvmf: allow to override sgls
Useful for transport specific layer to inform that SGLs are not
supported or to adjust settings.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ia849f5af206538408664fd20ea4e7dcb9da6f6f9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2756
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-05 09:04:01 +00:00
Wojciech Malikowski
c6dbe0ab0e lib/ftl: Keep tracing functions under define flag
Tracing functions introduce performance overhead
so by default keep them only in debug builds.

Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Change-Id: I08e0a139c3efa87b0f46b7e7a026b0676f3e8634
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1924
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>
Community-CI: Mellanox Build Bot
2020-06-05 09:03:31 +00:00
Darek Stojaczyk
21e2a71515 nvmf: remove spdk_nvmf_tgt_transport_write_config_json()
This wasn't implemented anywhere. There's
spdk_nvmf_tgt_transport_write_config_json() which
dumps the config of a specified target.

Change-Id: I0ca247f88109f07c33fb109ac58776d2d633e233
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2760
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-05 09:03:26 +00:00
Tomasz Kulasek
550d4867a0 lib/nvme: update io msg producers on ns manage
Change-Id: I20adb92ae4e13e775b5e70617c705afd32e16c9e
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/681
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-06-05 09:01:44 +00:00
Tomasz Kulasek
11aca20442 nvme/cuse: add spdk_nvme_cuse_update api
spdk_nvme_cuse_update_namespaces() API allows application
to repopulate namespaces on NVMe CUSE devices.

Change-Id: I5375b13bcc91b17cd26b4dc6f02d83dc33826542
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/658
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>
2020-06-05 09:01:44 +00:00
Alexey Marchuk
1551197db5 rpc: Deprecate max_qpairs_per_ctrlr parameter
This parameter describes the number of admin and IO
qpairs while admin qpair always exists and should not
be configured explicitly.
Introduce a new parameter `max_io_qpairs_per_ctrlr`
which configures the number of IO qpairs.
Internal structure of NVMF transport is not changed,
both RPC parameters configure the same nvmf transport parameter.

Deprecate max_qpairs_per_ctrlr in spdkcli as well

Side change: update dif_insert_or_strip description -
it can be used by TCP and RDMA transports

Config files parsing is not changed since it is deprecated

Fixes #1378

Change-Id: I8403ee6fcf090bb5e86a32e4868fea5924daed23
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2279
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
2020-06-04 07:20:45 +00:00
Wojciech Malikowski
074cdb4d06 lib/ftl: Do not check busy flag when appending
In append case checking if zone is not busy before
submitting to it is unnecessary. This patch improves
append performance.

Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Change-Id: I42f3b31815aa10aed6b0374c2247f857683822f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1923
Tested-by: SPDK CI Jenkins <sys_sgci@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-06-04 07:20:34 +00:00
Wojciech Malikowski
4ebe50f9ab lib/ftl: Fix write statistics calculation
This patch fixes user writes statistics counting.

Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Change-Id: I209582645c1d523bb5d639f2d32ca09b3f3dc477
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1922
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-04 07:20:34 +00:00
Seth Howell
1039254319 nvme/rdma: add cq resizing.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I6350d76b8c1e778c18e693b2dfbb10dd36b3e3d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1927
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-04 07:20:16 +00:00
Seth Howell
67b0dcfe29 nvme_rdma: add tracking for rdma objects in qpair.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0b45aed21dc649888bb9d93c5937fb553f35eb27
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2568
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-04 07:20:16 +00:00
Seth Howell
8bef6f0bdf lib/nvme: rdma poll group with shared cq.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ifde29f633f09cccbebfdcde5ab2f96d9590449f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1167
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-04 07:20:16 +00:00
Darek Stojaczyk
922d90c806 log: remove backtrace printing
It was broken since long ago. --enable-log-bt doesn't change
anything. log.c expects SPDK_LOG_BACKTRACE_LVL to be defined
for backtrace to work, but it's not defined anywhere.

Apparently nobody needs this, so remove it.

Change-Id: I2313fd24198b0bf718663f2eafee9b5c6efa0a7f
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2194
Community-CI: Broadcom CI
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-06-03 07:39:08 +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
Evgeniy Kochetov
eb0faf2634 sock: Add spdk_sock_impl_get/set_opts function
spdk_sock_impl_get/set_opts functions allow to set different socket layer
configuration options. Options can be set independently for each
socket layer implementation.

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I617e58366a153fae2cf0de1b271cc4f4f19ec451
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/607
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:00 +00:00
Seth Howell
6f97efb784 test/make: add leaf type changes check to check_so_deps.
This is an important aspect of ABI versioning.

There was a change to the spdk_bdev_opts struct
which is accessible from the public API that results
in an ABI change.

There was also a change in the spdk_accel_module_if struct that
will affect new modules so its major version needs to be revved.

There was also a change in the publically accessible rmda_hooks
structure which forced an ABI change in the NVMe library.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I5cc6886fe01b4adc2836b6e15995471f0361dc29
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2663
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-06-01 13:07:30 +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
Seth Howell
57c2b0c5a3 lib/util: remove _spdk prefix from functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id87b6eae46e7503796904676edfa22d821673a9a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2462
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-01 13:07:30 +00:00
Seth Howell
0af754f0f7 lib/thread: remove _spdk prefix.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iab2dba0e7cbbedaeb12f2dd8ac3c8041eb19804c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2461
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-01 13:07:30 +00:00
Seth Howell
1a9c19a954 lib/nvme: remove spdk prefix from internal headers.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iccde5860b83217163428ff504cba87a1cf209720
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2444
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-01 13:07:30 +00:00
Seth Howell
6d18ea425b lib/nvme: force qpair disconnect before aborting rdma requests.
This is needed for shared completion queues which can still give us
successful completions on aborted requests if the qpair hasn't been
disconnected.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I85cf1a81ef563d8c02d684b09d2f7ad5008e38cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1961
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-01 09:22:05 +00:00
Seth Howell
b4e060b560 lib/nvme: check that req is not null in RDMA.
When a request has been aborted, it's possible to get a completion
for an rdma request but the rdma_req->req object has already been
cleared to NULL.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I5f7b1b96ff4be8c436aae9a7e2a7c9927d04e627
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1960
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-06-01 09:22:05 +00:00
Tomasz Kulasek
c62887ad0b nvme/cuse: add dynamic nvme cuse devices update
This patch adds a posibility to update cuse devices after cuse
device registration.

During NVMe controller life cycle there's a posibility to create
and delete namespaces with Namespace Manage feature from NVMe
spec 1.4.
To guarantee consistency, after changing the number of namespaces
NVMe CUSE devices must be repopulated after Namespace Manage
operation.

This patch introduces cuse_nvme_ctrl_update() entry point to allow
repopulate NVMe CUSE devices.

Change-Id: I478faae040027965321af585abfc34eaf35c908c
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/650
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: Changpeng Liu <changpeng.liu@intel.com>
2020-06-01 09:21:48 +00:00
Tomasz Kulasek
a7567709a6 lib/nvme: implement SPDK_NVME_DATA_HOST_TO_CONTROLLER in cuse
Change-Id: I07bc1771eec284f90d887a0a806d315fbc989428
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1218
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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-06-01 09:21:48 +00:00
Tomasz Kulasek
8da21f69d3 lib/nvme: rework cuse admin command
For now only controller to host transmition is implemented
for CUSE.

This patch separates cuse_nvme_admin_cmd_send() entry point
to be used to implement another transmition directions.


Change-Id: Ic9013a30c16cf71957c8b411ee00a43c7aa8bbb6
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1674
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-06-01 09:21:48 +00:00
Seth Howell
964463e420 lib/blob: remove spdk_ prefix from bs_batch_read_bs_dev
This function was removed from the public API last release
when the map file was introduced, but I didn't clean up
the name at that time.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3101723b504531ce2c51dba2feb063511dd32684
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2443
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-01 09:21:14 +00:00
Seth Howell
61d85773f6 lib/nvmf: remove spdk_ and _spdk prefix from functions.
I missed a few files in this library the first time.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2ad55355e6348eaa10384a148dd45deb9f68fc2b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2442
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-06-01 09:21:14 +00:00
Shuhei Matsumoto
75343ec40a lib/accel: Remove inclusion of SPDK event library
Replace inclusion of spdk/event.h by spdk/log.h in lib/accel/accel_engine.c.
There had been no dependency with SPDK event library.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8709b582747de932c1251635940e0aba54211c2f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2691
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Shuhei Matsumoto
11d3806efb lib/bdev: Remove inclusion of SPDK event library
Remove inclusion of spdk/event.h from lib/bdev/bdev.c. Its dependency
had been removed before.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icfea104b20172e624574506a41fa92524ebc8627
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2690
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Shuhei Matsumoto
507833736c lib/nbd: Remove inclusion of SPDK event library
Remove inclusion of spdk/event.h from SPDK NBD library. Its dependency
had been removed before.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I33d89ccc0c37417d658992a33c3ece793e658011
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2689
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Shuhei Matsumoto
f21f51bd81 lib/nvme: Remove inclusion of SPDK event library
Remove inclusion of spdk/event.h and spdk_internal/event.h from
SPDK NVMe library. Their dependency had been removed before.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ide3a0902b1cebb9c9033ade45d7488622e38696c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2688
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Shuhei Matsumoto
207c959a2c lib/nvmf: Remove inclusion of SPDK event library
Remove inclusion of spdk/event.h and spdk_internal/event.h from
SPDK nvmf library. Their dependency had been removed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibc6c52ab41555d9b29afc3e16c1c3fd0bf5fc63a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2687
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Shuhei Matsumoto
6917f6e061 lib/iscsi: Remove inclusion of SPDK event library except shared memory ID for iSCSI top application
iSCSI library still needs to include SPDK event library only for
shared memory ID to allocate shared memory for iSCSI top application.

We will move the code to module library separately later but remove
all other inclusion of SPDK event library in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I21d77b9cc00c6a1f512546a6a0202c8fa5623bed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2686
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Shuhei Matsumoto
1b5ad8adb4 lib/scsi: Remove inclusion of SPDK event library
Remove inclusion of spdk/event.h from SPDK SCSI library.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8a6278f86cb99da76f26090d11f62ec9fdf956c2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2685
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>
2020-06-01 09:20:41 +00:00
Shuhei Matsumoto
8656468020 lib/vhost: Remove inclusion of SPDK event library
Remove inclusion of spdk/event.h from SPDK vhost library. Dependency
of SPDK event library had been removed from SPDK vhost library.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5853dee6e8225834f030db9a3317be47c1355a27
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2684
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-06-01 09:20:41 +00:00
Changpeng Liu
3b6622046e nvme/pcie: use 16 bits width access API for PCI_COMMAND register
PCI_COMMAND register with offset 0x4 is 16 bits width.

Change-Id: I86483e58a3ac680efaae6ff7edaadde8efc289f6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2589
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-29 14:59:24 +00:00
Jin Yu
b7cc4dd7dd nvmf: support multi AER events in nvmf target
Add the AER events in nvmf target from one to four.

Change-Id: Ie31988b49d68bdbc28ab2e09c783e681d3017e2b
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2548
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-29 14:59:08 +00:00
Tomasz Kulasek
c84b3cccdd lib/nvme: fix do not use cuse session on fail
Change-Id: I9946829183c43286da4be6bda887a4d13d93e398
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2612
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-29 14:58:03 +00:00
Jim Harris
89e47f6014 nvme: create netlink socket during nvme_driver_init
This helps ensure thread safety on creation of the
netlink socket, when probe is called from multiple
threads at once.  It is also a lot more clean - we just
create it once, rather than checking every time probe
is called to see if it has to be created.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2681
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-29 09:26:05 +00:00
Jim Harris
18f79f2449 nvme: add mutex to nvme_driver_init
This will allow spdk_nvme_probe and variants to be
called from multiple threads in parallel.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2680
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-29 09:26:05 +00:00
Seth Howell
684b3a49f0 lib/nvme: split request resubmission into function.
This will need to be done separately for poll groups.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0e432493bdb02e13fe5c73a8a09911cef573307b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1664
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-05-28 07:13:44 +00:00
Seth Howell
63732d8880 lib/nvme: split cq completion processing to its own function.
This helps create a separation between processing a qpair and processing
a completion queue which can be shared across multiple qpairs.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I111dd16ec4327854f232988a96891a65813f00e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1166
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-05-28 07:13:44 +00:00
Tomasz Zawadzki
7b8964c5c8 lib/env_dpdk: rename pci_init/fini() to pci_env_init/fini()
Patch below removed spdk_* prefix from functions in env_dpdk:
(15d0ae62) lib/env_dpdk: remove spdk prefix from internal functions.

This resulted in name conflict with libpci PCI Utilities library
pci_init() function.

Fixes #1407

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie6d6eea3a7b8a0f0223bd14bbe258061460a81dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2611
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-28 07:12:42 +00:00
zkhatami88
fe3fab26bf nvme/rdma: Using hooks in reg mr
Signed-off-by: zkhatami88 <z.khatami88@gmail.com>
Change-Id: I9493fe82b5b758c0092d20ef18b79d652fefed85
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1905
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-28 07:11:39 +00:00
GangCao
34430edda7 nvme: add the ctrlr traddr in the error message
In the case, there are several ctrlr used, it's better to
have the traddr to indicate which ctrlr has the issue to
shutdown.

Change-Id: Ie564bb70566ba5822938efc99125d063f7b4ae4a
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2588
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-27 07:36:58 +00:00
GangCao
391dd1c268 Blobfs: update the display string
Change-Id: Ia891b7ccac5ccb2def7b59d081750d7ec5f9729e
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2604
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-27 07:36:50 +00:00
Seth Howell
f7ebaeaa59 lib/lvol: remove spdk_ prefix from functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic8446a9e577e7f55f09b365f2f1e41b44f81e4bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2441
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-27 07:35:02 +00:00
Seth Howell
1a9ed697f0 lib/jsonrpc: remove _spdk prefix from functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iea58ebd26b28cae1531946d0833e7be666a46127
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2440
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-27 07:35:02 +00:00
Seth Howell
33ebd2cac0 lib/ftl: remove _spdk prefix from functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2dd8028e9a56fa861e2f66118c3c751c54098fe3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2439
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-27 07:35:02 +00:00
Seth Howell
fd36120639 lib/event: remove _spdk prefix from functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie9aef08d8c46ed9eef883784578fa795e2cd60fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2438
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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-05-27 07:35:02 +00:00
Seth Howell
b5d68d5934 lib/blob: remove _spdk prefix from all functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Idb33816e5b66266987845172c27c87667ac0a596
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2437
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-05-27 07:35:02 +00:00
Seth Howell
d145b9779f lib/bdev: remove _spdk prefix from functions.
We want to avoid confusion between _spdk and spdk
prefixes.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I72b7948d94b0e9d695ae6b323fbd8bb6e4c143e2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2436
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-27 07:35:02 +00:00
Dayu Liu
b8ac3e8acd read_fd_message: distinguish prints of log message
When VM shutdown there will be an error message 'VHOST_CONFIG: recvmsg failed' printed.
The return value of recvmsg will be 0 when the peer has performed an orderly shutdown,
or -1 if an error occurred. So adding logs to distinguish these two different situations
to avoid confusing and to hint accurately.

Signed-off-by: Dayu Liu <liu.dayu@zte.com.cn>
Change-Id: Ia4b806a11d3c6ddf076c61d1caad4fa7b16fb9b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2557
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-25 09:08:00 +00:00
Sochin Jiang
aaca23fb4b lvol: let thin_provision flag be consistent with Blob
I found this flag weird while debugging a lvol with
thin provisioned Blob, so make it consistent with it's Blob.

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: Iae555020d5781dfcf4d4f072a47e9573d35b8705
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2435
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-22 10:42:28 +00:00
Jin Yu
13cc64fd53 nvmf: decrease the aer notification code
Using an inline function to decrease the aer notification code.
It also can benefit from adding new async events later.

Change-Id: Id0f7c57fd66ade303c625d1d1af10d41dead8994
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2547
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-21 09:21:39 +00:00
Jin Yu
9396422b36 nvmf: fix aer request judgment
Fix potential bug. In nvmf_ctrlr_abort_on_pg(), when run into
the request_complete it can trigger this bug because in nvmf_qpair_abort
the ctrlr->aer_req was set to NULL.

Change-Id: I37a7e3c76c6616ca4ecbc6d9d2776ee32449c796
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2545
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-21 09:21:39 +00:00
Seth Howell
fadfef63d1 lib/nvme: provide mechanism for tracking request completions
Add wrappers around the request and response values and track
those using the wr_id value.
This will come in handy when we start doing poll group based
completion processing.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iaff75b03e41d49f53e55e0ce65d384567988fc9d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1165
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-21 09:21:27 +00:00
Alexey Marchuk
48dee973ac nvmf/rdma: Do not log an error for recv WC with error status
When we don't use SRQ and close a qpair, we will receive completions
with error status for all posted ibv_recv_wrs. This is expected and
we don't want to log an error, use debug severity in this case.

Fixes #1387

Change-Id: Ia8efb8f24628880454fab1d7f6188e7b31cffb67
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2451
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-21 09:20:46 +00:00
Sochin Jiang
e230d49ae2 blob: fix a wrong memset parameter
A wrong parameter is passed to memset when loading blob->active.clusters,
this leads to an unpredictable wrong lba value using thin provision LVOLs
while submitting IO requests, thus causes EIO error using QEMU vms.

Signed-off-by: Sochin Jiang <jiangxiaoqing.sochin@bytedance.com>
Change-Id: Iecea80cfa58f7a025603430d666fd9cd4d3fea8b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2431
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-21 09:20:30 +00:00
Seth Howell
a3f72b2e5a lib: net, notify, nvme, rocksdb remove spdk_ prefix.
remove only the spdk_ prefix from static functions in
the above libraries.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I59ce032c3312fa73f30c133fd62e603c1eee2859
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2365
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Paul Luse <paul.e.luse@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
Seth Howell
0be5557cad lib: json-nbd remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Idbf8d37fbac4e3a9eff253095efb2525c9094d94
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2364
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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
a7592dbe13 lib/event: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I22ea328f19d7cdb766c12c4c15c188963f971226
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2363
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@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
Seth Howell
3456377b45 lib: accel, bdev, blob, env_dpdk remove spdk_ prefix.
Hitting only the static functions from the above libraries
with the spdk_ prefix.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic6df38dfbeb53f0b1c30d350921f7216acba3170
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2362
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Paul Luse <paul.e.luse@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
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
Changpeng Liu
44f69a9e51 nvme: add a quirk for QEMU emulated NVMe SSD
When starting the QEMU NVMe SSD with "cmb_size_mb=XX"
parameter, the controller memory buffer feature is
enabled in the Guest, the SPDK NVMe driver running
in the Guest will allocate the submission queue in
the controller memory buffer by default, it will use
memset and SSE instruction when copying NVMe command
to the submission queue entry or zero the whole
submission queue, inside the memset implementation
the AVX2 instuction will be used if the CPU can support
such feature.  However, due to the limitation in the
QEMU, the maximum access width to the PCI BAR space is
set to 8 Bytes, SPDK will report illegal instruction
in Guest.

Here we add a quirk for the QEMU emulated NVMe.

Fix issue #1362.

Change-Id: Ib5e2e4198d39ce7f8455175f7db283db0b01eebf
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2196
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: Jim Harris <james.r.harris@intel.com>
2020-05-20 14:16:52 +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
paul luse
3ef64e0c2b lib/accel: add compare function to accel fw
Along with the sw engine back end implementation for it. IDXD
back end will follow, the use in the accel perf tool as part
of verify.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia1013cd884ff71990f898320d6a22e96e16ad2a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2107
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-20 14:16:22 +00:00
Ben Walker
76aed8e4ff Revert "env: Use rte_malloc in spdk_mem_register code path when possible"
This reverts commit 6d6052ac96.

This approach is no longer necessary given the patch immediately
preceeding this one.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I5aab14346fa5a14dbf33c94ffcf88b045cdb4999
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2512
Community-CI: Mellanox Build Bot
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>
2020-05-20 14:14:21 +00:00
Ben Walker
cf450c0d7c env: Add spdk_mem_reserve
The spdk_mem_reserve() function reserves a memory region in SPDK's
memory maps. This pre-allocates all of the required data structures
to hold memory address translations for that region without actually
populating the region.

After a region is reserved, calls to spdk_mem_register() for
addresses in that range will not require any internal memory
allocations. This is useful when overlaying a custom memory allocator
on top of SPDK's hugepage memory, such as tcmalloc.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ia4e8a770e8b5c956814aa90e9119013356dfab46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2511
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-20 14:14:21 +00:00
Seth Howell
8668141b41 make: remove spdk.map.
As of now, all of the libraries and modules have their own
map file specified. Get rid of the generic top level one and
add a test to make sure that these files have been specified.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I329004e7442c7975731fc973455c93e724982952
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2359
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-20 14:11:31 +00:00
Seth Howell
dbaa2c7906 lib/vhost: remove spdk prefix from static functions in vhost_rpc.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib555a3da41142730ab09107368e78dcfd684feac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2308
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-20 14:11:31 +00:00
Seth Howell
4d112ac217 lib/vhsot: remove spdk prefix from static functions in vhost_nvme.c.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If2b818bc90a957f8478c68009175a0436dac4876
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2307
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-20 14:11:31 +00:00
Seth Howell
ba5c5cc344 lib/vhost: remove spdk prefix from static functions in rte_vhost_compat.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I66ec9330b18e222a3a523a55f5f61f3c20610cae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2306
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-20 14:11:31 +00:00
Seth Howell
dd81d57565 lib/vhost: add static qualifier to spdk_vhost_scsi_device_background.
This variable is only used in this function.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib1836662e8068f6a459ce8746b45b5dca08079e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2305
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-20 14:11:31 +00:00
Seth Howell
0059b45510 lib/vhost: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I9935151ef41be20199a19085c1775d15f9ab6ba2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2304
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-20 14:11:31 +00:00
Alexey Marchuk
9b86f31a38 nvme/rdma: Handle failed send/recv as a fatal error
Do not make attempt to resubmit failed send/recv WR, instead
report and error to the upper layer (in case of new request) or
fail a qpair (in case of active polling).

In the case of failed ibv_post_send and disabled `delay_cmd_submit`
nvme_rdma_qpair_submit_request returns an error to the caller.
The caller completes failed request but RDMA layer still keeps
it in a send queue. Later RDMA layer can send the corresponding
WR and notify the upper layer about the completion of the request
for the second time.

Change-Id: I1260f215b8523d39157a5cc3fda39cd4bd87c8ec
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1662
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
8c6a345534 nvme/rdma: Use RDMA provider API to send WRs
Change-Id: I3dc87751d250da84d988b1c7a9c57112b5bd10b0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1661
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
bbb493ce0c nvmf/rdma: Use RDMA provider API to send WRs
Change-Id: I9bd6956d27716ae95abea0fd78adebaa9b288edb
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1660
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: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
a12530d6d2 rdma: Add RDMA provider API to send/flush Work Requests.
Verbs implementation: doesn't differ from the original:
- send_wr: saves WRs in the qpair internal structure
- flush_wr: calls ibv_post_send

Direct Verbs implementation:
- send_wr: calls ibv_wr_start for the first WR;
Calls opcode-specific function to add a WQE to SQ
Tracks queued WRs to return a correct pointer to 'bad_wr'
- flush_wr: calls ibv_wr_complete - it flushes to the NIC
all WRs added between ibv_wr_start and ibv_wr_complete

Change-Id: I65a26914db688af20589f3b69a994d214d860726
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1659
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
daee62a05b rdma: Add mlx5_dv RDMA provider
The new RDMA provider can be enabled by passing
--with-rdma=mlx5_dv parameter to configure script
This provider uses "externally created qpair"
functionality of rdma cm - it must move a qpair
to RTS state manually

Change-Id: I72484f6edd1f4dad15430e2c8d36b65d1975e8a2
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1658
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>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
63c8cea783 rdma: Add API function to disconnect qpair
This is a wrapper over RDMA CM rdma_disconnect function
The wrapper is needed since in Mellanox Direct Verbs
(aka DV) we must move qpair to error state manually
before calling rdma_disconnect

Change-Id: Ia8623c6989e7679591f2da56bafa7f4262eeebf9
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1975
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
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: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
b4a9d7d318 nvme/rdma: Use RDMA provider API to create/destroy qpair
This patch adds use of RDMA provider API to NVMEoF initiator.
Makefiles have been updated with new RDMA lib dependency

Change-Id: Ieaefeb12ee9681d3db2b618c5cf0c54dc52230af
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1657
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
ea7a4f3c53 nvmf/rdma: Use RDMA provider API to create/destroy qpair
This patch updates NVMF target to use RDMA provider API
to create and destroy qpairs.
Makefiles have been updated with new dependency on RDMA lib

Change-Id: Iae35aea601380f8d1a6453a7fd6115f781e126f5
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1656
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-20 12:03:50 +00:00
Alexey Marchuk
7e14f72443 rdma: Intorduce RDMA providers
RDMA provider is used as an abstraction layer and allows
to add vendor specific verbs implementation. This patch adds
an interface to create and destroy qpairs and its implementation
using regular verbs API.
Future patches will add functions to queue/flush Work Requests,
enable usage of RDMA providers API in NVMEoF target/initiator and
add Mellanox Direct Verbs implementation. This abstraction layer
is flexible enough to add other vendor's implementations.
The choice of a specific RDMA provider will be made at
the configuration step, it doesn't add any runtime overhead.

Change-Id: If8eec5bd45c82c71f73a14f6e84121cd02a1d65d
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1655
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-20 12:03:50 +00:00
Xiaodong Liu
3ceeab7c8b notify: use noticelog for duplicated register
Change-Id: I36a05589298bcd0311a47a7854017ed01e8bd988
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2446
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-19 09:44:19 +00:00
yupeng
f233c376b1 bdev: add bdev_auto_examine in bdev_set_options
The bdev_auto_examine flage will impact how bdev layer examine a
disk. If bdev_auto_examine is true, the bdev layer will examine all
bdevs as usual. If bdev_auto_examine is false, the bdev layer will
only examine a bdev if it is in a whitelist.

Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: If5b26283905f97f8a95ae9065226fa3dae6c27a9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2114
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-05-19 09:43:53 +00:00
yidong0635
6be2dde969 lib/log: Eliminate waring about format-truncation.
Eliminate this kind of waring by enlarge string size.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ib6d4d031fc635ce15e996d606f5164f682ec34b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2426
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-19 09:43:44 +00:00
Tomasz Zawadzki
d3cf561199 nvme/pcie: reduce physically contiguous memory for CQ/SQ
Following patch made sure that CQ/SQ are allocated in
physically contiguous manner:
(64db67) nvme/pcie: make sure sq and cq are physically contiguous

Using MAX_IO_QUEUE_ENTRIES is enough to make sure that either
queue does not span multiple hugepages.

Yet the patch made sure that whole page is occupied only
by the queue. Which unnecessarily increases memory consumption
up to two hugepages per each qpair.

This patch changes it so that each queue alignment is limited
up to its size.

Changes in hugepages consumed when allocating io_qpair in hello_world
application:
io_queue_size		Without patch	With patch
256			8MiB		0MiB
1024			12MiB		4MiB
4096			24MiB		16MiB
Note: 0MiB means no new hugepages were required and qpair fits into
previously allocated hugepages (see all steps before io_qpair
allocation in hello_world).

Intersting result of this patch is that since we required alignment
up to the hugepage size this resulted in reserving even two 2MiB
hugepages to account for DPDK internal malloc trailing element.
See alloc_sz in try_expand_heap_primary() within malloc_heap.c

This patch not only reduces overall memory reserved for the
queues, but decreases increase in heap consumption on DPDK side.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I75bf86e93674b4822d8204df3fb99458dec61e9c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2244
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: Ben Walker <benjamin.walker@intel.com>
2020-05-18 10:13:56 +00:00
paul luse
8c1fd55583 lib/idxd: implement idxd back end for CRC
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ib23c23f69d8f002023dd72be1b7369e50ac44fb2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2105
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-05-15 08:12:13 +00:00
paul luse
db8fe014b7 lib/accel: Add CRC function
Add the CRC function at the framework level and implement the
software engine back end to use ISAL. The patch series will continue
to include an option for accel_perf to test CRC as well as IDXD
implementation.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4eff3bbcf98c0bc2928a48272a57031c8b96394e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2072
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-15 08:12:13 +00:00
GangCao
2234bb665d Transport: allocate a global array of transports
Currently the new transport is dynamically allocated and looks like
not freed when the application exits. Trying to use the
__attribute__((destructor)) function to free the allocated memory,
it will not work in the case of user created thread as this function
is called right after the "main" function while other operations
may be still ongoing.

In this case, add a global array of transports.

Change-Id: I610b1e8114ba2e68abbd09ea5e02a9abce055e70
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2415
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-15 08:11:54 +00:00
Vitaliy Mysak
cbe9ea52d0 lib/log: add spdk_vlog function
Some users of SPDK API, such as OCF,
may want to generate logs with arguments themselves.
In that case they would need to first create a buffer
and then pass that buffer as a single argument to spdk_log().
This change adds spdk_vlog() which accepts va_list as argument list,
so it is easier to use spdk_log().

Change-Id: Ie2a3ac481035a250fcd68d0f9b8292008ebb6fe0
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1946
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-15 08:10:39 +00:00
Seth Howell
29aeb31ab4 lib/vmd: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id248c4023f0f407e070ffd323f1fee8629cfd967
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2310
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-14 10:37:14 +00:00
Seth Howell
8c85b30d1d lib/virtio: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I54b6df4fc32f48a57053bff33032351ca54c0e1d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2309
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-14 10:37:14 +00:00
Seth Howell
b869b4b96b lib/util: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I0648f245166a0e7b427ede54547a186bee9adf41
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2303
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-14 10:37:14 +00:00
Seth Howell
2fe1348d6a lib/util: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ibfc3133aa6aa54d443d7845aa94ae2ea9cc59e95
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2302
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-14 10:37:14 +00:00
Seth Howell
b59b86ae67 lib/util: move some crc32 functions to internal header
Allowing for custom crc32 polynomials isn't really within the scope
of SPDK. SPDK libraries have shifted over to using more optimized
versions of these functions wherever possible (e.g. ISA-L).

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ie4837010874e957481dd00896389b38c842445e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2424
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-14 10:37:14 +00:00
Seth Howell
f8d5189552 lib/trace: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I5c2a7048465d959164630289fe6651b288936610
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2301
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-14 10:37:14 +00:00
Seth Howell
74dcd8e250 lib/trace: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id3e4e1f3cd17739f534db9266d56ceda586312c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2300
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-14 10:37:14 +00:00
Kyle Zhang
2187424ab2 lib/vhost: remove dependency on lib/event
In current implementation, lib/vhost assumes that it always runs
together with lib/event, and would call lib/event's functions in
vhost.c. This is not necessary and make program unable to
create/destroy vhost module without init/fini the whole spdk env. It
would cause problems when program runs with vhost and other spdk
components together.

In this patch, we remove the dependency of lib/vhost on lib/event by
adding a global vairable g_vhost_core_mask so that it could handle
core mask by itself.

Signed-off-by: Kyle Zhang <kyle@smartx.com>
Change-Id: I38ceb92ac39b6980955346fda41e968aaead863d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1204
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-13 07:47:01 +00:00
Tomasz Zawadzki
887531f6a6 lib/blob: provide better log on blob_load failures
Added blobid and metadata page number to the log.
Previously only number within particular blobs md chain
was displayed.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8e881c5824c9d2eadca9f3ac8ee2ac9ffc0e5cae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2058
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-13 07:46:43 +00:00
Li Feng
bcc28e05d1 vhost_blk: speed up the vhost device boot
When starting qemu with vhost-user-blk multiqueue(set num-queues to
more than 1), the vhost device will be started/stopped many times
(related to the queue num), as the vhost-user backend doesn't know the
exact number of queues used for this device.
The target have to stop and start the device once got a valid IO queue.

When stoping and starting the vhost device, the backend bdev io device
will be deleted and created repeatly.

If the backend bdev is a distribution system, the cost is large as the
network RTT.

In this patch, add a dummy_io_channel to hold a reference to the io
device, so that the io device will not be deleted.

Change-Id: I5737248ec52bee06342ff0873bb89fd0a51665c2
Signed-off-by: Li Feng <fengli@smartx.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2020
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-05-13 07:46:29 +00:00
Seth Howell
7a2bf6fcb9 lib/thread: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2b1b43c76518c7a00037360b8a1d3c46b4d14f02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2299
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
90b4350284 lib/thread: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If5d934f7d3f46e5c508e40c0b0c3aea65d3ba113
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2298
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
ca87d13e56 lib/sock: remove spdk prefix from static functions in sock.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I86311908039368135f0fe2ea68e63cf351f9f79e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2297
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
67801f6cca lib/sock: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I5cf35dbe14bf29050ea40f31553a10957f7dac11
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2296
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
1482fdea3e lib/rpc: remove spdk prefix from static functions in rpc.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I60a84c48b2768a2f93a859f78c961294dd590461
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2294
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
91a594ad8b lib/rpc: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I2a81c5d7911d2e0cef2346200ae3f3c8740a4e75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2295
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
9654226cad lib/reduce: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3545b884717966cb53999a04435a010e43f9cc45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2293
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-12 21:49:03 +00:00
Seth Howell
6dec2087e9 lib/nvmf: remove spdk prefix from static functions in transport.c.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I601d59c5e182aa4a713eb798b3e73fe97106866a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2316
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
4de405ab6e lib/nvmf: remove spdk prefix from static functions in tcp.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If5d29c4236022f949a6f2e44bcd51a6e2a9ea88b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2289
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
63c90491e5 lib/nvmf: remove spdk prefix from static functions in subsystem.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I920c7c850cb1cc0081c2e4c3e5744bd63536786e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2288
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
55d8d943a8 lib/nvmf: remove spdk prefix from static functions in rdma.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I651924850083db8b6a84bdee4c9efd1103551daf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2287
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2020-05-12 21:49:03 +00:00
Seth Howell
e569a5785d lib/nvmf: remove spdk prefix from static functions in nvmf_rpc.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3a653ca9cd347a8703093e2ddef3c8c8df8b57c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2286
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
e1505a6e48 lib/nvmf: remove spdk prefix from static functions in nvmf.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iddf9359124b079f257b5312c0e304b979c864f6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2285
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
54651d5178 lib/nvmf: remove spdk prefix from static functions in fc.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I65a2b137c86b063db7b81b28e3d554dfd81fb6b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2284
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
198fd2ce6b lib/nvmf: remove spdk prefix from static functions in ctrlr.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ibb72c2fb687506831988b09fddad4fc3dae0e4ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2282
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
ce42d9d1c2 lib/nvmf: remove spdk prefix from static funcs in ctrlr_bdev.c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I89db40149574345037600140ca1230c1a42a03cc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2281
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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-05-12 21:49:03 +00:00
Seth Howell
9cb21ad60a lib/nvmf: remove spdk prefix from functions in nvmf_internal.h
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I9b8d15b52754477c5d120f8d96e0e2c329a32e0c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2292
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
5802b8e564 lib/nvmf: add a map file and update major so version.
There were 50 functions and 5 variables that were previously
exported in the library which are actually private symbols.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I08c47255cdefff5948c914b0782e872c28c27130
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2291
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-12 21:49:03 +00:00
Seth Howell
2bba0bd331 lib/nvme: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I022caf94a5bf78c37cf169c5cbd8911b47a05f00
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2247
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-05-12 21:49:03 +00:00
Changpeng Liu
ba1d0d7220 nvmf: set sgroup for spdk_nvmf_request_exec_fabrics() API
When using spdk_nvmf_request_exec_fabrics() to connect one IO
queue, the qpair->ctrlr is null before this function, and the
qpair->ctrlr will be set to associate controller after the
connect, so it will check the sgroup->io_outstanding count,
then we can hit the assertion.

Change-Id: I747cbfd0541cd12286dab549cd02245aac54f2db
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2062
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-12 08:12:29 +00:00
Changpeng Liu
7a9c2d2aef nvmf: add one debug log message when diable CC
Change-Id: Ia02b4369a60e3691568747ea6c6e9f24fb657321
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2061
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-12 08:12:29 +00:00
Jin Yu
132fffd4fd env: add the device ID of virtio device
From the QEMU doc:
1af4:1000  network device (legacy)
1af4:1001  block device (legacy)
1af4:1002  balloon device (legacy)
1af4:1003  console device (legacy)
1af4:1004  SCSI host bus adapter device (legacy)
1af4:1005  entropy generator device (legacy)
1af4:1009  9p filesystem device (legacy)

1af4:1041  network device (modern)
1af4:1042  block device (modern)
1af4:1043  console device (modern)
1af4:1044  entropy generator device (modern)
1af4:1045  balloon device (modern)
1af4:1048  SCSI host bus adapter device (modern)
1af4:1049  9p filesystem device (modern)
1af4:1050  virtio gpu device (modern)
1af4:1052  virtio input device (modern)

Change-Id: I75b04c331aebae9f20fecbca85d64415114ae5ff
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2369
Community-CI: Mellanox Build Bot
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>
2020-05-12 08:12:22 +00:00
Tomasz Zawadzki
d306693130 Revert "nvme/opal: deprecate spdk_opal_supported()"
This reverts commit 669985172f.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Icadca660c1d245f53d3ce1812a811732df0bff0e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2376
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-11 16:58:03 +00:00
Changpeng Liu
669985172f 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: I2a8b70aa92828cf60d168dcf2985759e0eb9a6e3
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2217
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-11 12:35:43 +00:00
Vitaliy Mysak
419cd3691e lib/log: add timestamps for spdk_log messages
rocksdb test file changed because
it relied on logs format by doing grep/cut,
so failed after format was changed by this patch.

Change-Id: I81b8747560d7c803faec1650a3ead042bee2508b
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2023
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-11 12:34:28 +00:00
Changpeng Liu
ac257bd4d2 blobfs: remove g_caches_lock finally
All the file add/delete/reclaim actions are in the cache thread now,
so the cache lock isn't necessary now.

Change-Id: Ibccdede78444e39346659f9342bdf104594bc07f
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1796
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-11 12:34:16 +00:00
Changpeng Liu
87d5d832e7 blobfs: refactor cache_free_buffers()
cache_free_buffers() was only used in the file deletion and unload, and
the file is also freed after that, so here we combine the cache free and
file free together and do the cache free in the cache thread.

Change-Id: I57e9a27c9a6467bcf6c85cd277db3b57e06c98e5
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1795
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-11 12:34:16 +00:00
Changpeng Liu
76d23f6f4c blobfs: remove the file without cache buffer from cache list
Change-Id: Ibf55e6e2966052bb6f5ce68b2eaa2cafa0b6e459
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1794
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-11 12:34:16 +00:00
Changpeng Liu
c41c4c2bab blobfs: add the file with new cache buffer to cache list in cache thread
Also poll thread in the UT to cover the thread context switch.

Change-Id: I3dc765b66aa707c36eb3913b3e0d2c1c3986e282
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1793
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-11 12:34:16 +00:00
Changpeng Liu
1fd159bed1 blobfs: remove the unnecessary file lock when freeing request
The channel lock is in free_fs_request().

Change-Id: Ibdb7173a24246463ff4bcff74c58c1f3c7ad7c77
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1792
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-11 12:34:16 +00:00
Seth Howell
681b515d9e lib/notify: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If690a7f07503fa082c5822d70ec3cecdbce20baa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2243
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>
2020-05-11 12:29:07 +00:00
Seth Howell
d70ed76454 lib/net: remove spdk prefix from internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I3463a089a0bb6677793215963372ce9c233d4626
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2242
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: Jim Harris <james.r.harris@intel.com>
2020-05-11 12:29:07 +00:00
Seth Howell
d7620b3579 lib/net: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I26ff6653b73d931c7b49b47fac506c01990ca42d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2240
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-05-11 12:29:07 +00:00
Seth Howell
17b53caab4 lib/nbd: remove spdk prefix from internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If4fc856c33d6c0f50b60363664846b8f4e79ffb1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2239
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-11 12:29:07 +00:00
Seth Howell
c096b64f53 lib/nbd: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I9514b06e4c214f68f7dfe13fd70e925628ebec1e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2238
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: Jim Harris <james.r.harris@intel.com>
2020-05-11 12:29:07 +00:00
Seth Howell
bbb6368e42 lib/lvol: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iec2a50ca4af8fe24f011d4cc6e04606115ba45a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2237
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: Jim Harris <james.r.harris@intel.com>
2020-05-11 12:29:07 +00:00
Seth Howell
7b8a717ff8 lib/log_rpc: add a map file.
This library doesn't actually export any symbols.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I84a763e73d1b2a189e72361a962852d4a8d8387c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2236
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: Jim Harris <james.r.harris@intel.com>
2020-05-11 12:29:07 +00:00
Seth Howell
ab0b76c40e lib/log: add map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib376a31d307a6bb4a3b4fde52b8ec14bc748a539
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2216
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: Jim Harris <james.r.harris@intel.com>
2020-05-11 12:29:07 +00:00
Seth Howell
ed0e32a17a lib/logrpc: create a new log flag.
The log_rpc library should have its own flag.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I7cfe4c9136089e83bdf2730c727a6602ffbaf83e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2215
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: Jim Harris <james.r.harris@intel.com>
2020-05-11 12:29:07 +00:00
Seth Howell
134590a206 lib/jsonrpc: remove spdk_ prefix from internal functions.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ieeb58943536caf46db77ce22509eccb477fa914a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2214
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-11 12:29:07 +00:00
Seth Howell
1f4f4cc75a lib/jsonrpc: add a map file.
There are several functions in the internal header that
are only used in the library that have kept the spdk prefix.

Add those to the suppression file since nobody in practice will
be using them.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Iae1666c6f0bb853e62b89858037a5cded38c9b66
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2213
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-11 12:29:07 +00:00
Seth Howell
1bcbf5d779 lib/json: add a map file.
While we are here, change SPDK_LOG_JSON_UTIL to SPDK_LOG_JSON
It fits better with the naming convention.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I12bc8a44acf3effc5effcbc40ef1ab9af6e52c6c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2211
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-11 12:29:07 +00:00
Seth Howell
12a3278a2e lib/ioat: add a map file.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If7c9db16ab0408280a5ef789556f751f1e0cc8c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2210
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: Jim Harris <james.r.harris@intel.com>
2020-05-11 12:29:07 +00:00
Seth Howell
f6dcd815f4 lib/idxd: add a map file.
While we are here, give the library an so suffix
which was missed when the library was initially
created.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I68929127bf672c0f2f7153f9716882d03151480e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2209
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-05-11 12:29:07 +00:00
Karol Latecki
b5eeb44cb4 test/make: Update ref build path for ABI tests
Use 20.04 reference build instead of 20.01.

Also updatethe NVMe-oF Makefile to reflect a change to the
ABI since 20.04 was released. This has to be done in the same
patch to keep the build from failing.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3201f698ecb441021964debda760866dbbc01a64
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2171
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-05-08 11:31:29 +00:00
WANGHAILIANG
023e3624e7 lib/nvme: remove lkey and rkey's warnings in nvme_rdma.c
One of these warnings, such as:
/home/wanghailiang/spdk20200428/lib/nvme/nvme_rdma.c: In function ‘nvme_rdma_qpair_submit_request’:
/home/wanghailiang/spdk20200428/lib/nvme/nvme_rdma.c:1512:29: warning: ‘lkey’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  rdma_req->send_sgl[1].lkey = lkey;
                             ^
/home/wanghailiang/spdk20200428/lib/nvme/nvme_rdma.c:1480:11: note: ‘lkey’ was declared here
  uint32_t lkey;
           ^

Change-Id: I67b25cb62c7a0d5b298ebfe7d2673b73261040ef
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2197
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-05-07 10:44:02 +00:00
Vitaliy Mysak
6b40857206 lib: replace fprintf(stderr,) by SPDK_ERRLOG
SPDK_ERRLOG() uses spdk_log() procedure which is
customizable and redirectable, so it is preffered over fprintf.
It also prints source location which is useful.

Change-Id: I27574be4a774169f356ebd8dcdfd2a33a057f051
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1943
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-07 10:42:40 +00:00
Vitaliy Mysak
caa9d4c87a lib/log: allow omiting filename/lineno information
In spdk_log() accept filename = NULL.
If filename is NULL then source information as well
as log level is not displayed.

This change allows to replace all usages of
printf() and fprintf(stderr,) by
SPDK_PRINTF() and SPDK_ERRLOG() which use spdk_log().

Using spdk_log() instead of printf() is always prefered
since SPDK can be used inside of another application
where SPDK logs could be redirected.

SPDK uses printf()
places where location info is not needed
we cannot replace it by SPDK_NOTICELOG().

This change is in the scope earlier planned task:
https://trello.com/c/lZzBjrw3/10-remove-use-of-printf-fprintf-and-perror-for-logging-in-library-code

Change-Id: I55c24da4a2092bd118fa2c121092d253cedb1cf8
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1942
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-07 10:42:40 +00:00
paul luse
d7d9dc126b lib/idxd: factor out common submission code into a prep routine
Prior to adding more operations, make this a bit more efficient.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I02b864f998800c25076233183840bba8bff92196
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2069
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-05-07 10:41:44 +00:00
paul luse
fad052b0cb accel: add write_config json for accel modules
Add both the plumbing in the engine to call module entry
points if they exist as well as the json write config
for idxd (the only module with config info at this time).

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I91376d3fc60227cd79fae17b164722619eafb9e5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2052
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-07 10:41:44 +00:00
paul luse
3044bd27d0 lib/accel: remove RPC for setting the module
This was added before the usage of having a SW engine and 2 HW
engines was fully thought out. The current rules are:

* if no HW engine specific enable RPC is sent, use SW
* if a HW engine specific enable RPC is sent, use it
* If a 2nd HW engine specific enable RPC is sent, ignore

In this scheme there's no need for an RPC that lets the user
choose which engine to use because they already do so when
they enable an engine.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I006ffb3b417f1e93bb061b29535d157ba66f03b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2033
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: Ben Walker <benjamin.walker@intel.com>
2020-05-07 10:41:44 +00:00
Evgeniy Kochetov
4b4b3cca9f nvme/ctrlr: Allow targets not supporting Keep Alive Timer feature ID
NVMe spec defines "Keep Alive Timer" feature ID as optional and there
are targets that do not support this. SPDK fails to connect to such
targets.

This patch allows Get Feature "Keep Alive" target to fail with
INVALID_FIELD status. In this case we just continue with keep alive
timer value stored in controller opts structure. This value is already
communicated to target in CONNECT command.

Fixes #1328

Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I52e7ea3cb66073ce6cc168a169989bd179041618
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1625
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-05-07 10:41:31 +00:00