Code refactoring to accommodate for coming hot-remove tests.
Change-Id: I41cfb04b467bf21a5a991712791ee6bfc87c241c
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/391957
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Add api and unit test functions for
change number of blocks for provided block device.
Change-Id: I55d67c99375cb88bdaa79ce1a36d4298223beddc
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Reviewed-on: https://review.gerrithub.io/390802
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia1ccf8091fb2dbbb97a7acecc230d9f6cb7c1002
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/391257
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
New tests are performed on guest vm where vhost scsi
controllers are presented as a virtual pci device.
Some changes in common.sh had to be made to allow to build
spdk on vm and to set queue number.
Change-Id: I8289d6aede6020e958c9e5aae893591d844cdbcf
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/394248
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
I missed the libelf-devel and flex in my initial version.
Change-Id: I892c4e15c3704f0ca51ff0fac4e375c456258e83
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/396475
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Fixes github issue #218.
This patch introduces spdk_cpuset object to store and manipulate
the set of individual CPUs. The main objective of this object is
to replace cpumask declared as uint64_t and extend the limitation
of supported CPUs (lcores) above 64 CPUs.
spdk_cpuset is always allocated dynamically and accessed by opaque
pointer, what makes it easier to extend in the future without
breaking API/ABI.
This patch also extends parsing function allowing to set cpumask
using a list of cpus e.g. "[0-4,10,12]" sets mask of 0,1,2,3,4,10,12
as well as hexadecimal string with and without "0x" prefix.
Change-Id: I475c3ba7fab629021a22e03176e57e400dd24a49
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/390794
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I25f62d221c251a2ce455bfca7f686bb5817aa7d6
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/394199
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Add vhost-scsi and vhost-blk fio test cases which used more cores
and controllers in nightly
Change-Id: I51b47f6272c1b29dff890384087014627238dc68
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/389072
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Added execute permissions and -p to a few mkdir locations to
make re-running after an unrelated failure a little cleaner.
Change-Id: I67592fc4dd91839979fdb8eeda38dcdbcd4b7700
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/395865
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Also move the test plan file to a more appropiate location.
Change-Id: I462058279d4d2dc03790657b82b3cfeb00c8a93a
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/394180
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
To cover fio_plugin as host with nvmf lvol backend.
Change-Id: I5c602d95421f1ab6d2dde660c1833c953c2e5c75
Signed-off-by: wenzhong wu <wenzhongx.wu@intel.com>
Reviewed-on: https://review.gerrithub.io/390381
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
PAGE_SIZE just happens to resolve to same value as SPDK_BS_PAGE_SIZE
on x86-64, but at least some ARM systems do not define PAGE_SIZE
in headers included by blob unit tests, which is only reason this
discrepency was not identified until now.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie4afbc35263d6c17eafa1abcbf3d342942c80ab0
Reviewed-on: https://review.gerrithub.io/396320
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
-perform rw tests on all devices
-perform unmap tests + rw tests to match number of jobs and queues
Change-Id: Ica59ea3667c1c3a639ec9cded0fd43ea9d83ef03
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/394074
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
With multiqueue all jobs run in parallel so
test execution time will not be extended
Change-Id: I6187ee0acf6958b137ba74dd34706538197ce966
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/394389
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This patch is used to test blobstore automatically
which based on examples/blob/cli/blobcli.
Change-Id: I0309cf01d1561f309574a37aeaff8bfbc395f65c
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/386186
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
iscsiadm installed by some Fedora releases, like Fedora 27,
loses DataDigest parameter unintelligibly.
Change-Id: I6664146c6e0cb8933188b29166bedd087f4d38e1
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/396076
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Fedora 27 ships with Clang 5 which throws an erroneous error in the
add_ns subsystem test. It believes that subsystem.ns is a null pointer.
In order to circumvent this error, I add an assert to bail out of the
test if the pointer really is null and then only execute the final
assert if the pointer is not null. This way our tests will still pass
Scan-build tests on Fedora27.
Change-Id: I54d3fae485d56033ba5eb23b0aa323480ae6a6e4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/396051
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Currently, there is no possibility to save read only blob to disk.
This patch modifies behaviour so that read only flags are applied after syncing blob.
This is analogy to resize, set xattr and remove xattr operations.
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Iffed601c78cb83231bb20e7ef05b73847dc3c95a
Reviewed-on: https://review.gerrithub.io/394243
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Add vhost-scsi and vhost-blk filesystem test cases with
lvol and nvme back-end in nightly test
Change-Id: Id2cccd9a45aaa995bef90415855835b93447f2e9
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/390923
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
spdk_vbdev_unregister() is part of internal bdev API,
yet bdev module that uses spdk_vbdev_register() directly
will not be removed correctly when using delete_bdev RPC.
spdk_vbdev_unregister() is now consolidated with
spdk_bdev_unregister().
This comes up when deleting lvol bdev, as it does not use
spdk_bdev_part_* functions.
base_bdev->vbdevs entry was not removed for bdev that lvs
is created on.
Additionally patch expands test to create lvol bdev,
after removing it using delete_bdev RPC.
With ASAN enabled this would report accessing
already freed memory previously.
Change-Id: I9547e83862e2daa50355d56a1c9f453aaa6cfdb8
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/395711
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
vhost I/O only need to be split on 2MB boundaries if
there is a break in the VM's memtable at that 2MB
boundary.
This should drastically reduce (if not eliminate)
the intermittent test pool failures seen recently.
virtio limits number of segments to 128, but this
2MB splitting could introduce additional segment
breaks which we do not allocate IOVs for. In almost
all cases, there are no memtable breaks except at
low 2MB, so most of the extra segment breaks we are
adding are unnecessary.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I12d85c289ad80c7bb65e3d2030a2405092b19deb
Reviewed-on: https://review.gerrithub.io/396058
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Some upcoming changes will effectively render this moot
anyways by adding an epoll/kqueue descriptor to poll
on in all cases (not just connections that have been
idle for 5ms).
The epoll/kqueue code was just ifdef'd out instead
of removed - some of this code will be useful
and reusable with minimal changes in the upcoming
patches.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0c354390537e6369cb3c32e78a59c300dec6d098
Reviewed-on: https://review.gerrithub.io/395553
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
This function was originally named spdk_iscsi_write_pdu()
in lib/iscsi/iscsi.c. Since this is an operation on a
connection, add "conn" to the name and move it to conn.c.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaad022907d43788108d5b2660306abcf5e94040d
Reviewed-on: https://review.gerrithub.io/395522
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Currently setting cpumask to portal is possible only through
iSCSI.conf. This patch makes possible for any user to set cpumask
through JSON-RPC too.
The following are done in this patch:
- To keep compatibility, cpumask parameter handled as optional.
- Python test code is added.
- Current python script for JSON-RPC does not work correctly for
IPv6 and the issue is fixed.
Change-Id: I42ef397ce95040a36db4430417a35e9e97527477
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/391728
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
The nvme.sh will report error If more than one NVMe devices in the system.
Update the nvme.sh to fix this issue.
Change-Id: I9685394ec53eb036f7580a383619bca559f95c60
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/394870
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Currently cpumask cannot be specified for each portal when it is
created by JSON-RPC and portal group creation is not unified
between iSCSI.conf and JSON-RPC.
This patch does the following:
- cpumask string is decoded in spdk_iscsi_portal_create() which
is common between iSCSI.conf and JSON-RPC.
- parsing configline of portal is difficult to understand and
hence it is refactored.
- UT code is added.
JSON-RPC will be added by the next patch.
Change-Id: I13b9989263fae5facff260de32a55ec99f5d5a06
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/392447
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This is to help facilitate the update of the fio_ubuntu binary to fio-3.3
Change-Id: I4c896dc60255f821a5cf66af818396f210304f07
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/395394
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
When there are two bdevs built on the same io_device,
it is possible that one bdev entirely saturates
underlying queue, not letting the second bdev issue
a single I/O. The second bdev will silently fail any
subsequent I/O and append it to the nomem_io list.
However, since we resend I/O only from I/O completion
callback and there's no outstanding I/O for that bdev
(io_outstanding==0), the I/O will never be resent.
It'll be stuck in nomem_io forever.
This patch makes nomem_io list to be shared between
bdevs built on the same device. It is now possible
that I/O completion callback from one bdev will retry
sending I/O from other bdev.
The shared bdev data is based on thread-local
bdev_mgmt_channel, so doesn't need any external
synchronization.
Change-Id: Ia5ac3a1627ce3de4087e43907c329aa7d07ed7c7
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/394658
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
See subsequent patches for details
Change-Id: I17dd842cb6df0b1a6ee3e2745a265cbef321336e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/395165
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Fix the nightly vhost readonly test case issue
in physical machine.
Change-Id: Ie0799f06268bcef4a230b162bc70266ce4aae8cd
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/395014
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
These broke due to a conflicting merge that wasn't
found until both were committed to master.
Fixes 3b3c6002c9.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia0fc045a1e5d46cc42e5b4ec985bf1ade4417d85
Reviewed-on: https://review.gerrithub.io/395173
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch makes possible to set and get Header Digest and Data
Digest of target.
Change-Id: I1d1b892f9dfb747c0f5ad8fc4fddef40929b4143
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/394482
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
When a target is created by iSCSI.conf, only valid CHAP params
are passed to spdk_iscsi_tgt_node_construct().
When a target is created by JSON-RPC, help information encourages
users to specify valid CHAP params but
spdk_iscsi_tgt_node_construct() does not check CHAP params and
users can create targets whose CHAP params are invalid.
Change-Id: I7e9057a982f21f04782481cda74208a139c1fdad
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/394481
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Add JSON-RPC to add an LUN to an existing target. The parameter
lun_id is optinal and if skipped, the lowest free LUN ID will be
assigned.
This JSON-RPC is tested in iscsi_tgt/rpc_config.
Change-Id: I010619f2d4ccec89c589bb0618466b4d15949ebb
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/385181
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Removing an LUN from an existing iSCSI target is possible by
removing the corresponding BDEV. However adding an LUN to an
existing iSCSI target is not possible yet.
Add a new function spdk_iscsi_tgt_node_add_lun() and related
functions first toward supporting this function.
JSON-RPC for this operation will be submitted an another patch.
Informing the newly added LUN to the initiator is not included
in this patch. Hence this operation is possible only for any
inactive target.
Change-Id: I3a28f4d75a17126e49c9d12ce64c3ad68f231840
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/385180
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iadb29a8ce8dcebfea68d4feeb5f3de1bb3124f16
Reviewed-on: https://review.gerrithub.io/392286
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib3470fbac49e92308ed14e20ccde6655354f2580
Reviewed-on: https://review.gerrithub.io/389577
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
bdev hotremove event is send directly to hotremove callback given
during spdk_scsi_dev_construct() call. So any bdev hotremove might be
promoted to whole SCSI device removal (like in vhost) wich will trigger
LUN removal. But after returning from hotremove callback LUN and device
might be still referenced (eg to register poller or by outstanding IO).
Even worse: spdk_scsi_dev object is not dynamicaly allocated but
returned from static array which mean there is no way to detect
use-after-free error on spdk_scsi_dev by any tool. This might lead to
using SCSI device that is freed or assigned to different device.
To fix this:
- always delete LUN using hotremove path
- defer spdk_scsi_dev delete/removal after all LUNS are really
deleted.
Change-Id: I65598bf42cd507f620095dff5d32509a0424d060
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393674
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This was causing failures in the test pool.
Test run shows there are still issues with this script
that need to be debugged.
Fixes e6e2fc5b07 (test/vhost: don't call vm_setup.sh helper script to setup VM)
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic8f63ceffe77e6ec9fc10ecb0c852b6070f96935
Reviewed-on: https://review.gerrithub.io/394592
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
iscsi_tgt tests with different header and data
digests configuration.
Change-Id: I6e444eacccebccd66c099ea349be4bdeb063ba67
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/393717
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
There is no need to keep a lun name anymore - we always
use the bdev name as the lun name so it is not providing any
additional value. This also keeps us from associating
the same bdev with different LUNs on different iSCSI target
nodes or vhost-scsi controllers.
Side effect of this change is:
1) Use "bdev_name" across the APIs to make it more clear
what these names refer to.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3d42fde22087352ce1d5dc80178bd8c5cac8cb7c
Reviewed-on: https://review.gerrithub.io/390843
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Splitting an iSCSI task into primary and sub tasks is complex
operation and a degradation was caused for it.
Hence adding test codes is required but there is no UT code for
it yet.
primary->bytes_completed is for read completion from bdev and
it is tested by this patch.
Additional test codes will follow:
- primary->bytes_completed is tested when read tasks do not
complete in order.
- primary->task.data_transferred is for write completion to
initiator through network.
- primary->task.data_transferred is tested by another patch
because primary->bytes_completed is used in iscsi/conn.c but
primary->task.data_transferred is used in iscsi/iscsi.c.
Change-Id: I94b47048111a3d3b249b84d5c54941b0a89ccd40
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/394143
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch provides logic for returning errors instead of
assert when size is larger than blobstore size.
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I16d12338e2b682c39bd33d507d57ea126501a0d7
Reviewed-on: https://review.gerrithub.io/392749
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
We define 'size' and 'offset' parameter as % of device so on nvme
devices the tests are run with big files and small on malloc so we
can remove the 4G test case
Change-Id: I4840e859732696dd981ab0ab11e5270c025ff248
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/391838
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
test virtio devices created from scsi controller with multiple targets
Change-Id: Ibef135c4dc6fdb324bec6b42c9e532add92e656a
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/391836
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Recovery code did not claim clusters taken by metadata.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: If6726eddd22f4e1a3f9814b2348243155fb0fdb9
Reviewed-on: https://review.gerrithub.io/394173
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
io_queue_size is 256(default) in stub.c, it probably be a limitation
for some performance testing.
Change-Id: Iaf4a15966e7b814323bd8bf134d8f657635aca8e
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/394168
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Removed task `pending` queue. All tasks were
temporarily put in this queue just to be moved
out of it yet within the same reactor cycle.
Change-Id: I32d402f7abd3cfa21c263f41149425abdc71992f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/393911
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The NVMe spec states that nqn names are to be encoded in utf-8. The
prefixes of all nqn's are already required to be ascii by virtue of
their structure so they are already valid utf-8, but the user specified
strings should be checked for valid utf-8 strings.
Change-Id: I20090d366e93e98af4932eaa120d4edb6e512206
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/394118
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Modifies spdk_env_init() and spdk_mem_map_init() such that
they return on failure instead of terminating with exit()
or abort().
Change-Id: I054c1d9b2e46516ff53d845328ab9547f54bdbc4
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/393987
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Instead of inserting a task into the TAILQ and then
immediately taking it back off, just pass the task
to bdevperf_submit_single instead.
This reduces overhead of bdevperf compared to nvme/perf.
nvme/perf does not use a TAILQ at all, and does something
similar by passing the just completed task so it can be
reused by its submit function.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I574b459a32ebe2e91ac1351de360de86cbc4a86d
Reviewed-on: https://review.gerrithub.io/393833
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
key file
When using '-x' option some loops produce huge amount of useless debug
logs. It would be good to have different log levels but for now let
silence those places.
Use 'readlink -e' while checking default ssh keyfile path. This ensure
to fail if keyfile is invalid link.
Change-Id: I1e24fe02a3e1a1646b710e5e3d8c2ee2c1abf2a4
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393799
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This only adds the option and metadata flags.
Actual functionality will be added in an upcoming commit
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I66015f48f34d4c7c64fce1831ebaed134098407c
Reviewed-on: https://review.gerrithub.io/390196
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch fixes issue when blobstore doesn't serialize flags
when there is also at least one extent or xattr.
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I85d5031dc45df510cebe1acf4694ab62bca2e720
Reviewed-on: https://review.gerrithub.io/393770
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Forwarding http/https might increase boot time in some distros (like
Ubuntu). Test don't use it so might be removed.
Change-Id: Ia9f07bbae03c37888bcf06fec480577ae79e78cd
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393176
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
vm_setup.sh is a proxy script for vm_setup function which should
be called directly.
Change-Id: If9cd70a9bf67a743144142ea75887dfbd539b38a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393160
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This fixes b21fad1a80 (nvmf/subsystem: spdk_nvmf_valid_nqn fits nvme spec).
This patch was not rebased before last revision and some of these functions
had changed.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0904d962409de280ffbc3c07108815811caf5e26
Reviewed-on: https://review.gerrithub.io/394110
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Added tighter regulations to the NVMe-oF nqn checking to conform with
the nvme 1.3 spec. including, adding checks for valid nqn's in the case
of a generic uuid based nqn and checking for reverse domain name and
colon prefixed strings in a user specific nqn. Unit tests included.
Change-Id: I3ee4b269d0655ac9968699617e43e3297695c7ed
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/393265
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This requires exposing struct spdk_io_channel in the
public header - mark it as internal with Doxygen
comments to make it extra clear that applications
should not use the data structure directly.
This is a very hot function in the main I/O path,
so making this function inline has a significant
performance benefit. A bdevperf microbenchmark
using null bdevs shows a 11% improvement.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I70e30e184000705704bb004e8da1c7476a6aceeb
Reviewed-on: https://review.gerrithub.io/393824
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
vm_run.sh is a proxy script for vm_run function which should
be called directly.
Change-Id: Ia7ac242fe8c24b9ce76e6d5483bd52f84225b0bb
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393159
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
run_vhost.sh is a proxy script for spdk_vhost_run function which should
be called directly.
Change-Id: I6ca3e049e812bf05c9251e16c75f6ff90c3b0f0a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/393145
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: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
helpers
So we can better trace what failed.
notice - just echo to stdout
warning - just echo to stderr
error - echo to stderr and return false, so trap ERR can catch this
fail - like err but call 'exit 1' at the end so if no trap ERR is used
it will exit anyway.
Change-Id: I5c7b3682fd6c0d81c07c58a5ec965155c7593407
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/392218
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
nbd functionality now can be gotten by nbd rpc.
Change-Id: I85ebcb44d9ed263bcee19162dc060f3b268dddcd
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/391371
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Test nbd rpc methods:
start_nbd_disk
get_nbd_disk
stop_nbd_disk
Verify nbd data read and write by dd and cmp.
Change-Id: Ie32639d11727893ceac7adce0119b9c2085e74e1
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/391732
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Retrieve LUN data directly from struct spdk_scsi_lun rather than copying
them into struct spdk_scsi_task, and access the LUN via the task->lun
pointer.
Change-Id: Id8745f116bc559fb2f9e58811c2b9781c8cbdae8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393709
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
And perf as host with nvmf lvol_bdev backend and test differnet qd
and io_sizes in nightly(Proting from DTS).
Change-Id: I857fb66488d644ae0cc092dc1fff3370be09ba5e
Signed-off-by: wenzhong wu <wenzhongx.wu@intel.com>
Reviewed-on: https://review.gerrithub.io/387556
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: I21be11c2a8428fdc711c404bf3ce489979159ed5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393712
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
The SCSI layer no longer needs to know about the parent/subtask
relationship maintained by iSCSI.
Change-Id: Ia6f7c5367c5b656bd7521ed1abb6d0f713a0500b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393697
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
it appears that scsi name string designator
format in SPDK is not correct. The name strings
are not null terminated (which causees garbage
to appear in scsi_inq -p 0x83). Further, they
are not padded correctly.
SCSI port name and device name strings must be null
terminated. Further, the length must be a multiple
of 4 bytes, and must be padded with 0s.
See SPC-5 Section 7.7.6.11.
Change-Id: Id7c4ad27e5c3a17ad68e5e466142801c0d03b1f2
Signed-off-by: Karandeep Chahal <devilsgrotto@gmail.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/393027
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This patch remove need for additional buffer when translating error code
to string.
Change-Id: Iaa60088b5c450581d3cdddbb425119b17d55a44b
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/386114
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Also added vbdev_get_lvol_by_unique_id function.
Change-Id: I55a64df008c23c0fedb8a59ef67e2c356097e780
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Reviewed-on: https://review.gerrithub.io/392658
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Added aliases list to bdev struct.
Added 2 API calls to add and remove aliases.
Added test for adding and removing aliases.
Change-Id: I1815aec8c02cfa398b2d1de41577197315665fdc
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Reviewed-on: https://review.gerrithub.io/390200
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Copy fio config to guest VM with the same name instead of
renaming to /root/fio.job.
Use the same file name for creating log file in desired directory.
Remove not needed ls command in common/run_fio while at it.
Change-Id: I9e13d8cd6f7892a77d89afb99f7d57ef79f7b11f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/393469
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
There used to be a fixed 1 second of real time performance
display with the "-S" parameter. Make it as a configurable
parameter, the minimum interval is still 1 second while user
can configure a larger value.
Change-Id: I159d867f2b6019b095d0291c436f01b110ff69d8
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393306
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
When LUN with no io_channels is being hotremoved,
the hotremove poller was being started on the core
pointed by lun->lcore. However, this field is only
valid when there are io_channels open. For example,
when user tries to delete a bdev that's attached to
an unused vhost controller (no io_channels ever opened)
the scsi layer could start a hotremove poller on
lun->lcore == 0. If SPDK runs on a different cpuset -
not containing CPU0 - SPDK could even segfault.
Change-Id: I31a363352875d944f220b0296d5cfe570319023d
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/371863
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
There's a bug lurking somewhere in vhost
shutdown path causing intermittent
failures. Sending a SIGABRT instead of SIGKILL
will make the process dump core. We could use
it to speed up debugging.
Change-Id: I0825deecbf26e32ff073fdbcdfe42640c52453b9
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/393477
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Add a new file, scripts/common.sh, that can be shared between not only
autotest scripts, but also scripts/setup.sh, scripts/gen_nvme.sh, etc.,
and move the PCI iteration functions there.
The iterators are also expanded to work identically for both dev_id and
class_code on Linux and FreeBSD.
Change-Id: I98423cd06242e78535f5da4fce82166812ea96a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393416
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
For now, our scripts don't support detecting mounted filesystems on NVMe
devices on FreeBSD, so only run those tests on Linux.
Change-Id: I558715bf4e95eaad2dd2d8a546626269c0837edb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393420
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This test ran for 10 minutes, which is half of the allotted time for the
entire nightly test run.
While we're here, remove some of the duplication - we don't need to run
both the nightly long run and the shorter normal test run of the same
test, and they should be grouped together.
Change-Id: I66385054d425fb8b032e282050fd39e927a8eb80
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393095
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The task resource is allocated one by one and when it fails
to allocate at some point, call the explicit destroy to release
the resource.
Change-Id: Ida916ed25a279806fee76104990f1f92daf3e1b6
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/393009
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The iscsi_tgt test scripts can assume that the default case is testing
on a local machine using the kernel TCP stack; add a fallback TARGET_IP
and INITIATOR_IP to make it easier to run the individual iSCSI tests
outside of the autotest.sh framework.
Change-Id: I07c58201691dc5f053d5f67787768dfee4110f73
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393214
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Use the SPDK env layer functions to get the number of cores and iterate
over core numbers.
Change-Id: I77870ebcffc07db680bbb3783fbe5944cf88e2ea
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393188
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Only Makefiles for libraries that directly depend on DPDK (rather than
the SPDK env abstraction) should add $(ENV_CFLAGS).
Change-Id: Ifdf44d3ef8c42bbf7f20edd524b330d00658235b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/392818
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Netmasks with 0 bits of prefix do not make sense. For example,
192.168.1.2/0 would allow hosts from any address, but this is
indicated with a special "ANY" value rather than a normal netmask.
Netmask prefixes of the full address size (e.g. 32 for IPv4 and 128 for
IPv6) are still allowed, since this represents a valid configuration
that matches a single specific address.
This also allows the IPv4 netmask math to be done entirely in uint32_t
instead of promoting to unsigned long long to avoid undefined behavior
when bits == 0 (shift count would have been 32 in that case).
Change-Id: I021b718e6a46f628c96a358edae816de81cd8929
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/392969
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Ibffb43e39b44e5f443d3dfbfa5b5d7dcac3243ef
Reviewed-on: https://review.gerrithub.io/391182
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: Ic2c23d16360b26359c2a32920b89f2f3a21a2a9a
Reviewed-on: https://review.gerrithub.io/391191
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This allows the user to pause a subsystem, make some
modifications, and then resume it.
Change-Id: Ia18371023d8fc66e1797fda293a01b68c0a61c96
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/392422
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
We can use spdk_env_get_core_count() to determine the
core count
Change-Id: I854ec86f10c5670b02295214d1d36fe5d57e31a4
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/392934
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I79c2c30e15b8254c3cb75af5615dfafee84a9abd
Reviewed-on: https://review.gerrithub.io/392709
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Currently, each histogram range is hardcoded to
128 buckets (1ULL << 7), resulting in 58 ranges
(64 - 7 + 1) and a total size of 58 * 128 *
sizeof(uint64_t) = 59392 bytes.
To allow for more usage models in cases where this
size is prohibitive, enable the following changes:
1) specify number of buckets per range (in number of bits)
2) specify max datapoint value (in number of bits)
The latter can be useful for cases where datapoints
are never close to requiring all 64 bits - and allows
reducing the number of ranges. Any data points that
exceed the max will be tallied in the last bucket
in the last range.
Testing shows no performance disadvantage using the
dynamic approach.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5979bcdff6209faaa9dee293918ef2a78679bcd4
Reviewed-on: https://review.gerrithub.io/392707
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I050ecd4f3bbccbd527387d080ce595fae16479d3
Reviewed-on: https://review.gerrithub.io/392704
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Use spdk_bdev_unmap_blocks() in place of spdk_bdev_unmap(), since the
SCSI UNMAP descriptor already natively operates in blocks rather than
bytes.
Change-Id: I16a0c38d203cf5f60484229e7872783b11d8de6e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393202
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Use spdk_bdev_flush_blocks() in place of spdk_bdev_flush(), since the
SCSI SYNCHRONIZE CACHE command already natively operates in blocks
rather than bytes.
Change-Id: I11810948fb8d0b6b911d48620e2a363f767cc7f7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/393201
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Adopt two improvements for iSCSI by Ziye to VHOST.
- iscsi/conn: remove rte_config.h header
- env: export spdk_env_get_last_core function
Change-Id: I8f067093d593c8d483c52587669f8b0b706f497f
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/392910
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The latest patch for the iSCSI connection is applied to the vhost
too.
RTE_MAX_LCORE in the for loop is removed and the for loop is
replaced by SPDK_ENV_FOREACH_CORE().
When the cpumask is unexpectedly 0, not 0 but the first core is
returned.
Change-Id: I39cfc2219a3532eccc8c0ce59712102b947a76d7
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/392588
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
update help message to match reordered and new test cases
Change-Id: Id85391cfc84c1ee1567cae07da9ff797a95a6f68
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392675
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
A few previous changes replaced ALL by ANY for the initiator group
because ANY was normal for this case. ANY was tested enough for
the initiator name of the initiator group but not tested for
the netmask of the initiator group.
Hence the previous changes caused degradation.
This is the bug fix and UT code is added together.
Change-Id: Idf7642dd4c111a4788aca31a0105b3497631aecd
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/392923
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Current relative work dir path caused problems with downstream
test scripts when running spdk_vhost.sh using relative path
Change-Id: Ifd47bd37650a6328cb0f548a03cb4de010093320
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392744
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tests need adjustments due to patch:
https://review.gerrithub.io/#/c/392587/
Change-Id: I098aca99fe22a9e01246da74b4b9fbf25f4b5b99
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392745
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: Ibd3e485085793260ca4bb2bfa3da6025b2c997aa
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392450
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
The latest change for the portal group is applied to the vhost.
The following comment is quoted from it.
Currently the cpumask must be a subset of the reactor mask.
However, this is different from sched_setaffinity() function
and taskset command of FreeBSD and Linux. The latter will
be familier for more people. Hence the later is adopted.
The following is quoted from the FreeBSD Man Page of taskset:
The CPU affinity is represented as a bitmask, with the lowest
order bit corresponding to the first logical CPU and the
highest order bit corresponding to the last logical CPU.
Not all CPUs may exist on a given system but a mask may specify
more CPUs than are present.
A retrieved mask will reflect only the bits that correspond to
CPUs physically on the system.
If an invalid mask is given (i.e., one that corresponds to no
valid CPUs on the current system) an error is returned.
The masks are typically given in hexadecimal.
Change-Id: Idcd72a12ef52e4ccec8476e7d54fab82867cf936
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/392587
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This can be used for two purposes:
1) more quickly iterate the blob list, avoiding
metadata pages that are valid but not the first
page in the blob's metadata list
2) close races between delete and open operations -
now we can clear the bit in the blobid bit array
when the delete operation is in progress, ensuring
no one else can try to open the blob
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3904648fd6fa656cb98c9e17ea763ed5a84ef537
Reviewed-on: https://review.gerrithub.io/391695
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Number of susbystems for test on physical server increased.
Due to SoftRoce limitations number of subsystems is not
increased for VM tests.
Change-Id: I6875204238f55f4bc4a819512ee0fd6a46c44fee
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/380459
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
SoftRoce does not implement enough queues
for multiconnection tests and cause test pool failures.
In case interface used for test is software
emulated - reduce number of NVMf subsystems in test.
Change-Id: I52cc78015e72603c487a5774b91c6bd4523326b0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/392357
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Purpose: To avoid overflow, if the passed value is too
big.
Change-Id: I59d31c0baa742cab14e22dcd88a61cb5adca247a
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/392579
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This was removed some time ago.
Change-Id: I5e4b588fb881793d750999ff73e8bf891cb58fc0
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/391952
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Make shell scripts prepare fio jobs and just call run_fio.py to run
those jobs. This way run_fio.py don't need to know anything about test
environment configuration.
Change-Id: I10b6954011855e9139ff7b5372070ec553009d33
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/391929
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
A couple of the lvol tests delete the nvme bdev, then construct
it again to test lvolstore tasting. But constructing the nvme
bdev and then the tasting can take a tiny bit of time, and if
we check for the lvolstore too soon, it could fail. There are
a large number of intermittent test failures in the test pool
that show this signature.
So sleep one second to allow time for the tasting to complete.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iebabe09458302d8300e704f232fdbb245b562268
Reviewed-on: https://review.gerrithub.io/392559
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I6ddce54d24570099f5237ea3acbac7e3be78e520
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/392434
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7174f1799361b8337ff5590b90ad6a0564ca8e9b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/391899
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Use double-precision floating point in the performance_dump() function,
since we can be dealing with large numbers (especially now that
io_completed is now uint64_t).
This isn't part of the I/O path, just used to print statistics, so
there should be no performance impact. Also, the arguments passed to
printf() were already implicitly being promoted to double, so this
actually removes an extra conversion step.
Change-Id: I12aae36bc42e83777eaa050561eb5e55060ae81c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/392414
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
- Removing hardcoded lvol bdevs and blk controller sizes
Lvol bdevs will now be created with roughly equal size based on
size of used NVMe backend
- Create lvol structures and VMs setup independently
Change-Id: Ib1cfe1b60033200a9896fa0c8d1b17af41ea0eb1
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/390983
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
In the iSCSI specification, the SCSI device name is defined to be
the iSCSI name of the node.
However, when g_spdk_iscsi.nodebase is used, the SCSI device name
is made of the device specific string (the part of IQN after the
colon).
The size of the temporary buffer fullname[MAX_TMPBUF] in
spdk_iscsi_tgt_node_construct() is 1024 and the size of
spdk_scsi_dev.name is 255. The former is larger than the later.
However the max length of IQN, EUI, NAA are 223, 20, and 36,
respectively. All are less than 255.
Hence even if we use fullname as the SCSI device name, no overflow
will occur. Even if fullname is more than 255, strncpy() does not
write more than 255 in spdk_scsi_dev_construct().
It's possible to check the length of iSCSI name strictly, but I
will do the least in this patch.
Change-Id: Icc6655fcd846797720867c10e316d2951c664030
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/390360
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reason: If test a very long time, it will overflow
when we use int
Change-Id: I729e8cb5862ab78808da5121666b41e599e1dddb
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/392122
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Iba33c55f129c60fad2d58f5254dec5c54ed56805
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Reviewed-on: https://review.gerrithub.io/388217
Tested-by: SPDK Automated Test System <sys_sgsw@intel.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>
It looks that initiator groups which were initialized after
being inserted to linked lists caused failures.
Change-Id: I43f4a6324e77221f0e9657667c0185b15e9c229c
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/392100
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5e19266d5d418e1b356308d2b9efa419c1b22232
Reviewed-on: https://review.gerrithub.io/392002
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
the sysfs for NVMe drives on some older versions of the linux kernel
differs slightly from the latest kernel versions. This patch adds a
fallback to support those older kernel versions.
Change-Id: I2787e0d15d310ce1f264b0a303f53e48525a9a1d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/391983
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
libiscsi will be used to test our iscsi target for spec compliance. I
check out the source from github incase we need to modify it and create
our own branch later.
Change-Id: I2d1c037e1aee47fa7f6f700ae186dd402f9ad52b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/391887
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This patch does the following things:
1 Set the time period 1 second into a global variable,
then if we modify that value, we will make sure that
we change it in the whole file.
2 Fix the period performance printing data . We should not pass
the time period, but we should pass time period * times, since
I/Os completed are caculated from the beginning.
Change-Id: I1eaaf1655389cbccefdcc879a51fca94028afdcb
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/391421
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
1) move iscsi_pmem to nightly
2) move idle_migration to nightly
3) reduce number of malloc bdevs and lvols for iscsi_lvol
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I63fa5a2634c6edb08db16267972fd21c20fd84f4
Reviewed-on: https://review.gerrithub.io/391976
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I138362d4ebe157926228384ab032c057c03c822e
Reviewed-on: https://review.gerrithub.io/391891
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: I619f2e772b38061e26e3c5f2b4014ee73a5f5d81
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/391894
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This prepares for some future changes to blobstore
metadata. For older (pre v3) blobstore disks, we
do not want to try to write new metadata fields,
since in many/most cases, there will not be room
allocated for them.
The current code will keep the existing version -
this is just adding tests to make sure this does not
break in the future.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I866ff39972eb15b5a24fd30fa6b56d649fc06305
Reviewed-on: https://review.gerrithub.io/391507
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
I have no idea why - but scan-build starts complaining about
some missing SPDK_CU_ASSERT_FATAL checks when analyzing the
next patch - even though that patch has nothing whatsoever
to do with the scan-build error reports.
scan-build is really weird sometimes.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3d426384fa4f846abf2eb98fd29ee308d08c1943
Reviewed-on: https://review.gerrithub.io/391875
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Similar to previous change, the ** paradigm is a bit
problematic for asynchronous routines that could fail.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ife7748280482356c4c51a796817b71cd7bc7e479
Reviewed-on: https://review.gerrithub.io/391483
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Using the ** paradigm is a bit problematic for asynchronous
routines that could fail. Currently we were inconsistent in
that some error paths would zero the pointer while others
did not. So make this just a plain pointer, which simplifies
the API and its implementation.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I67147931c6e8350896a4505022a6a314655de3d3
Reviewed-on: https://review.gerrithub.io/391482
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Add the unit tests for the spdk_nvme_connect() API. This API
will be called both by the primary or standalone process and
secondary process. Introduce different unit tests to cover
different usage.
Change-Id: I9ded7d08b593c5e2c541cf6faad6aff0ff2ebff9
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/380895
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
ext4test takes ~80 seconds to run, which is a significant portion of the
overall test time for machines running the iSCSI tests.
Change-Id: Id6384fe023f101d4e81bc4ed2da9a53a817d2a02
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/391317
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
While iterating, allow the user to perform asynchronous
operations. To continue iteration, the user is expected
to call spdk_for_each_channel_continue.
Change-Id: Ifd7d03d5fbf17cf13843704274b036d49ca0484a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/391309
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
With the previous 2 seconds sleep we
still used to randomly fail from time
to time.
Change-Id: I99f8c50ba4af87c47bed5a629ddb79f5eb796d4c
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/391553
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This test ran for 10 minutes, which is half of the allotted time for
the entire nightly test run.
Additionally, we should be testing each bdev backend at the component
level (e.g. via bdevio and bdevperf), rather than trying to add tests
for the whole matrix of front-end app (iscsi_tgt, nvmf_tgt, etc.) with
each bdev backend.
Change-Id: I10311e3e5092084dc939ab8662e8312066ecab6e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/391303
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Also used it in parsing `-m` SPDK app param,
meaning that it can now accept numbers
followed by a binary prefix - like 512M or 2G.
Change-Id: If458dc08429237f2cb3f3f661bcaf382468df0f0
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/391670
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
As part of clarifying the API and preparing for some
future changes, rename the following functions:
spdk_bs_md_create_blob => spdk_bs_create_blob
spdk_bs_md_open_blob => spdk_bs_open_blob
spdk_bs_md_delete_blob => spdk_bs_delete_blob
spdk_bs_md_iter_first => spdk_bs_iter_first
spdk_bs_md_iter_next => spdk_bs_iter_next
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I86bf792717b68379484a6108396bb891fe1c221e
Reviewed-on: https://review.gerrithub.io/391031
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This function was a nop and is not needed.
lvol was calling this function when an lvol bdev
gets a FLUSH I/O, but that is not needed either. So
lvol will now report it does not support flush.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I92df83243f7ebce81c69040a8874891dc2ffc961
Reviewed-on: https://review.gerrithub.io/391023
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Change-Id: Ic960f2fe6966ae6eeb027a7c6a1d6929c741080d
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/388642
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Replace the single call to spdk_scsi_dev_print() with a reimplementation
using public SCSI API functions, and also using the SPDK logging
framework instead of printf().
Change-Id: Ifa455f9e6a4a07a35d5dec311a61e9a8afaa0227
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/391320
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Then also add a check in check_format.sh and fail if
a new instance is found again.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia35c343e1b7bb44b3b5f4f8484adb9e0d5702d67
Reviewed-on: https://review.gerrithub.io/390916
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Now rely entirely on the user to create and poll
the poll groups.
Change-Id: I66baaa2d0f493390a055a32e6c902f5e2f574534
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/385954
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Enable the NBD subsystem and RPC methods in the iSCSI target, NVMe-oF
target, vhost target, and bdev_svc test app.
Change-Id: I1c2e53a4c031ae6d4dc0a8e698bbfa085db33154
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/391014
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Since we use time_in_sec to judge < 0 case
Change-Id: I8283c8209359acfe1b1d5db8a9d4315e5722c5c6
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/391154
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Moving forward, the spdk_blob returned to users will
actually be an I/O channel - not the blob structure
itself. So rename the existing spdk_blob to spdk_blob_data.
spdk_blob_data will continue to contain global state for
the blob. In the future spdk_blob will point to an
I/O channel for the blob - for now it effectively still
points to the spdk_blob_data, but by changing the
structure names here it will reduce the code churn in
future patches.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7d0cbc0553f68f96c24173c833091a80d058eb89
Reviewed-on: https://review.gerrithub.io/390900
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: I23f71ff38b805723d74aca639489e0079ecdb993
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/390341
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Check the SPDK_TEST_NVMF flag before running the iscsi_tgt + NVMe-oF
host test.
Change-Id: I0d545c98f188edefc089fb79e2879d5d307726f5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/391027
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Require braces around all conditional statements, e.g.:
if (cond)
statement();
becomes:
if (cond) {
statement();
}
This is the style used through most of the SPDK code, but several
exceptions crept in over time. Add the astyle option to make sure we
are consistent.
Change-Id: I5a71980147fe8dfb471ff42e8bc06db2124a1a7f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390914
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
We also caculate the time for still dumping the
performance data.
Change-Id: I59b736268ca57a366666a4bf55458ec3f279f4e7
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/390702
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Disallow multiple I/O queues for the same controller with the same queue
ID. NVMe-oF 1.0 ECN 001 specifies that this condition should return a
status value of Command Sequence Error.
Change-Id: I41126ddec388a985c403025e099ab15da5d3987c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390662
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I4d3cced91e804fbbb96a15a09b575ff85960ddef
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390661
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ifd00dd647002ea226df826c558232d97d366ab81
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390660
Tested-by: SPDK Automated Test System <sys_sgsw@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>
The lvol bdev which used to create nested lvol store
should be $lb_name.
Change-Id: Ic8d68f8d18bcb0c1d4bca0b4612a4a07ed8b974d
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/390350
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This is necessary for SPDK_RUN_ASAN to function properly.
Change-Id: I22f4e8dde225967a3db3718270c2626f178af319
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390858
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Similar to 759e5934eb (test/iscsi: initialize pgs before adding to pg
map), make sure the spdk_scsi_ig structures are zero-initialized before
passing them to spdk_iscsi_pg_map_add_ig_map().
Fixes Valgrind "Conditional jump or move depends on uninitialised
value(s)" errors in two tests.
Change-Id: I38c095aa7c6a89cb9332618b63fe12a02bcf3c2a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/391000
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Change-Id: Ibf243d4e9804acda8ee712253722c963bb0120fc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/390997
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This fixes some issues found with Valgrind (incidentally *not*
found with ASAN).
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I49bbd4b338299568eaa4a118aa82fc411037cea7
Reviewed-on: https://review.gerrithub.io/390909
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Added new keyword 'Target' that will replace 'Dev'.
'Dev' is still usable, but deprecated and will be removed.
Change-Id: Iafd6114ef2cc5b2f8d58497e9fb454a3a237ed16
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Reviewed-on: https://review.gerrithub.io/388568
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Check if a LUN already exists before allocating the spdk_scsi_lun
structure - this matches the real implementation of
spdk_scsi_lun_construct().
Fixes: e44731d659 ("scsi: Remove the claimed flag from LUN")
Change-Id: I529648f93cd21e9f19ce82ef571cabe9c7e8c49a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390903
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Add g_spdk_nbd to record multi-nbd-disk in the
future. nbd subsystem will be used to init and
finish g_spdk_nbd and its linked spdk_nbd_disk.
Change-Id: Ia67caa57b9920d0080f8b2fa1c8e87615803e5fe
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/390097
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
nbd poller is put into spdk_nbd_disk.
nbd test app no longer needs to process spdk_bdev.
This enables upcomming patches to move nbd test app
functionality to SPDK library.
Change-Id: I1b563a49dc9488e8dcc20706be82b17fdbd07ff1
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/390093
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
In principle, we should not have active tasks, which means
that lun->tasks should be empty. But for the exceptional case,
we may still need to handle those active tasks, to make
the scsi related application continue running instead of quit.
We should not directly call spdk_scsi_lun_complete_task since
those tasks are already sent to bdev layer. And finally, those
tasks will be return (even aborted) by call backs. So we only need to
set task status to condition, but
not call spdk_scsi_lun_complete_task directly.
Change-Id: I6af2bda0f0b1de7b0c655d2ac2980ddca48c1162
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/386817
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Struct spdk_scsi_lun has the claimed flag as a member.
However the claimed flag is no longer required.
Moreover the claimed flag itself is not used but
spdk_scsi_lun_claim() and _unclaim() functions are used in the
UT code by hard to understand manner. Moving the logic into
spdk_scsi_lun_construct() and _destruct() in the UT code will
be more natural.
Hence remove the claimed flag from LUN and do a little refactoring
in the UT code.
Change-Id: Ica9680b49bbdb5be7c5c4161210fb3a6dcb35229
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/390566
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Currently even if PG mapping is removed from iSCSI target,
corresponding SCSI port is not removed. Hence dynamic
reconfiguration of PG to existing iSCSI target is not supported.
This patch supports dynamic SCSI port removal when the
corresponding PG mapping is removed from the existing target.
Some refactoring for SCSI port addition is also done
Change-Id: Ib06bc10743eb088d023f425742e39bb24f1b0df1
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/389056
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Disambiguate the log components from the trace functionality
(include/spdk/trace.h).
The internal spdk_trace_flag structure and related functions will be
renamed in a later commit - this is just a find and replace on
SPDK_TRACE_* and SPDK_LOG_REGISTER_TRACE_FLAG().
Change-Id: I617bd5a9fbe35ffb44ae6020b292658c094a0ad6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376421
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The get_available_rdma_ips function can't get port IP in ubuntu
system. Update the function to fix this issue.
Change-Id: I1b8a0b1159ce7919f883a21067de78d5166954b2
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/390613
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
NVMe specification 1.3 added a new Admin command: Doorbell buffer config,
which is used to enhance the performance of host software running in
Virtual Machine, and the Doorbell buffer config feature is only used
for emulated NVMe controllers. There are two buffers: "shadow doorbell"
and "eventidx", host software running in VM will update appropriate
entry in the Shadow doorbell buffer instead of controller's doorbell
registers.
Change-Id: I639ddb5b9a0ca0305bf84035ca2a5e215be06b46
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/383042
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The function just needs to zero out metadata so that the
blobstore is effectively destroyed. If the user wants
to unmap the rest of the disk after the blobstore is
destroyed, they are free to do so. On future initializations
of blobstores the code will do the unmapping, so performance
is not impacted.
While here, implement the zeroing using the new
write_zeroes functionality instead of allocating a buffer
full of zeroes.
Change-Id: I7f18be0fd5e13a48b171ab3f4d5f5e12876023bc
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/390307
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This readme and bash script can be used by developers to quickly deploy
a new vm in which to pretest their spdk patches.
Change-Id: I12f805e925dae9120ea8c451c9c5b07df4ffaf4b
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/387673
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Remove the [Rpc] section of the vhost initiator bdev.conf file and use
the bdev_svc -r parameter to set the RPC address instead.
Change-Id: Iaa5f6947b49679082f00d4c30d625ab2e5db8441
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390327
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
A previous commit modified this test to specify the RPC address via
command line, but failed to remove the [Rpc] section from the
configuration file.
Fixes: 59515ed6f8 ("test/iscsi/ip_migration: use UNIX socket for RPC")
Change-Id: Ibd5ac69c8e72fefc7e7b540df280d8a55b0b9946
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390326
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I3cbb52cd9a4201704423b49eae74935b8a33b0fd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/389903
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
The iscsi fio_remote_nvme test was failing because the large malloc bdev
was consuming too many contiguous hugepages and the call to
construct_nvmf_subsystem was failing on some machines. This change increases the memory
allocated for the nvmf_tgt app which solves that problem.
Change-Id: Ibc882d83c5b983baee9b004bfc0970562f7f2e1f
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/390320
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9afa07b5dae99955ba87d7c8130b2ce6f04e7941
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/389641
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
There isn't a way to remove a namespace just yet, but at least
adding one works.
Change-Id: I99416d1bc9cbc0e2303c16040d2311a07829cbea
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/388293
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This patch is a preparation for dynamic reconfiguration of PG-IG maps.
Current PG-IG map is implemented by a fixed-size array. Linked list
will make much easier to support dynamic reconfiguration of PG-IG maps.
Current:
target - (1..n) ---> PG_map (1..1) -> PG
|
--> IG_map (1..1) -> IG
This proposal:
target - (1..n) -> PG_map --- (1..1) -> PG
|
-- (1..m) -> IG_map - (1..1) -> IG
Change-Id: I92f668b81cdd8003aff222926f8f1ed96b61e56d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/385532
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Add nullglob options where appropriate
Change-Id: If55b0b2e19a7834eaf2efc86b2c23fcc71d8b05f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/389292
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Similar flags will be added at the blobstore level in a future
patch.
This allows backwards compatibility - i.e. allow older blobstore
applications to open blobstores created by newer blobstore
applications with new features. Any blob's using a new feature
should have an associated flag set in one of three new flag masks:
- invalid: if a bit is set in this mask that the application is not
aware of, do not allow the blob to be opened
- data_ro: if a bit is set in this mask that the application is not
aware of, allow the blob to be opened, but do not allow
write I/O nor any operation that changes metadata
- md_ro: if a bit is set in this mask that the application is not
aware of, allow the blob to be opened for performing any
kind of I/O, but do not allow any operation that changes
metadata
While here, bump SPDK_BS_VERSION to 3. We intend this to be the
last change made to SPDK_BS_VERSION - future versioning will be
done via blobstore or per-blob feature flags instead.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If059e38bfffbeec25c849a7629a81193b12302c4
Reviewed-on: https://review.gerrithub.io/388703
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
The results of access control procedure for login in the
spdk_iscsi_tgt_node_access() is defined in the following table:
+------------------------------+
|iscsi name |netmask |result |
+------------------------------+
+------------------------------+
|denied |- |denied |
+------------------------------+
|allowed |allowed |allowed |
+------------------------------+
|allowed |denied |next IG |
+------------------------------+
|not found |- |next IG |
+------------------------------+
However current implementation have redundant repetition in the
spdk_iscsi_tgt_node_access() and the above definition is not
visible. Hence refactor spdk_iscsi_tgt_node_access().
Besides refactor spdk_iscsi_tgt_node_allow_iscsi_name() because
it has redundant repetition too.
Add UT code for these changes.
Change-Id: If06d87c1246c85439ee0482149bd887a7b53b169
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/379935
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Naming rule of access control of iSCSI target does not reveal its
intention. Hence change it before refactoring to avoid unnecessary
repeated procedure.
Change-Id: I4064ec0a5a2b52244b6de3958ee2ab41342d1a57
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/381248
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
In the accessibility control of iSCSI target, "ALL" is used to allow
ANY IP address-port pair or iSCSI name of initiators. However iSCSI
targets cannot know ALL initiators beforehand.
Hence "ANY" will be better than "ALL" and will avoid misunderstanding.
Comments and iscsi_tgt test code are also changed and UT code is added.
Change-Id: Id004d819df6e9ee89f6c1db2e4b4c149be062733
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/385168
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Fix: Add condition to some test cases
because there are more possible return values
in check_get_lvol_stores function.
Change-Id: Id035d1edc52252f009277c9afd5f07f8875e0dcc
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/388242
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Currently, the nightly tests are hanging due to the AER test program,
which waits for a temperature threshold event to occur. The QEMU
emulated NVMe controller (as well as the SPDK NVMe-oF target virtual
controller) don't emulate this condition, so the test never finishes.
Change-Id: I41a216f77ffbb3beaef2fdf7533fe62c36033fc6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/389908
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
As of this patch, it is unused.
Change-Id: I15f42b8cc43e3792ae69c91f3911b7853d5b5664
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/388292
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
All of the call sites already have a lvs pointer; there's no need to
look up the lvs by UUID again.
Change-Id: Icef54d84e7c89f682ea47f10b282839ab4237ce0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/389892
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This issue may be hit under some large IO and large queue
depth cases where much memory will be consumed and the channel
may be failed to create due to insufficient memory.
The general fix here is that we need to properly handle
the error case that the channel is not created due to this
or that reason.
Change-Id: Icf58a7c8a9cba625ef1b8da6b8bf68ef72ef5546
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/386051
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Use the common SPDK application argument parsing function.
This adds support for several more common options to the bdev_svc test
tool.
Change-Id: Iccccf158164182aa36d0837210d8b189be3b6cd6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/389866
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
It will allow to put another test cases
in specifig group.
Change-Id: Id352aa516676f78cdb102f8eac70144f115976a5
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/389098
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
data_ro means that write, write_zeroes and unmap operations are not
allowed.
md_ro means that resize, set_xattr and remove_xattr are not
allowed.
There is no code yet that can activate this - it is coming in a future
patch. Two usages are planned though:
1) a user explicitly marks a blob as read-only - this is persisted so that
future loads of the blob will ensure the blob cannot be modified - neither
metadata nor data
2) a future feature flag framework (how's that for alliteration) may allow
a blob to be opened, but not allow metadata modifications, if there are
feature flags set in the blob's or blobstore's metadata that the
application does not understand
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I247fd900430c56f7176edfb80dddd5a1a6c8dc87
Reviewed-on: https://review.gerrithub.io/388663
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Only multi-process shared controllers should be inserted into the shared
list in g_spdk_nvme_driver. To accomplish this, create a second
per-process global list of attached controllers (g_nvme_attached_ctrlrs)
and rename the driver struct field to shared_attached_ctrlrs to clarify
its purpose. Additionally, a new helper function, nvme_ctrlr_shared(),
returns whether a given controller should be on the shared or
per-process list.
Change-Id: I46d4e558ece8b7fc3d28868e32bb56d794f21aab
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/389190
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Simplify the PCIe transport by using an existing function to look up a
controller by transport ID.
Change-Id: I261865df1ba23069b052ca64944b7637d70c85ba
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388701
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Each process should manage its own list of controllers that are
initializing; the list doesn't need to be shared between processes.
This is the first step toward preventing non-PCI controllers from being
added into the shared attached_ctrlrs list.
Change-Id: Ia6f85fe89e28a04f0950da5362bb2f49d1b76da9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388695
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change the return type of spdk_bdev_register related
functions and try to handle the duplicated name
issue.
Change-Id: I23af11583cf2050579d1624508306a35394bffde
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/388178
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Use the new one from io_channel.h.
Change-Id: I7bf6729caf6eeebcb58450a36119601957ad5da4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/388290
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This function will send a message to each allocated
thread asynchronously, then call a callback on
the originating thread.
Change-Id: I3ebe7c6c5b460a944a32487d1091b601a482a256
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/388041
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This simplifies the public API and requirements for
user applications.
Change-Id: Ibb0d25a7838a0fa683f39e79cb4fef78adf6aee8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/388040
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Make this generic and not directly dependent on
the event framework. That way our libraries can
register pollers without adding a dependency.
Change-Id: I7ad7a7ddc131596ca1791a7b0f43dabfda050f5f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387690
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: Ib2bdbe6e8cbbefadac0b38f2a552daea7d4c4b1c
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/388151
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This should be removed.
Change-Id: I122ef2729d8389fab6cc8883bc70f221c48f574b
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/388884
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
When the ((timeo-=1)) value equal to zero, it will cause
the trap in main script to start "error_exit" function
which already does kill the vm.
Change-Id: I30fb7dfa0c3b1a5faa6a88e9743164137b376bef
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/386208
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This patch is used to remove tht task_pool allocated
by spdk_mempool_create.
Change-Id: I8d3a483477d7fd8b5893baa41b8658893c852f6c
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/388534
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Commit c63d9de433 replaced
remove_vhost_blk_controller with remove_vhost_controller, but test
wasn't updated to match. The test had already been broken before that
point, because the RPC method name was incorrectly spelled using "block"
instead of "blk". This hadn't been caught because this particular test
is expecting a failure, just not the particular failure that is being
caused by the incorrect method name.
Additionally, the "create block controller with incorrect name" test was
actually using the construct_vhost_scsi_controller RPC rather than
construct_vhost_blk_controller, so fix it while we're here.
Change-Id: Ib60f51639e0a3f65b09e2663186aa259be407ee4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388060
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch could prevent the potential coredump of
accessing rte_mempool among multiple threads. We
allocate the tasks from the beginning.
BTW, this patch also refactors the bdevperf to remove
dpdk dependency
Change-Id: I841e6c8b43276923acaf6686377741c37e2e71ec
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/387871
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
It is outdated and not really usefull.
Change-Id: Ifcfd1c987467448cb6f827457de215922a701d77
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/387797
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This is inconsisten with local variable deffining the same path. We need
also to move negative vhost app tests from run_vhost.sh since VHOST_APP
will not be available anymore.
Change-Id: I21cee58c545357ca7e7997cb529b15d436cfed57
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/387561
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Until the fio_plugin unload crash is fixed, disable the fio portion of
the tests so that we can re-enable the rest of the bdev/virtio testing.
Change-Id: I8d18fff729262fa88cbc66fce914cf1ff92db83e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388307
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Switch the iSCSI process in the iSCSI/NVMe-oF test to use a UNIX domain
socket for RPC instead of a TCP socket.
Change-Id: I130b2871c74b6bd9aa55a63d751c995a579e03bf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388287
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Switch the ip_migration test away from using TCP to access the RPC
service.
Change-Id: Ic89f59acf60016ae2669b267f09a035413ab22e1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388286
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
discover_bdevs previously took a port number for the RPC service, but
after commit 6bef902ca5 ("rpc: add default UNIX domain socket listen
address"), running rpc.py with just a -p (port) parameter doesn't have
the expected effect, since the default server_addr is now a UNIX domain
socket path, and the port is ignored.
Change discover_bdevs to accept a socket path instead of a port number
to fix the issue for the vhost/initiator test; no other callers use the
disover_bdevs rpc_port argument, so this is the only instance that needs
to change.
Change-Id: I4e290f175ccc79caa3c4ef76c062641b9fe489a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388283
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
To add initiators to an existing target, manage name and netmask
of initiator group by linked list. It is not easy for array to
detect duplication and change configuration.
Change-Id: Id9e77740e24ac309a33d8de1be37663681160d94
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/379932
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
spdk_iscsi_init_grp_create_from_configfile() returns 0 even if
creating an initiator group (IG) is failed due to empty netmask or
initiator name. This will be unexpected behavior for end users.
Hence change the return code from 0 to -ENVAL for this failure.
Besides do the following.
Change other error return codes in the function by using errno too.
Current IG don't have any UT code in repository. UT code to confirm
this fix is also submitted.
Change-Id: Ic918feb5c6a3e772b325664d881b2673b553a217
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/384408
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ic11a56c5616098ff42f31f78aa96289af5965118
Reviewed-on: https://review.gerrithub.io/387611
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Typo caused lvol blk test to not run.
Change-Id: I1e26b96757450a3ea860e0b74a0b7d976c86bdf2
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/388413
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Adding new functions to core vhost requires adding their equivalent
mocks in both vhost_scsi_ut and vhost_blk_ut separatly. By adding common
file "test_vhost.c", we can prevent duplicate mock functions.
Change-Id: I4542ae092e158b94b25559216e1fc46e10c1a1ae
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/383357
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Adding positive and negative lvol friendly names specific tests.
Test plan updated.
Also fix some test naming discrepancies between plan and
script while at it
Change-Id: Ifb1a62d6a231f4f4ebfb5bb6178d941fc2b9770d
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/385552
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Add lvol tasting positive test case.
Adding new autotest config option for better control
where test is executed
Change-Id: Ic08b2395bd14e15072711b97c77b7e1ce26dd2b7
Signed-off-by: Lukasz Galka <lukaszx.galka@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/383432
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change the return type of spdk_channel_msg from
void to int. If this msg executed in a failure,
we do not need continue sending the message to other
threads, we can just tell the original thread, and
let the orgiginal thread call the spdk_channel_for_each_cpl
call back.
Thus we can track the qpair creation/destroy case for bdev
reset in nvme bdev module;
Change-Id: Ide9dffd1f84a29fcf61d8339a9ece2a0245d968d
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/387284
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8ea8c59a0c67176c0c0c39abf807afad61ff3828
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387689
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: I864cd8a6c206dfbe62fcb3f72275c1ae51aa4ed7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387688
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
nbd_start(), nbd_poll(), and nbd_stop() will all be called
on the same core, so the poller unregister will complete
synchronously.
Change-Id: I4f83f3821102277704422ed63d4cde424324e0a4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387686
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Register all pollers to the current core. If necessary, send
an event to the correct core before registering.
Change-Id: Ie34cc8b11143a58c0f621c87c409a3d09d929648
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387682
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Removing norandommap as it is not correct to use with
verify-enabled tests
From fio man:
Normally fio will cover every block of the file when doing
random I/O. If this parameter is given, a new offset will be
chosen without looking at past I/O history.
This parameter is mutually exclusive with verify.
Change-Id: I739642461b3dbe9ab8698836aa120bfb14c2b79e
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/385431
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Use the env abstraction PCI functions to compare PCI addresses so that
details like whether or not domain is specified or whether 0-padding is
present don't affect the comparison.
For example, 0000:01:00.0 should compare equal to 01:00.0.
Change-Id: I9f3aaeb5f8fdbf3e246e31a41b4c09151288015e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/387202
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Id50593446bd3ce5383ca10e917a541a0246cf3a7
Reviewed-on: https://review.gerrithub.io/384076
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch make the cache buffer shift of blobfs configurable. We
can configure the cache buffer shift according workload, it will
help to improve the performance.
Change-Id: Ied1c2e5d6fd9eaa7aa0759c03c654fcf2e77aa23
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/383381
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This will be used to include common app-specific rules in upcoming
patches (it currently makes no difference).
Change-Id: Ia828ba01c94fc9f70e15db3fc1d9cafda387e912
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/387629
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This helps enforce uniqueness of the subsystem id and
allows for quick lookup by that id.
Change-Id: I4d2948892839d42b8c2b2a406682848415ad2bd6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/376251
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
qemu_build_and_install and spdk_build_and_install are unused for long
time so lets remove them.
As we are here also also remove unused VM_CNT.
Change-Id: I23368b2f2036b9eb82f9ac8e6880242748352e49
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/387560
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>