Commit Graph

3746 Commits

Author SHA1 Message Date
Seth Howell
44616ea55f test/unit: move json tests under a single run_test
Change-Id: Idb8fb5a60adeba958cdb6a477f73c1c96fd3988c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478528
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
d7241356ff test/unit: move iscsi tests under a single run_test
Change-Id: I6222091d79d67b92b4e1c3b3cf399287ad821ffb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478527
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
c7f594abba test/unit move ftl tests under single run_test
Change-Id: I7563e66ad2940b9398ac785e71d722e92fce3295
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478526
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
41c30a72d3 test/unit: move event tests under single run_test
Change-Id: I1794d84546b9b479192677d2e6a97db47fbf3bac
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478525
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
38cde5bc4c test/unit: move blob tests under single run_test call.
Change-Id: Ie30f8e965bc46580a6762f5c5e2c35c4f7928c35
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478524
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
986c915522 test/unit: move bdev related unittests to one spot
Change-Id: Ia2974605da2c0f4f1f7ee2954f64d4b4e6da0ffc
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478523
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Seth Howell
cb90136c33 test: eliminate case and suite from run_test
We will be able to distinguish case and suite in the post process
scripts based on if they have any internal tests.

Change-Id: Iff2aa5caa251924d8a842085d87eb2a17aca45d4
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478522
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:24:42 +00:00
Wojciech Malikowski
77d591e172 lib/ftl: Change ftl_chunk structure to ftl_zone
This is starting point for moving current FTL
implementation which is working on top of
Open Channel NVMe driver to work on top of
abstracted zoned bdev.

This patch is changing name of ftl_chunk structure
to ftl_zone and start using zone states from zdev
interface.

