Commit Graph

10047 Commits

Author SHA1 Message Date
paul luse
a5d9d77821 module/raid: move a single function up
In prep for future RAID1E patch so that the completion function
can be shared by multiple RAID levels.

Change-Id: I169e2d64388fab701e9b467f8803aacd5d1250d2
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469743
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-30 20:35:03 +00:00
paul luse
75cb691c97 module/raid: replace hardcoded "0" with #define for RAID0
Small cleanup in prep for future RAID levels and to improve
readability.

Change-Id: I66ae64320593ee5b242ccdc50a0041a4ec8207fb
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469742
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-30 20:35:03 +00:00
Shuhei Matsumoto
7fc89387da nvmf/rdma: Factor out setup WR operation from nvmf_rdma_fill_buffers_with_md_interleave()
Factor out setup WR operation from nvmf_rdma_fillbuffers_with_md_interleave()
into a function nvmf_rdma_fill_wr_with_md_interleave().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I92689daa7dcc93aaa68ecf5706d4e1b75d7fabae
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469066
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-27 20:03:16 +00:00
Shuhei Matsumoto
8bbde3758a nvmf/rdma: Cleanup nvmf_rdma_fill_buffers_with_md_interleave()
This patch
- applies nvmf_rdma_get_lkey(),
- changes pointer to struct iovec from iovec to iov,
- changes pointer to ibv_sge from sg_list to sg_ele, and
- passes DIF context instead of decoded data block size and metadata size
- use cached pointer to nvmf_request to call
- change the ordering of operations to setup sg_ele slightly
for nvmf_rdma_fill_buffers_with_md_interleave().

Name changes are from the previous patch.

They are for consistency with nvmf_rdma_fill_buffers() and a
preparation for the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I942fb9d07db52b9ef9f43fdfa8235a9e864964c0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469201
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-27 20:03:16 +00:00
Shuhei Matsumoto
c2f60ea452 nvmf/rdma: Move nvmf_rdma_get_lkey() up in a file
This reduces the diff in the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I85dccdc1a1a5a51777934121f50a6af97feda5a5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469480
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-27 20:03:16 +00:00
Marcin Dziegielewski
8f80af4c2a test/ocf/management/multicore: change in test to prevent failure
Because now bdev_ocf_delete function can fail if examine of this
bdev is still in progress, so to prevent that situation and in
consequence test fail, this patch adds small sleep to enasue that
examine are done before call bdev_ocf_delete.

Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Change-Id: I7f7ac4921b539f20b0d22d68bd401b247cd9a813
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469407
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-27 15:27:55 +00:00
Marcin Dziegielewski
d1c9e2f779 lib/bdev/ocf: fix race between examine and delete in mulicore test
Fixes #962

Issue mentioned above was caused by race between examine on ocf bdev
(which is partially asynhronous) and bdev delete.

This patch adds new ocf bdev state "starting" it means that register
procedure was started, base on this state, we are not allowing to
destruct vbdev during registering path.

Deleting of vbdev will be still possible on started vbdev or when
register procedure are not started yet.

Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Change-Id: I12099dfba75a46f95299c118f748d39af27df86a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469406
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-27 15:27:55 +00:00
Shuhei Matsumoto
1aa8e4e5b2 lib/iscsi: Add iscsi_portal_group_set_auth for per portal group CHAP authentication
Add an new RPC iscsi_portal_group_set_auth. This RPC overwrites
the setting of CHAP authentication for discovery sessions by the
global parameters specific for the portal group.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I01578b2d01e3dbed599db10340d5053fb0a3738d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469369
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-27 15:24:14 +00:00
Shuhei Matsumoto
b72893a6f2 lib/iscsi: Portal group holds CHAP params and passes them to connections
This is another preparation to support per portal group CHAP authentication
for discovery session.

Add CHAP params into struct spdk_iscsi_portal_grp, and initialize them
by global parameters at spdk_iscsi_portal_grp_create().

Copy CHAP params from portal group to connection at spdk_iscsi_conn_construct().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1ecb812266ac3d090f8e6db21d1d6a090f1811d9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469368
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-27 15:24:14 +00:00
Shuhei Matsumoto
a398d87467 lib/iscsi: Separate CHAP params setup and authentication process
This is a preparation to support per portal group CHAP authentication
for discovery session.

Previously require_chap, disable_chap, and mutual_chap had been set
and used in iscsi_negotiate_param(), and chap_group had been set
and used in iscsi_get_authinfo().

If a connection is in a discovery session, the connection can get
all CHAP params at its creation, spdk_iscsi_conn_construct().

If a connection is in a normal session, the connection can get all
CHAP params in iscsi_op_login_negotiate_chap_param().

