Commit Graph

9662 Commits

Author SHA1 Message Date
Seth Howell
a988124db9 make: override scan-build for unit tests.
The unit test mock macro function doesn't mesh well with the scan-build
static analysis tool. So we need to reset cc to the user provided value
or default before running the unit tests.

Change-Id: Ib636f6e396b09f9bf1cb8f930e6befa56ce99848
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466816
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-11 16:30:38 +00:00
paul luse
2f2ffd98b0 test: remove test plan .md files
A sub-team over a year ago agreed that there was not enough value
in checking test plans in to the repo as they require maintenance
and their primary purpose is not to document how the module is tested
but to facilitate discussion during test development. It was agreed
that we would use the review system to iterate on test plans but once
the actual tests were developed that the plan would not get checked in.

This patch just removes those that were likely in the repo before that
discussion.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I75dcdd8b4754b7ecb4a21079b251c707557a3280
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467394
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-10 22:57:04 +00:00
Pawel Kaminski
e33664706e rpc: Rename get_initiator_groups to iscsi_get_initiator_groups
Change-Id: I02f63db10ec49f82b1466adc006a844f4437c4b5
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467184
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-10 22:56:58 +00:00
Shuhei Matsumoto
74bf9193d0 bdevperf: Move submit_task into the end of prep_task()
This is a preparation to use zcopy APIs for write I/O.
When we use zcopy APIs for write I/O, submit_task() will be called
in the callback to spdk_bdev_zcopy_start().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I15bfce5b39ddd65459274fad7628f2c8fbb22327
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467899
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>
2019-09-10 22:31:24 +00:00
Shuhei Matsumoto
021ac781a4 bdevperf: Rename zcopy_complete() by zcopy_populate_complete().
This is a preparation to use zcopy APIs for write I/O.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I685d0e1e5860c7ec72d4680c48ee7c0b5e9071bd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467898
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>
2019-09-10 22:31:24 +00:00
Shuhei Matsumoto
6fed60cb32 bdevperf: Factor out queueing I/O waiting for buffer to a helper function
This is a preparation to use zcopy APIs for write I/O.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7c544fc08db029e1b5ff32458e53dcbb014a5722
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467897
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-10 22:31:24 +00:00
Shuhei Matsumoto
835c593c70 bdevperf: Fix unclear return code check in bdevperf_complete()
Two return code checks are added to bdevperf_complete().
Checking if return code is not false will be enough.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic097e37c2d74aa3860bb06931f320c9f18c45640
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467896
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-10 22:31:24 +00:00
Michal Ben Haim
62615117f7 SPDK: changing TREQ value from 'not specified' to 'not required'.
Signed-off-by: Michal Ben Haim <michal.benhaim@kaminario.com>
Change-Id: Ia7bda5b18db24df97172d4500a499c4635d592d5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467499
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: John Kariuki <John.K.Kariuki@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-10 17:51:26 +00:00
Benjamin Saunders
173892cbf8 env_dpdk: fix compatibility with DPDK 17.11
Support for these options was not introduced until DPDK commit
7f0bb634a1406b132ff15c9cd56a0a9f33e5f11d

Signed-off-by: Benjamin Saunders <bsaunders@google.com>
Change-Id: Id6db73dd48ac01aa1b05eca4c920c5753e8cc6f0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467703
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-10 17:50:03 +00:00
Ben Walker
59e34aa865 nvmf/tcp: Don't set socket recvbuf size anymore
The default behavior is to set it to 2MB, so this isn't
required anymore.

Change-Id: I62d7605cd4d5bc41347128f32f9a1aa373a15744
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466993
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-09-10 17:48:49 +00:00
Ben Walker
9c36043576 iscsi: No longer set sock recvbuf size
The socket now automatically sets the recvbuf size
to 2MB, so this isn't necessary.

