Commit Graph

248 Commits

Author SHA1 Message Date
yidong0635
c947e87e46 nvme/deallocated_value: Fix scanbuild error on fedora30 with GCC9.
Scanbuild error on fedora30 reports:
warning: Array access (via field 'write_buf') results in a null pointer dereference
                if (context->write_buf[i]) {

In deallocated_value.c, cleanup function be used at many places to deal with failed
cases even context->write_buf is  NULL, so add context->write_buf pointer check before
array data. I think context->read_buf is the same.

This is related to issue #822.

Change-Id: I33c685fd732da820c1dfc861eb991b92b41caa29
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458736
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-06-26 08:06:13 +00:00
JinYu
2224554eec test/nvme: check_io after reset without setting long time
Make it easier to reproduce issue #819 without setting long time.
To decrease the UT time.

Change-Id: I3dd0268a894113e1a12395618721afee6137588d
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457914
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>
2019-06-26 04:18:50 +00:00
Darek Stojaczyk
887aff4d09 test: remove duplicated set -ex from tests
It's always set in autotest_common.sh, there's no need
to set it again in each test script.

Change-Id: Ib14c4189c553dad54a3065c1a1d413a5fc5a5347
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457466
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-19 03:54:58 +00:00
Tomasz Zawadzki
1bed9c1f1a test/asan: preload ASAN for fio
ASAN needs to be LD_PRELOADed before SPDK fio_plugin
in order to analyze its code.
Just adding that will report any issues in fio binary as
well as the fio_plugin.
To prevent known fio leaks from affecting the results,
a suppression list for LeakSanitizer (used in conjunction with ASAN).

At this time the suppression list contains known leaks
for fio 3.3. The list might need adjustments as fio
version is updated.

Side note. Even though it is possible to specify directory
to ignore ("leak:/usr/src/fio/"). Which in theory should
suppress any leaks in fio. It has side effect of hiding
SPDK leaks as well, since the fio_plugins leaks are
seen as coming from /usr/src/fio/ioengines.c.

See below for examples of each suppressed error:

Direct leak of 42 byte(s) in 4 object(s) allocated from:
    #0 0x7f9d52f3e320 in strdup (/lib64/libasan.so.5+0x3b320)
    #1 0x41f267 in get_new_job /usr/src/fio/init.c:490

Direct leak of 914936 byte(s) in 10397 object(s) allocated from:
    #0 0x7f74422e8ea6 in __interceptor_calloc (/lib64/libasan.so.5+0x10dea6)
    #1 0x46402e in log_io_piece /usr/src/fio/iolog.c:214

Direct leak of 608 byte(s) in 19 object(s) allocated from:
    #0 0x7f74422e8ca8 in __interceptor_malloc (/lib64/libasan.so.5+0x10dca8)
    #1 0x44c4e1 in add_to_dump_list /usr/src/fio/parse.c:1039
    #2 0x44c4e1 in parse_option /usr/src/fio/parse.c:1098

Direct leak of 173 byte(s) in 20 object(s) allocated from:
    #0 0x7f744227153d in strdup (/lib64/libasan.so.5+0x9653d)
    #1 0x44b50d in __handle_option /usr/src/fio/parse.c:718

Indirect leak of 111925528 byte(s) in 1271881 object(s) allocated from:
    #0 0x7f74422e8ea6 in __interceptor_calloc (/lib64/libasan.so.5+0x10dea6)
    #1 0x46402e in log_io_piece /usr/src/fio/iolog.c:214

Indirect leak of 171 byte(s) in 19 object(s) allocated from:
    #0 0x7f744227153d in strdup (/lib64/libasan.so.5+0x9653d)
    #1 0x44c4ed in add_to_dump_list /usr/src/fio/parse.c:1040
    #2 0x44c4ed in parse_option /usr/src/fio/parse.c:1098

Indirect leak of 167 byte(s) in 19 object(s) allocated from:
    #0 0x7f744227153d in strdup (/lib64/libasan.so.5+0x9653d)
    #1 0x44c502 in add_to_dump_list /usr/src/fio/parse.c:1042
    #2 0x44c502 in parse_option /usr/src/fio/parse.c:1098

Change-Id: I9b5811993508421be50b12af160645c77ea93d7e
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456315
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-18 03:40:50 +00:00
Karol Latecki
fb9c4ee651 test: replace backticks with dollar-parenthesis syntax
Scripts were using a mix of two approaches, lets unify that so
just dollar-parenthesis syntax is used.

Change-Id: Id093b6c82d1f766ba6af13bed720977eceaa7ffc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/457744
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-06-17 07:19:03 +00:00
JinYu
a298d77ccf test/nvme: fix printf param in deallocate_test()
stay the print parameter same with it in the deallocate_complete().

Change-Id: I21734f2b3097fd3a1006e390ab87b0578f0cbc2a
Signed-off-by: JinYu <jin.yu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458029
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-17 05:30:34 +00:00
Tomasz Zawadzki
3b9db6c403 test/fio: export single variable for running fio_plugins
This patch adds functions in autotest_common.sh,
fio_bdev() and fio_nvme() for their respective plugins.
It simplifies its usage throughout the scripts.

Additionally will help with expanding the fio cmd
line with nessecary changes only in single place.

This will be used in next patch in series to
LD_PRELOAD ASAN before fio_plugin.

Note: Did not implement changes for perf scripts,
since they are usualy run separately and didn't want
to affect those.
Similarly didn't change vhost initiator tests,
because the exported directories do not work for
inside the VM. Will need to think of a way to change it
there as well.

Change-Id: Idf750ee7aa9d5e30efc0ce430d15fa45ceccb203
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456314
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-06 05:17:16 +00:00
Jim Harris
a9b174e71e build: fix duplicate spdk.common.mk includes
mk/nvme.libtest.mk includes mk/spdk.common.mk, but all
of the Makefiles including mk/nvme.libtest.mk were
also including mk/spdk.common.mk unnecessarily.  So
remove the spdk.common.mk include from all of the
offending Makefiles.

This was relatively harmless, although it would cause
weird things like CFLAGS and LDFLAGS getting duplicated
when building.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/455321
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-22 14:51:01 +00:00
Jim Harris
cfd5ffb434 test/nvme: enable reset test for every patch
This test runs pretty quickly, so let's just enable
it per-patch.

While here, remove the commented aer test.  We are
covering aer in other parts of SPDK autotest.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453908
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-15 14:24:19 +00:00
Jim Harris
223a87b023 test/nvme: make reset test exit 0 on QEMU SSDs
There are some QEMU bugs with resets for NVMe emulation.
It simply hasn't been tested for this test's very
stressful reset scenarios.

Since this test is failing the nightly builds fairly
regularly on VMs, just have this test print an
error message and exit 0 when it finds a QEMU SSD.

This will also allow us to enable this test per-patch
in a future patch.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454517
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-15 14:24:19 +00:00
Jim Harris
c4f42bf953 test/nvme: disable error logging for reset test
This test intentionally generates lots of failed
requests - so disable logging for this test
application.

This should significantly reduce the number of
Jenkins java.io exceptions due to excessive logging
from this test.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/454082
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: Ben Walker <benjamin.walker@intel.com>
2019-05-14 13:51:44 +00:00
yidong0635
62966da34c test/nvme: Move ASAN check out of for loop
Check whether ASAN is enabled up front, before entering the loop over all PCI devices.

Change-Id: Iede6a0466014745b77190b79fb8255e7b61bb260
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/453512
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-08 21:27:05 +00:00
Jim Harris
ef6832ef56 test/nvme: kill stub with -9 when a failure occurs
This ensures the stub gets killed so that we can
make forward progress on collecting a backtrace.

This requires adding an optional parameter to the
kill_stub function to specify a signal.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452891
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2019-05-07 05:11:54 +00:00
Jim Harris
f5fbac9195 test/nvme: add file touch option to aer test
Tests can specify this new -t flag to tell aer to
touch the specified file after its ready to receive
an AER.

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

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452804
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-02 23:31:50 +00:00
Jim Harris
3d9f193624 test/nvme: add g_ prefix to aer global variables
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I41b9461f2f992a65c3a8906f3a5f7c9a743aa496

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452803
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-05-02 23:31:50 +00:00
Pawel Niedzwiecki
550d1b2e24 test/nvme: Add TC3 and TC4 to NVME performance test.
Nvme latency tests
IOPS vs. Latency at different queue depths

Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Change-Id: I1192a18fa05f36c74385d286e86db571d52b9224
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/424063
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-04-25 22:52:22 +00:00
Pawel Niedzwiecki
b1d3b47bfb test/nvme: Test case 1 and 2 of NVME performance tests
Measure Iops/core performance

Change-Id: I5c2632b45c62cadbd46a67a7284ece9f77b70902
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/423170
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-04-24 22:00:32 +00:00
Darek Stojaczyk
20f4a21d84 test/nvmf/nvme-cli: don't run nvme-cli as secondary process
nvme-cli in NVMf tests currently fails to initialize
the NVMe driver and exits straight away [1]. It expects
the primary process to initialize the driver first, but
since the primary process doesn't operate on any NVMe
devices, it doesn't initialize the driver at all.

Fix this by running nvme-cli without multi-process mode.
In NVMf tests, nvme-cli is only used to discover, connect
and disconnect from an SPDK NVMf target. It does not need
to access any shared memory resources.

This wasn't an issue before, because we used an outdated
DPDK version for nvme-cli which didn't detect any other
shared memory processes of SPDK.

[1] nvme.c: 337:nvme_driver_init: *ERROR*: primary process
is not started yet

Change-Id: Id56f94c6655049e87ab9d93ee38853faf40a11e5
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/442552
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-01-29 20:54:13 +00:00
Shuhei Matsumoto
9c8941f973 test/nvme: Improve error check of input parsing by spdk_strtol
Change-Id: I7ad159f7e7033e0249779a39faed92f94857aae7
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/441642
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
2019-01-29 17:39:18 +00:00
Darek Stojaczyk
eecc6dc8e6 memory: replace all hardcoded 0x200000 with a define
Makes the code slightly more readable.

Change-Id: Iebf8fb07bceacf433d4bdad0a30419a3faab7eee
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439370
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-01-13 00:47:26 +00:00
Seth Howell
00450d8a84 nvme/aer: unregister aer cb before detaching from ctrlrs
This will enable us to fail all outstanding I/O when disconnecting an
NVMe-oF qpair.

Change-Id: I84190a19da23ef2d88d9fc26e25b33bd0f364b0c
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/432211
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-12-23 00:59:42 +00:00
Shuhei Matsumoto
e303567bc1 util/crc16: Add init_crc parameter as seed value to spdk_crc16_t10dif
Add init_crc parameter as seed value to spdk_crc16_t10dif API to generate
a CRC value spanning multiple separate buffers.

This will be necessary for upcoming DIF/DIX patches.

Having init_crc parameter is general, and so change the existing API
without adding seed version of the existing API.

Change-Id: I0ac7919b18013967e41829dcedd3e4e73204d5d6
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/437204
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-12-18 17:28:56 +00:00
Ben Walker
8c89954d4b test: Sanitize log file
This patch removes the "sshpass -p intel" from the test logs. This
trips up security analysis tools which flag it (falsely) as a leaked
password.

Change-Id: Id8e470561429821e320cdf185c43204938110c75
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/436891
Reviewed-by: Paul Luse <paul.e.luse@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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-12-18 17:22:25 +00:00
Jim Harris
20c69bbc30 env: remove default pre-reserved memory size
Much of this was originally applied by Darek in
6f5840d22 but then had to be reverted due to NVMe-oF
MR issues in a817ccf5.  Now that the NVMe-oF MR issues
have been resolved, we can reapply these changes.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: I58d603523901c78dbc81279078a09b2a24c091e6

Reviewed-on: https://review.gerrithub.io/436547
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-12-12 11:00:57 +00:00
Darek Stojaczyk
a404d9aa23 test/nvme: sleep after mounting in the setup.sh test
Apparently there's a data race with the setup.sh script,
that may unbind the PCI device before the mount is visible.

Change-Id: I71a349a10a74e29405e3537c513f284acfbd39fb
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/435259
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-12-05 00:36:08 +00:00
Jim Harris
b4b7d5d3ff log: remove "trace" from public API
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I90e7d698cae7577736319e38f089e3b759c9beef

Reviewed-on: https://review.gerrithub.io/435343
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-12-03 19:50:15 +00:00
Darek Stojaczyk
a817ccf571 Revert "env: remove default pre-reserved memory size"
Apparently this patch revealed an issue somewhere in SGL
handling in NVMf initiator which is causing our CI to fail.
Let's revert it while we work on a proper fix.

This reverts commit 6f5840d225.
This is not a full revert, some app.c changes to the usage text
were kept unchanged.

Change-Id: Iddea5c2b9df50bd12ef8f6226165883f6622ab33
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432576
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Ben Walker <benjamin.walker@intel.com>
2018-11-09 18:31:45 +00:00
Darek Stojaczyk
6f5840d225 env: remove default pre-reserved memory size
Now that we utilize DPDK dynamic memory allocation, we
no longer need to set the default pre-reserved memory size.
It'll now be 0, which implies all memory will be allocated
at runtime.

The option to pre-reserve all hugepages on the system is
now only available on BSD, so also clarify that bit in the
app usage text.

Change-Id: I5a8a1d9bf14ad6d938532d7e6254a45e4a81bb92
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432204
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-11-08 23:07:32 +00:00
Pawel Wodkowski
34387cccec mk: introduce ldflags print target
This is inspired by pkg-config dicussion for SPDK packaging. For now it
used during nvme-cli building to remove greps on current configuration
just to discover proper LDFLAGS.

Change-Id: I18b3e7690dc27b8c418cb897e57e224850fa7435
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/428335
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-16 12:40:43 +00:00
Pawel Wodkowski
461cfcecc6 CONFIG: add missing CONFIG_ options
Also fix options that doesn't start with CONFIG_ prefix.

Change-Id: I32a24373328bab8f513d56c0c09b5a86589f690c
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/427767
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-10-04 21:31:42 +00:00
Paul Luse
51606ed402 bdev: Add crypto virtual bdev module
Initial support for softare AESNI_MB DPDK driver only.

Have tested (both aesni and QAT seprately and concurrrently) on underlying NVMe devices
with bdevio and a bdevperf script that runs IOs from 512B to 128K each with Q depths from
1 to 512 in powers of 2 for 30 seconds each run.

QAT can be included in the code (but not makefile) and marked as experimental
until we are ready to test in CI.  It works well on 2 systems but is a big PITA to get
the hardware setup and configured for use with DPDK (IMHO).

Change-Id: If518c3df8e74e00efa18afdf194824c5e69778fc
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/403107
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-09-17 21:23:14 +00:00
Seth Howell
c58d3c445b mk: Add all external libs to sys_libs
This allows us to better distinguish between external and internal libs.
This series is aimed at fixing github issue 434
Change-Id: I2ed141f909e7c4a800df02061007b0d23da25380
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/425434
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-14 22:56:46 +00:00
xuhuagen
785f602541 test: fix typos in the test directory
Change-Id: I362077d578e6b0e0e2ac5ae38e49488c4b64d417
Signed-off-by: xuhuagen <huagenx.xu@intel.com>
Reviewed-on: https://review.gerrithub.io/423496
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-27 19:39:31 +00:00
WangHaiLiang
4df8ba86f2 nvme/overhead: fix a memory leak issue
Fix issue #393.
The memory is not completely released, there are mutiple malloc
list, but only the last one is released. So I free all.

Change-Id: I14a583871811b54017728b6a7e92982cd75bd6b1
Signed-off-by: WangHaiLiang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/422682
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-08-21 16:52:59 +00:00
Dariusz Stojaczyk
b5616804dc perf: cleanup cmdline params for consistency
'-s' option is usually associated with the memory size,
but our ioat/perf and nvme/perf use it for io size.

To keep those consistent:
 '-s' option (io size) was be changed to '-o'
 '-d' option (mem size) was be changed to '-s'

Change-Id: I97cef4c0a4e6e902277dd50dfb43bde420a6427e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422654
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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>
2018-08-20 16:28:01 +00:00
Changpeng Liu
8d127f780b test/nvme/reset: exit the test if no controllers avaiable
Fix the issue #386.

Change-Id: I2d7434d6204a7f074f985584fb18b4f5f1f23f5c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/421070
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-08-06 23:38:48 +00:00
Changpeng Liu
3599aa1093 test/nvme: exit error injection test when no controller
Fix the issue #383.

Change-Id: I18bd86b5331650c24d5d76ecb1aa40f5e7061d01
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/421071
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-08-06 21:15:28 +00:00
Pawel Wodkowski
848daf274b log: add backtrace option
Add '--enable-log-bt=lvl' option to show simple backtrace in following
form:

thread.c: 346:spdk_io_device_register: *ERROR*: io_device 0xf2ef80
already registered
*ERROR*: === BACKTRACE START ===
*ERROR*:   1: spdk_io_device_register() at 0x6d64df
*ERROR*:   2:  spdk_copy_engine_initialize() at 0x71059c
*ERROR*:   3:   spdk_copy_engine_subsystem_initialize() at 0x572ed0
*ERROR*:   4:    spdk_subsystem_init_next() at 0x6ca756
*ERROR*:   5:     spdk_subsystem_verify() at 0x6caba7
*ERROR*:   6:      _spdk_event_queue_run_batch() at 0x6c1ffa
*ERROR*:   7:       _spdk_reactor_run() at 0x6c5349
*ERROR*:   8:        spdk_reactors_start() at 0x6c784f
*ERROR*:   9:         spdk_app_start() at 0x6bf18e
*ERROR*: === BACKTRACE END ===

This adds additional libunwind dependency so don't enable by default.

Change-Id: Ice93d7571a000d8a57d2fedda7670c9a0b6ff7b7
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/419726
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-07-25 15:48:25 +00:00
John Meneghini
f04277f0bf test: remove more sys_sgsw dependencies from test scripts
- To override the default /home/sys_sgsw dependency
   add DEPENDENCY_DIR to ~/autorun-spdk.conf

  E.g.: DEPENDENCY_DIR=/home/vagrant

 - To override the default HUGEPAGES use
   add HUGEMEM to ~/autorun-spdk.conf

  E.g.: HUGEMEM=1024

Change-Id: Ib8db9d7d053ae319fe4c725159742875468d47f0
Signed-off-by: John Meneghini <johnm@netapp.com>
Signed-off-by: Ed Rodriguez <ed.rodriguez@netapp.com>
Reviewed-on: https://review.gerrithub.io/415907
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>
2018-07-02 21:32:39 +00:00
Changpeng Liu
c391fed3e1 nvme: add nvme error injection support
Users can set specified Admin commands or IO commands with
error status, when submitting new commands which are already
set with error status, the commands will return to the caller
with specified error code. So that users can emulate some error
status for their error condition code path.

Change-Id: I4b93c7e4f2b15a659da73b39e26bfa162eb5214e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/410870
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-22 17:26:34 +00:00
Ziye Yang
8f26b74e02 examples: make debug flag option consistent
Will change -t to -L

Change-Id: Ie04edf1fd3877b36fde1bae66a84de29f6617bbf
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/415947
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>
2018-06-21 05:18:53 +00:00
Jim Harris
269a479064 nvme/overhead: fix segfault when no SSD found
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I862a7eb89d6357c85285d2a6cd90ad9f633d2435

Reviewed-on: https://review.gerrithub.io/413285
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-04 03:28:19 +00:00
Jim Harris
cf6ee25359 nvme/overhead: remove extra spdk_get_ticks()
The check_io function always calls spdk_get_ticks() -
so return that value to the work_fn for checking
when the test is complete, rather than have work_fn
call spdk_get_ticks() again.  This eliminates an
extra rdtsc call that counts against the completion
path.

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

Reviewed-on: https://review.gerrithub.io/413152
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-01 21:01:42 +00:00
Jim Harris
95e9846781 nvme/overhead: relax ordering around spdk_get_ticks
The Intel SDM clearly states that only an lfence (not
an mfence) is needed to ensure rdtsc is executed before
subsequent instructions.  So change spdk_mb calls
to spdk_rmb to avoid overhead related to the unneeded
part of the fencing operation.  This provides a more
accurate view of the overhead of both the SPDK and
kernel NVMe drivers.

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

Reviewed-on: https://review.gerrithub.io/413148
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-01 21:01:42 +00:00
Jim Harris
4f0c061d08 nvme/overhead: fix typo
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia7ecef4c68815259f412be9f45c631833fb5790f

Reviewed-on: https://review.gerrithub.io/413147
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-01 21:01:42 +00:00
Changpeng Liu
e9ee09f153 test/nvme/aer: add changed namespace list log test
Change-Id: I2cc6c494bacbeec1ba725b4b3d78a1f4a2ed39d1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/406166
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>
2018-04-11 16:05:09 -04:00
Changpeng Liu
64f9b729d5 test/nvme/aer: add an option to enable temperature tests
Refactoring the existing AER test code which add an option
to enable temperature tests of AER, this will enable coming
patch which add Namespace attribute notice tests support.

Change-Id: I514a1d6d0d3aacf4e207fb437406b5cf048f2a71
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/406026
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>
2018-04-09 16:36:06 -04:00
Seth Howell
8c5de263a1 test: move lib/nvme up one directory
Change-Id: I40c29b30c7098e34f2aa860612eeb82f2fb01ff3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/404974
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>
2018-03-27 00:46:52 -04:00