Each connection is in either discovery session or normal session.

So the following change is possible and is done in this patch.

spdk_iscsi_conn_construct() sets all CHAP params of the connection
by global parameters. Then iscsi_op_login_negotiate_chap_param()
overwrites them by the corresponding target's parameters.
iscsi_negotiate_chap_param() and iscsi_get_authinfo() just refer
the CHAP params.

Besides, iscsi_get_authinfo() changed to call just
spdk_iscsi_chap_get_authinfo() inside, and so inline
spdk_iscsi_chap_get_authinfo() into iscsi_auth_params() and then
remove iscsi_get_authinfo().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8028673cc6923e1b8bc20af55e0c3cc933972fc0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469218
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-27 15:24:14 +00:00
Ben Walker
a6e3a930bb test/compress: Use gen_nvme.sh to create NVMe device
This script additionally checks that the device is bound to
uio or vfio, so it won't let the test wipe your boot disk.

Change-Id: I0424424d63dec5c626223a04181508198f75bd5b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469622
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-27 14:57:20 +00:00
Ben Walker
ab854135ec test: waitforbdev now accepts alias names
Change-Id: I366657ce00e5f0e17c6e9a7510a7fc2314c2782a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469621
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-27 14:57:20 +00:00
Seth Howell
de1f019edf nvme/perf: remove unused variable.
Change-Id: I3a1d237b7a7a25511d476d7612221537bf283ddd
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469633
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>
2019-09-27 07:42:44 +00:00
yidong0635
46d6711825 test/nvme: Add test sanitize to unittest.
Add test_sanitize in nvme_ctrlr_cmd_ut.c, this will
increase code coverage rate.

Change-Id: I80dec6eed5e2114c91db1406d1aa6c6a5e287293
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469576
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-27 04:23:10 +00:00
Benjamin Saunders
6bcd3588d1 nvme: add support for write uncorrectable command
Change-Id: I9fb7a998f7c13ce53cba630a895e8e11cf5f4a1c
Signed-off-by: Benjamin Saunders <bsaunders@google.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467559
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-26 18:42:57 +00:00
Maciej Wawryk
6956b0ec1e test: Shellcheck - correct rule "backslash+linefeed is literal"
Correct shellcheck rule SC1004: This backslash+linefeed is literal.
Break outside single quotes if you just want to break the line.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I7b872fa3c66685c1e8e7989f7b3b74a9e4f35325
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468467
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-26 16:37:42 +00:00
Maciej Wawryk
bebda9fb40 test: Shellcheck - correct rule "using pgrep"
Correct shellcheck rule SC2009: Consider using
pgrep instead of grepping ps output.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: If00080ffb62a589c21b684e2f8f2945c77b38bdd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466911
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-26 16:37:42 +00:00
Maciej Wawryk
93ae0344c8 test: Shellcheck - include check "prevent whitespace problems"
Remove from shellcheck excluded SC2048: Use "$@" (with quotes)
to prevent whitespace problems.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ib9d4b538c442450c6743f749016be4811981cff4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466903
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-09-26 16:37:42 +00:00
Maciej Wawryk
fe9bc4eb47 test: Shellcheck - include check "word is outside of quotes"
Remove from shellcheck excluded SC2026: This word is outside
of quotes. Did you intend to 'nest '"'single quotes'"' instead'

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ic71c464de9dccebe9ead9c47b5cdb15d8fcc025b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466902
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-26 16:37:42 +00:00
Wojciech Malikowski
a9e6fadf3e lib/bdev: Added spdk_bdev_io_get_append_location()
spdk_bdev_io_get_append_location() will be
used during zone append command to retrieve
location of data write.

Change-Id: I1f46ae9d2f745aa53264c1a01da3f7cef4f38c72
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469164
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: Konrad Sztyber <konrad.sztyber@intel.com>
2019-09-26 16:17:34 +00:00
Seth Howell
8a2527836d log: remove old-style errlog entries.
SPDK_ERRLOG lists the function name, so remove old references that
assume it doesn't and reprint the function name.

Change-Id: I69da6ca0a25bf0eda07d8dad52bcfadf964ac715
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469487
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-26 16:15:11 +00:00
Evgeniy Kochetov
e0e4f4ead6 ut/nvmf/subsystem: Add unit tests for namespace event callback
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I5ea7baafb7fcf2bc5b915e01369a390ecbf8410d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468542
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-26 16:14:14 +00:00
Evgeniy Kochetov
657575210d nvmf/subsystem: Open block device with extended API
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I471cceefd58ad4c4c64c140fcc66dc25dde43254
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468541
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-26 16:14:14 +00:00
Pawel Kaminski
5017a67fdc test: Shellcheck - apply rule SC2191
The = here is literal. To assign by index, use ( [index]=value )
with no spaces. To keep as literal, quote it.