Change-Id: I5429f489cc08a1ac27f09aba3dca4b40ea95eeb3
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467391
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-24 08:14:55 +00:00
Richael Zhuang
64bf0a6e8f test/env: fail to build mem_callbacks.c on non-x86
When building spdk on arm64 with --enable-werror, there are error:
"implicit declaration of function ‘rte_eal_init’ ". For X86,
mem_callbacks.c's dependency header file rte_rwlock.h includes
rte_spinlock.h(rte_spinlock.h->rte_lcore.h->rte_eal.h), but for
arm64 and ppc rte_spinlock.h isn't included. So I include ret_eal.h
explicitly here.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: If8859f5272aeb220dc448a312cb0d1c65e149742
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478570
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-12-23 08:44:22 +00:00
dongx.yi
0edc874f85 test/nvme: fix wrong exit commands.
Issue reports:
	return: can only `return' from a function or sourced script.
Use "exit 1" instead, and ignore changes to json.power_on_time.hours.

Issue link: https://github.com/spdk/spdk/issues/1111
This is to fix issue #1111

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: I90198e8237cb587fbeb7777f6b2da783fd15ba04
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478014
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-20 10:07:39 +00:00
Shuhei Matsumoto
46e52a0bcb test/common: Set invalid value to CPU core API stubs
This change verifies that all existing unit tests don't care about
CPU core configuration.  The subsequent patches will mock CPU
core operations.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I44cc56908cf8609870625ff19d6100e21036c00f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478152
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-20 10:05:38 +00:00
Shuhei Matsumoto
b2927bedea ut/event: Add unit test for reactor.c
Add framework and a simple test case to test creating reactor.
Subsequent patches will add more test cases.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie0eb0e49bfe40469b351b21e40558a1bf5584cce
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478151
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-20 10:05:38 +00:00
Changpeng Liu
ff9516bdcc nvme: call the callback for the queued requests when there is submission failure
For the requests which don't have children requests, SPDK may queue them to
the queued_req list due to limited resources, in the completion path, we
may resubmit them to the controller.  When the controller was removed
the submission path will return -ENXIO and we will free the requests directly,
so the callback will not be trigerred for these requests.  Here we added a
flag to indicate the request is from queued_req list or not, so for the failure
submission, we can triger user's callback.

Fix issue #1097

Change-Id: I901ac81733c2319e540d24baf5b8faa1c649eb35
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477754
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2019-12-20 10:04:57 +00:00
Changpeng Liu
10cd9e86b9 UT/nvme: use STUB macro for the empty function APIs
Change-Id: Id037a0cdc1e054dad0454e0897b04629b78e7d50
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478018
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-20 10:04:57 +00:00
JinYu
b9793e6809 nvmf_example: add an nvmf example
use the nvmf lib to add an nvmf example which
doesn't use the spdk app framework. It can show
how to use the nvmf lib to build your own nvmf target.

We encouage you to use the RPC cmds so this example will
not supply the configuration file. You can read the
README.md to get the steps how to build your nvmf target
and test the IO status.

Change-Id: I8d175934f7364d40fb44d36e85c31d8ea5063654
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468457
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2019-12-20 10:03:34 +00:00
Shuhei Matsumoto
f29c728980 lib/iscsi: Move iscsi_conn_abort_queued_datain_task() from iscsi.c to conn.c
Followin the last patch, move iscsi_conn_abort_queued_datain_task()
and iscsi_conn_abort_queued_datain_tasks() from iscsi.c to conn.c.

Refine unit tests to check more accurately. Adding more test cases
will be done later.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I30530e6871a78a58d9fb472f62168862298884a0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477417
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-12-20 10:03:00 +00:00
Konrad Sztyber
9ec598d115 lib/thread: poller pause / resume
Added spdk_poller_(pause|resume) that allow a poller to be paused and
then resumed at a later point.  These functions come in handy in cases
when a poller is known to be idle until a certain event occurs.

Change-Id: I7f21c80eb9ac4e8e1cf24d66f99da5687aafe358
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477920
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-20 10:02:15 +00:00
Konrad Sztyber
f4576dec88 bdev/ocssd: media management events
This patch adds the logic for retrieving chunk notification log and
translating it into media management events to be sent to appropriate
Open Channel bdev.

Change-Id: I7e4860eda23e61d6208fc5f5861e8fd2b75685d3
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471461
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-20 10:02:15 +00:00
Konrad Sztyber
64fe514efa bdev/ocssd: parallel unit ranges
This patch adds the ability to create bdevs on specified parallel unit
ranges on one OCSSD controller.  It allows the user to create multiple
isolated bdevs, each operating on a separate set of parallel units.

To create a bdev on a specified range, a new parameter -r|--range was
added. For example:
 rpc.py bdev_ocssd_create -c nvme0 -b nvme0n1 -r 0-4

will create a bdev on parallel units 0 through 4 (inclusive).  If the
parameter is ommited, the bdev will span across all available units.

Change-Id: Icd94cf1e22fcc72806ef1ce1efd2d7031010009f
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469898
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-20 10:02:15 +00:00
Seth Howell
4328a67ea7 lib/reduce: add array bounds checking for iovs.
We also need to make sure that the deconm_iov is large enough to handle
all of the iovs we claim to support plus 2, one for offset into the
chunk when doing writes and one for the remainder.
Plus a unittest to demonstrate the possible out of bounds error in the
library.

Change-Id: I7747ad39f76e50f25ecf5168b01e046f71fa0ea8
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478125
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-19 11:04:57 +00:00
dongx.yi
c3fe5e4adc bdevperf: Unify the units with perf.
Other tools have already changed these units to IOPS and MiB.

Unify the units, that makes the result comparing more clear
with bdevperf and perf.

Signed-off-by: dongx.yi <dongx.yi@intel.com>
Change-Id: Iedc47f5757839e1abbcbaf5d97179c90ab130773
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478280
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
2019-12-19 11:04:39 +00:00
Jim Harris
1d94a0b0e1 ut/bdev: fix histogram buffer parameters
These buffers weren't actually used, but "buf" is an array,
so we should just pass buf, not &buf.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478119
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-12-18 10:09:45 +00:00
Shuhei Matsumoto
e37fc5a32a lib/nvmf: Accept KATO for discovery controller
Some NVMe applications require SPDK NVMe-oF target to support
KATO for discovery controller.  Hence change discovery controller
to accept KATO.  Update unit tests accordingly.

Fixes the issue #1089.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib56e3b0b0faaf58276f9e692704763c1e5e5b042
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476810
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
2019-12-18 09:38:46 +00:00
GangCao
82f60376ae test: properly handle the killprocess case
To check whether the process already killed and if the
process is not there, return error.

This is to fix the below issue:
https://github.com/spdk/spdk/issues/1066

Change-Id: I5f36213237a4b0eed8edbc69e666037cf17488b2
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476127
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 15:28:37 +00:00
Seth Howell
f506cc42bd test/bdev: fix nightly failure on hello_bdev
Currently the blockdev.sh tests fail due to using a GPT partition on the
hello_bdev portion of the test. On some of the test machines, sgdisk is
not installed, so they silently fail to create the GPT partitions that we
were trying to use.

This change is only geared towards fixing the current nightly failure in
the bdev tests. It does not address the test machines silently failing to
create GPT partitions.

fixes: issue #1107

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: If58201ff4eb7dce9a44e2f93dfe25601ad1b508a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477611
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
5854d3c0a5 test/vhost: convert migration tests to run_test
This test suite was doing some things as far as formatting that are
covered by the run_test framework. Also, the way the tet cases were
organized was obfuscating which migration tests are actually being run
in the autotest jobs. This configuration makes it a lot easier to
manage.

As a side note, migration-tc3a.sh and migration-tc3b are not referenced
anywhere in the test scripts. They may be extraneous.

Change-Id: Ibe6782b38cb87c90b2bc61f112f10cd35f5b4a44
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476937
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
6b9e48df95 test/vhost: fix variable error in vm_setup
apparently getopt used $i when iterating over variables because when
weuse --force and don't set i ourselves, bash throws errors that look
like "line 594: [[: --test-cases=1,2: attempted assignment to
non-variable (error token is "=1,2")".

Change-Id: I89937f1cdd3d3c0557c931a11707df17c7b8d87e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478079
Tested-by: SPDK CI Jenkins <sys_sgci@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>
2019-12-17 14:54:40 +00:00
Seth Howell
34ae11720d test/vhost: shell_restore_x -> xtrace_restore
The shell_Restore_x variable and xtrace_restore were attempting to
accomplish the exact same thing. However, when assigning
shell_restore_x, if -x was not set, then the assignment would result in
an error causing the scripts to fail.
So just get rid of that variable entirely and replace it with the more
robust xtrace_disable, xtrace_restore mechanism.

Change-Id: Ic823ad8433bd3dc181aaa0930297cd9d74bcf528
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477966
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
190b2245c5 test: make xtrace_disable multi-call safe.
Previously, if you made two sequential calls to xtrace_disable without
calling xtrace_enable, you would lose the original value of x. Now this
is not the case. It allows us to call xtrace_disable freely without
worrying about whether xtrace_disable is invoked later in a function we
call.

Change-Id: I9818ae97532e7a31db576bb9bd2e2e30d67ab410
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477965
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
c4d4abcf64 test/bdev: convert fio test to run_test semantics
Change-Id: I842491321a8797cadca973caba499251a91dfa2f
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477491
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
d6379a8833 test/bdev: convert qos tests to run_test semantics.
Change-Id: I5b52cc57c09bebcb80921821f293ab464c9f915a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477490
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-17 14:54:40 +00:00
Seth Howell
8295a2b0b7 test/bdev: start converting to run_test semantics.
Change-Id: Ic007e6cf8e00402fb5a1e0343b3314f4242efcd0
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477489
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-12-17 14:54:40 +00:00
Tomasz Zawadzki
1d11ab120d ut/crypto: redirect mock rte_lcore_count
With DPDK 19.11 rte_eal_get_configuration() and rte_config
structure were made private. Those were only used in
the inline rte_lcore_count() included from DPDK.
After the update they were no longer available.

Since only rte_lcore_count() was used directly in crypto,
mock that and return 1, as was done previously.

This was tested with DPDK 19.08 and DPDK 19.11.

Change-Id: I13e4d9743b17a34ad786283f8b567d01e036d368
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477841
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-12-17 09:29:39 +00:00
Tomasz Zawadzki
2fbeb7ea52 ut/compress: remove rte_eal_get_configuration stub
This went unused in the unit tests.
Tested with DPDK 19.08 and DPDK 19.11.

Change-Id: I738919379b5751697f9533f72fbaf77993cb6fb5
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477840
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2019-12-17 09:29:39 +00:00
Shuhei Matsumoto
3c7890d24f lib/iscsi: Move iscsi_conn_handle_queued_datain_tasks() from iscsi.c to conn.c
Operations to queue iSCSI tasks are in iscsi.c and conn.c and cross
references due to this separation makes us difficult to create unit
tests.

This and subsequent patches will try to disentangle cross references
by moving some functions from iscsi.c to conn.c.

This patch moves spdk_iscsi_conn_handle_queued_datain_tasks() from
iscsi.c to conn.c.  For unit tests, we don't add anything new in
this patch and just create necessary simple stubs.  After code
movement, new unit tests will be added.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If5b8501a1ef7ea53682a3437c7eb2375aa52ee3b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477416
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:29:10 +00:00
Shuhei Matsumoto
ff7e7c83e6 ut/iscsi: Replace trace library link by stubs
Subsequent patches will change trace functions to be called in
unit tests.  Using stubs is enough as done in other libraries
and do the change in this patch.  For iscsi_ut.c, add stubs to
not iscsi_ut.c but common.c to cover other files.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia14bc932f451b14bdb0ba6e0cb949463490a879e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477414
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:29:10 +00:00
Shuhei Matsumoto
d4914dee06 ut/iscsi: Initialize struct to zero by not memset but "={}" in tgt_node_ut.c
Using "={}" at definition is clearer and saves lines.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I75a99583f1ecc84d4c47cacd9ce58034edb4e756
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477413
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:29:10 +00:00
Shuhei Matsumoto
ce3b8472ad ut/iscsi: Initialize struct to zero by not memset but "= {}" in iscsi_ut.c
Using "= {} at definition is clearer and save lines.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I410279bd3640e03aa9b6eeb488be4404d110b0bd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477412
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:29:10 +00:00
Konrad Sztyber
1ad438311e bdev/ocssd: request resubmission
If a spdk_bdev_io cannot be completed, because it is sent to a zone that
is currently busy, reschedule its submission.  This mechanism will be
used by appends, as mutliple append commands can be directed to the same
zone at the same time.

Change-Id: I60da2bd1835380812d22536ea275fb8fed9f8561
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477437
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
153fbcb1f8 bdev/ocssd: JSON configuration
This patch adds support for saving JSON configuration of the OCSSD
bdev module required to recreate the current state.

Change-Id: Iedbdb8b4a2b7dd02a223ce6f073553e71b9c040a
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469090
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
88406f3302 bdev/ocssd: retrieve chunks' info during initialization
OCSSD bdev needs to keep track of some portion of zone's state (write
pointer, its capacity, whether it's busy) in order to support the append
operation.  To achieve that, all the info needs to be retrieved for all
of the chunks and translated to zone format.

Change-Id: Id88282576aba337b50e7c7e1b9e9ff5aba25a3db
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468937
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
7ac802e848 bdev/ocssd: get zone information command
Added zone information command translating Open Channel's chunk
information to spdk_bdev_zone_info structure.

Change-Id: Ifdb15f2e0ea2fb8422810fa64f18942fcb6e4582
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468213
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-17 09:28:35 +00:00
Konrad Sztyber
704830b3b7 bdev/ocssd: zone reset command
Added zone reset command.  It's very similar to a regular data set
management deallocate command with the only difference being that it
operates on zones instead of blocks.

Change-Id: Iae4d77c6877b6906231336b13fad1167de149f20
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467920
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-17 09:28:35 +00:00
Karol Latecki
b9395621ae test/vhost: restore possibility to use custom Qemu binaries
Use env variables to select custom qemu-img and qemu-system-x86_64
binaries. This is needed to test versus latest Qemu versions from
Github.
If env variable QEMU_BIN is not present then the defaults for test
are system-wide installed packages.

This partly reverts changes done in patch:
5502294d76
which removed possibility to run with custom Qemu binaries.

Change-Id: I8138a079ba7013dcd97aad95ae2eed6417f5b18c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477776
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-16 12:34:47 +00:00
Ben Walker
5d497f6cf5 nvmf/tcp: Use writev_async for sending data on sockets
This eliminates the flushing logic, simplifying the tcp
transport.

This also happens to greatly improve performance, especially
on random read tests. The batching done in spdk_sock_writev_async seems
to be more effectively than the previous batching logic in the tcp
transport.

Change-Id: Id980ac6073e380dc75f95df3f69cb224f50fb01b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470532
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-16 12:34:02 +00:00
Ben Walker
7db1ed8b67 sock/posix: Use sendmsg instead of writev when flushing
This is preparation to add flags to the call.

Change-Id: I36109c069b42bd3ec22e023079c62d41a435f44c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471771
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-16 12:34:02 +00:00
Ben Walker
ab22d249e2 sock/posix: Add a pending list for asynchronous requests
Add an additional queue for requests that have been sent on the network
but aren't complete yet. As of this patch, the code
is still calling writev with no flags in the POSIX layer, so it completes
synchronously. That means requests pass through this new pending list
only very briefly inside of one function.

Change-Id: Iaab6efc118a6d5fe9589199515eb3a7293db4b8e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471768
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Or Gerlitz <gerlitz.or@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-12-16 12:34:02 +00:00
Ben Walker
b7ad942612 sock: Add an asynchronous writev
Add spdk_sock_writev_async for performing asynchronous writes to
sockets. The user of this call is responsible for allocating their own
spdk_sock_request structures to pass to this call.

spdk_sock_writev_async will not return EAGAIN and will instead leave the
requests queued until they are fully sent or aborted due to socket
error.

Change-Id: Idf3239e65d26a3024e578122c23e4fb8f95e241b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470523
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-12-16 12:34:02 +00:00
Jin Yu
f1d47d69ef test: add the UT of the set IO timeout
Add the unit test to verify the submitted list,
timeout IO poller and timeout IO check.

Change-Id: Ie7832cc29e19a624328a1a96cffe313bf9f18a69
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476051
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-16 12:20:43 +00:00
Tomasz Kulasek
bd3244325c test/nvme: add cuse smartctl tests
Change-Id: Id6ed39a4e6c4d360111aea96f630bb678f5b306e
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475754
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-12-12 14:52:20 +00:00