Change-Id: Id2196f4038f6835118047233f18c0395fa3f2670
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466992
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-10 17:48:49 +00:00
Ben Walker
52ccf4b761 sock/posix: Increase SO_RECVBUF size by default
Everywhere we use this, we increase the size to 2MB.
Just make that the default behavior.

Change-Id: Ie174419a09df1792a0c7311eddd0c2dcefa267b5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466991
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-10 17:48:49 +00:00
Pawel Kaminski
4bb8a88c8e rpc: Rename delete_portal_group to iscsi_delete_portal_group
Change-Id: I7a4bf83b0862b91afd2052a9e8eeb9a59434c7f5
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467842
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-10 17:44:16 +00:00
Pawel Kaminski
0f4b349089 rpc: Rename add_portal_group to iscsi_create_portal_group
Change-Id: I71ba12d81404e50201375f8f347e0ab30b0dec8a
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467836
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-10 17:44:16 +00:00
Pawel Kaminski
1a6c41a938 rpc: Rename get_portal_groups to iscsi_get_portal_groups
Change-Id: Idd9b6207674e3e3812f53c140e5dc705a25fb2cc
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467834
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-10 17:44:16 +00:00
Pawel Kaminski
faa4de48c5 rpc: Shellcheck - apply rule SC2219
Instead of 'let expr', prefer (( expr )) .

Change-Id: I1d86f87bd56036aabd7f7dc377c59ae42a0dc040
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467285
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-10 00:46:21 +00:00
Pawel Kaminski
8a74cd9a59 test: Shellcheck - apply rule SC2020
Invalid flags are not handled. Add a *) case.

Change-Id: Ib3e0d978ed9a131a5ab23a2bc5013bbe0698d1be
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467268
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-10 00:46:21 +00:00
Pawel Kaminski
0fbba82dd6 rpc: Rename delete_initiators_from_initiator_group to iscsi_initiator_group_remove_initiators
Change-Id: Id1bf2b21bb91982f3e8d6466b8493b4608f99299
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467328
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-09 22:16:53 +00:00
Pawel Kaminski
a7d07920e8 rpc: Rename add_initiators_to_initiator_group to iscsi_initiator_group_add_initiators
Change-Id: I776f52a5e15c1cb7949fffc76196634b37b5274b
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467226
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@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-09 22:16:53 +00:00
Seth Howell
28099e0ed9 make: add dependencies for the rte_vhost build.
The dependencies between vhost and rte_vhost were not added during
earlier changes. This change moves the rte_vhost directory up to the
level of the other libraries and adds the proper dependencies for when
it is linked.

Change-Id: I089de1cd945062b64975a0011887700c0e38bb0f
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467700
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-09 22:15:24 +00:00
Seth Howell
18c5ce83b9 test/make: add ignored libs to check_so_deps.sh
There is at least one example of an SPDK shared library dependency that
is only linked against on certain conditions, so add a framework for
dealing with those conditions now.

Change-Id: I63ad767994c5f56f2908f70016e700f5bb74a5f4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467699
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-09-09 22:15:24 +00:00
paul luse
2d4afa7ed3 ut/raid: code cleanup
Removing queuing tests as they are really only testing mocked functions,
minimal coverage is gained here and the queueing logic from a UT
perspective is part of bdev, not a bdev module.

This is a prelude to adding RAID 1E which will start with abstracting the
RAID r/w functions and it may not look like it now, but getting rid of
this UT code will make the move to function pointers for r/w based on
RAID level a bit smoother.

Change-Id: I01eef2aa99b2bdd4308ddef9bad9dd1121ef7470
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467537
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-09 22:05:49 +00:00
Maciej Szwed
039b462d5a lvol: Remove blobstore on super blob creation/open error
Fixes github issue #929

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467327
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-09 21:56:47 +00:00
Ben Walker
592cbdfa15 test/nvmf: Add a test for multiple discovery log pages
If there are enough subsystems, the discovery log page spills
over to a second page. Add a test to confirm that is working.