Change-Id: I14cada0e8c132286959aa47a1d37ede5e025d85f
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467863
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-26 16:13:18 +00:00
Shuhei Matsumoto
5dbe96a053 nvmf/rdma: Factor out getting lkey and checking length in fill_wr_sge() into get_lkey()
Factor out getting lkey and checking translation length in
nvmf_rdma_fill_wr_sge() into a function nvmf_rdma_get_lkey().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I495ba9ae4a48b4aa7dc35a0bd72708753846dfdc
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469349
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: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-26 16:12:28 +00:00
Shuhei Matsumoto
5e8858d7a3 nvmf/rdma: Simplify nvmf_rdma_fill_wr_sge() by using cached pointers
Cache pointers to iovec and ibv_sge at the head of the function
and use them throughout.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I493759bf3989ced4390d077280cd44c122847d08
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469348
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: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-26 16:12:28 +00:00
Shuhei Matsumoto
89a28bfd1b nvmf/rdma: Factor out WR SGE setup in fill_buffers() into fill_wr_sge()
Factor out setup WR operation from nvmf_rdma_fill_buffers() into a
function nvmf_rdma_fill_wr_sge().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I813f156b83b6e1773ea76d0d1ed8684b1e267691
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468945
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
2019-09-26 16:12:28 +00:00
Shuhei Matsumoto
7c7a0c0a68 nvmf: Pass not num_buffers but length to spdk_nvmf_request_get_buffers()
The subsequent patches unifies getting buffers, filling iovecs, and
filling WRs in a single API. This is a preparation.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I077c4ea8957dcb3c7e4f4181f18b04b343e9927d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468953
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
2019-09-26 16:12:28 +00:00
Shuhei Matsumoto
aa6964e585 nvmf/rdma: Call spdk_nvmf_request_get_buffers() not once but per WR
This is a preparation to unify getting buffers, filling iovecs,
and filling WRs in a single API in RDMA transport and then to unify
it among RDMA, TCP, and FC transport.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia69d4409c8cccaf8d7298706d61cd4e2d35e4406
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468944
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
2019-09-26 16:12:28 +00:00
Shuhei Matsumoto
22cd4fe2ce nvmf: Check buffer array overflow in spdk_nvmf_request_get_buffers()
This patch makes multi SGL case possible to call spdk_nvmf_request_get_buffers()
per WR.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I977ebb0c6b2a67218c9b6fc20dc26a93a6ec770b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468943
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
2019-09-26 16:12:28 +00:00
Shuhei Matsumoto
79945ef0ed nvmf: Hold number of allocated buffers in struct spdk_nvmf_request
This patch makes multi SGL case possible to call spdk_nvmf_request_get_buffers()
per WR.

This patch has an unrelated fix to clear req->iovcnt in
reset_nvmf_rdma_request() in UT. We can do the fix in a separate patch
but include it in this patch because it is very small.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If6e5af0505fb199c95ef5d0522b579242a7cef29
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468942
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-26 16:12:28 +00:00
Shuhei Matsumoto
410455e40b nvmf/rdma: Reorder allocation of WRs and buffers in multi SGL case
This patch matches the ordering of single SGL case and multi SGL
case for parsing SGL.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iea026b48e8957e140b71db7afaf8aca88634dc33
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468941
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-09-26 16:12:28 +00:00
Shuhei Matsumoto
5e298147b8 nvmf/rdma: Remove duplicated zeroing req->iovcnt
spdk_nvmf_request_get_buffers() doesn't access req->iovcnt and so
zeroing req->iovcnt before calling spdk_nvmf_request_get_buffers()
can be removed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8c18bd7e6eaa7c89361bec9293dc4ff4057098a0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469200
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-09-26 16:12:28 +00:00
Shuhei Matsumoto
f0c212614a nvmf/rdma: Fix req->length was not cleared when nvmf_rdma_fill_buffers() fails
In nvmf_rdma_requst_fill_iovs_multi_sgl(), length of descriptors
are accumulated into req->length. However, req->length was not cleared
when nvmf_rdma_fill_buffers() fails in the middle. This patch fixes it.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I80a55d90d09c8af46d570e017d342afd69f41996
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469199
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: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-09-26 16:12:28 +00:00
Shuhei Matsumoto
d409da0c84 nvmf/rdma: Fix wrong clear of WR SGL when rdma_fill_buffers() fails
wr->num_sge has to be used in spdk_nvmf_rdma_request_fill_iovs(),
and memset() can be used instead of clearing each variable.