Change-Id: I1df57b0b9a543736fe4c48f2cfe5628cb963a631
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466820
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-09-09 21:52:07 +00:00
Ben Walker
647afdec44 Revert "nvme: small code cleanup for nvme_transport_ctrlr_scan"
This reverts commit 6129e78d26.

When the initiator sends the discovery log page, if the log page
exceeds the size of its data buffer, it will break it up into
multiple log page commands with appropriate offsets. However,
supporting offsets in log pages is an optional feature in NVMe
and reported by the EDLP bit in the identify data.

This commit changed the discovery process to no longer send an
identify command prior to doing the discovery log page command,
so the values in the identify data are always 0. If the discovery
log page exceeds the size of the data buffer (4k), it will then
fail to send the second log page with an offset because it
believes the controller does not support the feature.

Revert this change to fix it. An identify should always be sent
as part of the discovery process. A test case is included in a
follow up patch the demonstrates the bug.

Reported-by: Zahra Khatami <zahra.k.khatami@oracle.com>
Reported-by: Akshay Shah <akshay.shah@oracle.com>

Change-Id: Iefd512a7521e0fea90541b3eb547671cfa816ea6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466819
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: Changpeng Liu <changpeng.liu@intel.com>
2019-09-09 21:52:07 +00:00
Seth Howell
43a713f9f0 configure: make BUILD_CMD an array variable.
Most modern shells know how to interpret the string version of commands
when parsing them from a variable, but some shells like the one centos 7
uses misinterpret the command causing the dpdk version check in
configure to fail erroneously. This can be observed in the CentOS logs
of recent vs dpdk master jobs on the CI.

This method looks to be the more conservative way of doing the same
thing and fixes the issue on my dev machine.

Change-Id: Ib51c537ec88c781eb62519e08e4252ae05e554ef
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467714
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-09 21:38:43 +00:00
Pawel Kaminski
758b2f9439 rpc: Rename construct_target_node to iscsi_create_target_node
Change-Id: I638a38885a9ae93c5687d49f3bb4e23dfebdebf2
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467488
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-09 21:38:05 +00:00
Pawel Kaminski
7d114278bc rpc: Rename get_target_nodes to iscsi_get_target_nodes
Change-Id: I0ca8a1cfbcced53932e292abf3a088dd7f5e8928
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467332
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-09 21:38:05 +00:00
Ben Walker
a34248d38f Revert "scsi: Fix seg.fault due to the gap between IO channel put and LUN removal"
This reverts commit 8f33ac020d.

Causing build pool failures

Change-Id: Ib0dd2be4c327d76f67a00aec8a7c26f25bbaeb10
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467873
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Mike Carlin <mikefcarlin@protonmail.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-09 21:11:22 +00:00
Maciej Szwed
1771381d54 lvol: Use error log instead of info log on error
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I8824b118575c0033bb8a31464112d77dce088067

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467324
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-09 08:40:58 +00:00
Darek Stojaczyk
f94be73dc9 vhost: explicitly set VRING_USED_F_NO_NOTIFY
We used to call a dpdk function to do it, but using
a function for something that simple doesn't make sense.
The function also does its internal queue lookup by vid
and queue number, which could potentially fail, return an
error and technically require SPDK to handle it.

The function makes some sense for vhost-net applications
which don't touch vrings directly but rely on rte_vhost's
API for enqueueing/dequeuing mbufs. SPDK touches DPDK's
rings directly for the entire I/O handling, so it might
just as well for initialization.

This serves as cleanup.

Change-Id: Ifb44fa22ea5fc3633aa85f075aa1a5cd02f5423c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466745
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-09 05:41:56 +00:00
Richael Zhuang
556e4d7054 test/unit: add test for base64 with Arm NEON intrinsics
For in each loop, encoding with Arm NEON deals with 48 bytes and decoding
deals with 64 bytes:
encode: add test with src_len=48 and more than 48;
decode: add test with src_len=64 and more than 64.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: Ie156d147165a2511eed03d212eb78300e0edc84c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465734
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-09 05:40:57 +00:00
Maciej Szwed
553bf8e430 tests: Fix notification tests (json_config)
Notification test generates config for all NVMes
in the system, but expects only one. We should
generate configuration for only one NVMe.

Fixes github issue #945

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467374
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-09 05:40:40 +00:00
Pawel Kaminski
06a1b4199c scripts/rpc: Rename rpc delete_malloc_bdev to bdev_malloc_delete
Change-Id: I9841d79bfe1090bb25893610659300531b6b43a4
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465637
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-09 05:02:47 +00:00
Shuhei Matsumoto
8f33ac020d scsi: Fix seg.fault due to the gap between IO channel put and LUN removal
The reported github issue #938 has been reported intermettently.
The issue is that the bdev descriptor passed to spdk_bdev_reset()
is not valid and causes seg. fault.

Current implementation of LUN hot plug is that putting IO channel
and removing LUN are done by different poller. Hence if any task
management command is issued between the gap, the reported issue
is likely to occur.

The flag removing is set at the start of LUN hot plug and so
spdk_scsi_dev_get_lun() can return NULL even before completing
removal by referring the flag removing.

  Fixes #938.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1a51d90cc700134e8c0ec399a3ce62620c84ef73
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467212
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-09 04:46:08 +00:00
Karol Latecki
429258ed26 test/nvme: add kernel io_uring mode for perf scripts
Enable running tests with io_uring ioengine.

Change-Id: I679343c1774feb3f78f9b6a7ec84735ecfa395a7
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462272
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: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2019-09-09 04:43:56 +00:00
Maciej Wawryk
54ad489a53 test/common: fix use braces
Fix SC1087: Use braces when expanding arrays,
e.g. ${array[idx]} (or ${var}[.. to quiet).

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I0ffa91da9847ee0805b664cba573346ab5b83f3a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466898
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-09 04:18:48 +00:00
Ziye Yang
24eb7a84b0 nvme/tcp: fix the iov vector count.
Since we use pdu->data_iovcnt to
build the iov in nvme_tcp_build_iovs, so
send out pdu has the maximal iov number
equals to: 2 + pdu->data_iovcnt,
so we change the comparison.

This makes sure that we can handle all the data
owned by one pdu.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I2b9258cc5716d706c0fa38af609726c439708768
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467207
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: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-09-09 02:08:31 +00:00
Changpeng Liu
2a65e28e56 examples/nvme/identify: display Arbitration Burst for round robin arbitration
Arbitration Burst is valid for both round robin and weighted round robin
arbitration.

Change-Id: I0046194ef510bf255ac0527bc6b1d2dc0648b7cb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466686
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-09 01:55:18 +00:00
Changpeng Liu
6ad44e8be6 nvme: add weighted round robin supported flags
Change-Id: I4b303e7096dfdd29ef5d39f30223d03c32d20ae1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466679
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-09 01:55:18 +00:00
Changpeng Liu
2f9d2b811c nvme: move nvme_ctrlr_construct() before the PCI initialization
This will be consistent with TCP and RDMA transport, and we will use
ctrlr->flags in nvme_ctrlr_init_cap() in next patch, the flags will
be cleared to 0 for now.

Change-Id: Ic360cd0c00d60c77452d19cdc1e7a32a5fc34df0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466678
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-09 01:55:18 +00:00
Darek Stojaczyk
6e77b0b68d vhost: make poll group refcount per-session
Change the way we increase poll group reference counts
for round-robin scheduling.

So far we used to increase them whenever someone called
vhost_get_poll_group() and this worked fine for Vhost-Block
which picks a new poll group for each session. Vhost-SCSI,
however, picks only one poll group for all sessions on
a vhost device. This means that some threads will have
multiple Vhost-SCSI pollers but will still appear to the
vhost scheduler as if they had only one.

To fix it, increase poll group refcnt only when sessions
are really being started - in vhost_session_start_done().

Change-Id: I60f0d2101239e5a91138a5afd30c51dc1ccf7c2e
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466733
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-09-09 01:39:41 +00:00
Darek Stojaczyk
1eba43239e vhost: add a separate cpl cb to foreach_session()
Currently vhost_dev_foreach_session() accepts a single
callback function for both iterating through all active
sessions and for signaling the end of iteration (called
last time with vsession param == NULL). Now that the
final signal has completely different semantics and is
called on a specific thread, it makes sense to put it in
a separate function.

While here, remove the one-line description of
spdk_vhost_session_fn typepef. It wasn't helpful anyway.

Change-Id: I56b97180110874a813e666f964bb51c39a8ce6bb
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466732
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-09 01:39:41 +00:00
Darek Stojaczyk
880ddb7436 vhost: prepare to add a separate cpl cb to foreach_session()
Currently vhost_dev_foreach_session() accepts a single
callback function for both iterating through all active
sessions and for signaling the end of iteration (called
last time with vsession param == NULL). Now that the
final signal has completely different semantics and is
called on a specific thread, it makes sense to put in
a separate function.

In this patch we prepare separate functions for the final
call, but still call them in the original callback. In
a separate patch we'll start passing both functions
directly to foreach_session().

Change-Id: I9f4338d9696f7bd15ca2d6655c6a3851569aff75
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466731
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-09-09 01:39:41 +00:00
Darek Stojaczyk
5d6361b5dd vhost/scsi: remove return code from remove_scsi_tgt()
The function could never fail, so make it return void
rather than int. This serves as cleanup.

Change-Id: I16a857ecee8d162f546fd097acaa2e66d51ebffa
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466730
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-09-09 01:39:41 +00:00
Darek Stojaczyk
d4f7bf9cdd vhost: remove redundant vdev == NULL checks in foreach_session()
Historically the callbacks from vhost_dev_foreach_session()
could be called with vdev argument == NULL, which would
mean that device was removed after enqueuing the event
and before consuming it. Now we keep track of pending
asynchronous operations on each vhost device and don't
allow removing it if there are any unconsumed events,
so the the vdev == NULL checks are redundant. Remove them.

Change-Id: I7aa3785080d20ed06e008c081d3f37a949228f5a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466729
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-09-09 01:39:41 +00:00
Darek Stojaczyk
0cf5d5160b vhost: remove spdk_ prefix from private functions
Remove them all at once. spdk_ prefix should be
only applied to publicly exported functions.

Change-Id: Ib6d2bd0954ec5cb7c8cf253d79b9d3cd8aa0eeef
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466728
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-09-09 01:39:41 +00:00
Jim Harris
89bdba564a nvme/identify: clarify total and active namespaces
As SSDs with namespace management become more prevalant,
improve the identify utility to clarify things like the
total number of namespaces, and that data is printed out
for active namespaces only.

While here, change an active namespace check to an
assert.  The print_namespace() function is only
called for active namespaces, so the check and print
was a bit confusing since it is never seen with SSDs
with inactive namespaces.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466818
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-09 01:30:51 +00:00
Shuhei Matsumoto
9796768132 nvmf: Move pending_data_buf_queue to common struct spdk_nvmf_transport_poll_group
This unifies buffer management among transports further and is a
preparation to make buffer allocation asynchronous.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8c588eeac4081f50fe32605feb7352f72c628d95
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466847
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-09 00:42:22 +00:00
Shuhei Matsumoto
cb5c661274 nvmf/fc: Move pending_data_buf_queue from fc_conn to fc_poll_group
I/O buffer cache is per transport_poll_group now. Hence moving
pending_data_buf_queue from struct spdk_nvmf_fc_conn to struct
spdk_nvmf_fc_poll_group is reasonable and do it in this patch.

This change is based on RDMA and TCP transport.

Further unification among transports will be done in subsequent
patches.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic857046be8da238cb3ff9e89b83cdac5f6349bcf
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466844
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-09 00:42:22 +00:00