Besides, holding cached pointer to the current WR simplifies the
code a little and so is done together in this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iebda158f85e3a0e3046686f76991217fa7297c24
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469198
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2019-09-26 16:12:28 +00:00
Jim Harris
2d224c0d60 nvmf: simplify spdk_nvmf_subsystem_remove_ns
With this change we only check the subsystem state once.
Previously it did it twice, and with a different order
(once PAUSED || INACTIVE, the other INACTIVE || PAUSED).

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469285
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-26 15:23:04 +00:00
Jim Harris
dc6c3e08fb examples/sock: make hello_sock leverage net subsystem
hello_sock was taking responsibility for initializing
the net framework by calling spdk_net_framework_init
directly.  But since this application is already
using the spdk app framework, it's much easier to
just link in the event_net and net libraries which
will activate the "net" subsystem automatically.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466953
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-26 15:22:21 +00:00
Jim Harris
e8ecfe1711 examples/sock: remove default conf filename from hello_sock
This is not used anywhere.  If someone has a reason to specify
something via a config file in the future, they can use the
standard spdk_app command line arguments to do so.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466952
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-26 15:22:21 +00:00
Seth Howell
a01c6178d7 test/nvmf: test the new nvmf RPCs.
The example application doesn't really make use of these RPCs for the
time being, so add a simple test to make sure they get exercised.

Change-Id: I8ae4c7b769428b76200f71c771ae98f85ede4640
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468523
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-26 15:21:44 +00:00
Seth Howell
3ed64fa9c2 nvmf: fix name comparisons for nvmf_tgt objs
The previous version of this function precluded one target name from
being a leading substring of another. i.e. if "nvmf_tgt_1" was already
used as a name "nvmf_tgt_11" could not be used subsequently.

Just an odd quirk that shouldn't be the case.

Change-Id: Iea59b6757512f01070e48074e35a11d942e399bb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468522
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-09-26 15:21:44 +00:00
Seth Howell
208e089a21 lib/nvmf: add the nvmf_get_targets rpc.
Also update the changelog for the previous few changes.

Change-Id: I79ac330b4992ccc3e41fd1643b09128c6de6c86d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468391
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-26 15:21:44 +00:00
Seth Howell
b7fce0a3d4 nvmf/rpc: remove the target rpcs from rpc.py
Since the in tree applications don't really support these RPCs, keep
them out of rpc.py. We can add them in after the applications have been
modified to support that functionality.

Change-Id: I7aae2c623b6da48374fe53f8b9471b08e5f0af7a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469324
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-26 15:21:44 +00:00
Pawel Kaminski
6b6dfea6c7 rpc: Rename get_spdk_version to spdk_get_version
Change-Id: I4695c79760d176907ee1424babdc506f75ac17cf
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468903
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-26 15:20:46 +00:00
Pawel Kaminski
3402bfbd7c rpc: Rename kill_instance to spdk_kill_instance
Change-Id: Iebd24cc1be4665f179975f6fc14e0d4c3849d506
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468901
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-26 15:20:46 +00:00
Maciej Wawryk
0772af4de9 RPC: rename get_nvmf_transports to nvmf_get_transports
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I088070d130f46113efe4f89baae2508060ef33b3
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469114
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-26 15:19:43 +00:00
Maciej Wawryk
93d6b7bef4 RPC: rename set_nvmf_target_config to nvmf_set_config
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Id928d48283224ea30760d2cbfcf5b2a3452b3add
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469113
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-26 15:19:43 +00:00
Maciej Wawryk
a1a8585c5c RPC: rename set_nvmf_target_max_subsystems to nvmf_set_max_subsystems
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I318070b843dddfaa79cf37f1a5d0356fee38e81c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469112
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-26 15:19:43 +00:00
Pawel Kaminski
16a47c39be test: Shellcheck - remove rule SC2195 from exception list.
This rule doesn't appear in scripts.

SC2195: This pattern will never match the case statement's word.
        Double check them.

Change-Id: Ie3cabd58639ca733b750fdbc3ae3d476f083b792
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469187
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-26 15:18:54 +00:00
Pawel Kaminski
9a7c72e819 test: Shellcheck - apply rule SC2192.
SC2192: This array element has no value.
        Remove spaces after = or use "" for empty string.

Change-Id: I5228df2ac292786a3a62aa06ffb6cd31b7d3b6c4
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467861
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-26 15:18:54 +00:00
Pawel Kaminski
cbce06fb92 test: Shellcheck - apply rule SC2199
Arrays implicitly concatenate in [[ ]].
Use a loop (or explicit * instead of @).

Change-Id: Ib3ac2c65207dfc30aad6117cc4996cdc105f5079
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467858
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-26 15:18:54 +00:00