Commit Graph

994 Commits

Author SHA1 Message Date
Karol Latecki
0abf67ce31 test/vhost: add vhost block option to fiotest
Allow running VMs in fio tests with vhost-block instead of
vhost-scsi.

Change-Id: I89ee437264ddcda0aaefdb71744cee6ce7d451d8
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/365808
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2017-07-10 19:18:16 -04:00
Daniel Verkamp
b509410cb1 nbd: add -t tracelog flag support
Adjust the usage() output so it matches the spdk_tracelog_usage() style.

Change-Id: I2555b7587ebb9a891a08412f045d94f980cd1255
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/368802
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-07-10 18:36:00 -04:00
Ben Walker
58b9ea3ac0 nvme: Simplify the multiprocess tests
Nearly all tests now make extensive use of the stub application,
so they're effectively all testing multiprocess all the time.
Further, we believe it to be the best policy to not attempt
to support scenarios where the primary process crashes unexpectedly.
We consider this equivalent to a kernel panic and all of the
processes will need to be halted and restarted.

Given the two things above, we can make some fairly dramatic
simplifications to the NVMe multiprocess testing. Only
one piece of functionality - multiple simultaneous secondary
processes - was not already tested by the other regular
tests. This patch removes all other multiprocess tests
and adds a simple test of multiple secondaries.

Change-Id: If99f85913b99862f02c3815ea7c10cd80ea3ce02
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/368208
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>
2017-07-10 17:25:53 -04:00
Daniel Verkamp
782b0f1a75 bdev/gpt: dump partition type and unique GUID
Change-Id: Ibb28b8432c94e70f522bdf34c5f4a10e4c25a8bb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/368610
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-07-10 15:36:52 -04:00
Daniel Verkamp
17c5ef7ab0 bdev/gpt: fix UUID/GUID typo
These are UEFI-style GUIDs in little endian byte order, not standard
UUIDs.

Change-Id: I4d61afa2901830c784c24a5e039bba1d98f32e62
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/368609
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>
2017-07-10 15:36:52 -04:00
Daniel Verkamp
1c9e37f71d bdev/gpt: SPDK GUID should be in partition type
Fix the partition type GUID comparison to actually look at the partition
type GUID, not the unique per-partition GUID, and fix the test to match.

Change-Id: Ie64f1effcc75883f17ccf6240f6469161d2a5aa5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/368606
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-07-10 15:36:52 -04:00
Isaac Otsiabah
6fb1ce422e update_firmware: Allow option to download and enable firmware image.
Support both SPDK_NVME_FW_COMMIT_REPLACE_IMG and SPDK_NVME_FW_COMMIT_REPLACE_AND_ENABLE_IMG.
Return code will specify if conventional reset is required.
For now, return error if subsystem reset is required.

Change-Id: I41a05675a210dd0bbf170517b32ee9e05da9a797
Signed-off-by: Isaac Otsiabah <iotsiabah@us.fujitsu.com>
Reviewed-on: https://review.gerrithub.io/367287
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>
2017-07-07 17:12:57 -04:00
Ziye Yang
7d101fe6c6 blockdev, nvme: Test parsing device exported by NVMe-oF in conf
Change-Id: I9fbb1dc5a487323af099d08ab466fc811f7be79e
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/366703
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>
2017-07-07 13:23:24 -04:00
cunyinch
f2b26eb113 bdev/error: Add support of "reset" for error injection bdev module.
Change-Id: If4cd8392a958eff7bda424b4bde3d48d833cef40
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/363682
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>
2017-07-06 15:02:06 -04:00
Daniel Verkamp
2bdec64fbf jsonrpc: modify API to pass request to handler
This will enable asynchronous request handling in a future patch, and it
also removes the need for the RPC handlers to know about request id and
the JSON-RPC rules about notification-only requests.

Change-Id: I25aaa8e48bff8d5594ffcccecb61842b1e31ec3c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/368225
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>
2017-07-06 13:48:12 -04:00
Ziye Yang
26d6770f1c GPT: add GPT bdev support
Change-Id: I6a138e1c1d775e8c8bfeede9600f8b0f799ecdad
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/362445
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>
2017-07-06 13:44:37 -04:00
Ziye Yang
5d12c41586 nbd: Add bdev_rpc lib
Add this lib, we can support rpc for bdev module

Change-Id: I21275c14c06787b6c0639170e52f08cae9ae3154
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/368283
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>
2017-07-06 13:44:37 -04:00
Ben Walker
ad474e95bb log: Remove configurable log facility
Always use "Local7" internally. We want the log API
to be generic instead of syslog specific.

Change-Id: I021f719e90c236f123fa1cadebc0c199b87ba077
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365295
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>
2017-07-05 19:28:29 -04:00
Daniel Verkamp
cbe5074056 test/nvme: fix "ExIT" typo in trap statement
Change-Id: Ia9ea94a1dc4e583710374d453302319aa59ce62a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/368206
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>
2017-07-05 18:49:02 -04:00
Jim Harris
57d174ff67 bdev: add spdk_bdev_open/close
Retire the old claim/unclaim semantics in favor of
open/close.  Clients must now open a bdev to get
an spdk_bdev_desc, then pass this desc to get an
I/O channel.

This allows multiple clients to open a bdev,
although only one may open a bdev with write
access.

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

Reviewed-on: https://review.gerrithub.io/367611
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>
2017-07-05 18:04:28 -04:00
Dariusz Stojaczyk
57f9221fab scsi: added spdk_scsi_dev_has_pending_tasks()
Added new function in preparation to implementing device hotremove.

Change-Id: I5b85f76f543b882acf3b0fe40c9e92125594b257
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/366725
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>
2017-07-05 17:11:55 -04:00
GangCao
5066e52d63 nvme: subnqn is case sensitive and update the unit test
Change-Id: I43337b4a51cb2008737ed9a9691707a9bfb04c5c
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/367146
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>
2017-07-05 16:09:20 -04:00
Paul Luse
6052d9a432 nvme.sh: add delay after app startup when they are primary
A short delay is required between starting up a primary and
secondary process with DPDK depending on what the secondary
depends on wrt the primary. As the SPDK sample apps are not
designed to be dependent on each other, when we use them
as primary/secondary in test scripts with no deterministic
synchronization, it is possible for one ore more to hang
resulting in DPDK fatal init failures. Often times this would
show up as a failure to get hugepages in vtophys

A related fix, same failing signature in the same test script,
is also included here where the stub app, which is designed
to act as primary in certain sections of the test script, was
being killed by the test script but the next primary app was
coming up before the process was dead and coming up as a
secondary. A wait was added to assure that the stub process is
gone before the next app tries to start.

Change-Id: If2f6fc25e76b769ad8edafa8e965be246e98dab9
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/367725
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>
2017-07-05 15:40:10 -04:00
Daniel Verkamp
12d75f6323 mock: move MOCK_SET{,_P} semicolons to call sites
This makes them look more like regular function calls and keeps the
coding style consistent.

Change-Id: I019980bb381abb0dec0aae041340a44bbffe23f3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/368205
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-07-05 15:36:49 -04:00
Jim Harris
7f6c737a25 bdev: add virtual to base bdev relationships
Each virtual bdev now has a pointer to its base
bdev, and a base bdev has a pointers to any virtual
bdevs built on top of it.

Also add a new set of leaf iterators, to get only
bdevs that have no virtual bdevs built on top of
them.  These iterators are now used by the bdevio and
bdevperf utilities, in advance of the claim/unclaim
semantics getting removed in a future patch.

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

Reviewed-on: https://review.gerrithub.io/367610
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>
2017-07-05 15:09:46 -04:00
Jim Harris
4ee51dcbc7 test: add unit test framework for bdev.c
No actual tests in this patch - just getting the
framework in place including necessary stub
functions to get the bdev.c unit test file to link.

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

Reviewed-on: https://review.gerrithub.io/367625
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>
2017-07-05 15:09:46 -04:00
Daniel Verkamp
b0e128db3d nvmf/rpc: add adrfam to listen address
This allows the user to optionally specify the address family for
construct_nvmf_subsystem (default is IPv4).

Note that the RDMA transport still only supports IPv4 because of the way
it binds to the listen address; this will be fixed in a separate patch.

Change-Id: I534ed75f6f81e53559d1bebcd2f34f1a2b210a97
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367429
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-07-05 13:01:20 -04:00
Tomasz Zawadzki
ca2a1f291f json/test: remove executable permisions on unrelated files
This patch removes executable flag from couple files
that should not have it.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib4287ec3763a4187a756c18845c61d8b50729820
Reviewed-on: https://review.gerrithub.io/368042
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-07-05 12:08:05 -04:00
Paul Luse
043d541132 tests: macro-ize the creation and use of wrappers and stubs
Includes macros for wrappers (for syscalls) and stubs
(for SPDK functions) including an example of syscall
wrapper as well as a stub with both pointer and non
pointer values.

Change-Id: I9b19d81d5b9cbf2bbb327f58dbf985b3b253e800
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/366348
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>
2017-07-05 12:00:34 -04:00
wenzhong wu
b5e9e92934 test/lib/nvmf/direct: test function direct_ctrlr_admin_identify_nslist
Change-Id: I3fc2c2c76ec6046120b6aa784659e5faedc24b1d
Signed-off-by: wenzhong wu <wenzhongx.wu@intel.com>
Reviewed-on: https://review.gerrithub.io/361887
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-30 17:44:03 -04:00
Dariusz Stojaczyk
72343bcf23 scsi: added lun hotremove callback
Added optional callback inside scsi lun hotremove, so that higher-level
abstraction can be notified about hotremove.

Change-Id: I5f1bd8160e3d770a484068dd73928bc2b64c876f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/367309
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>
2017-06-30 16:32:47 -04:00
Daniel Verkamp
8486e38d4a nvmf/rpc: add trtype alias for transport names
Use "trtype" to represent transport types in nvmf_tgt RPCs for
consistency with the NVMe-oF spec and other SPDK RPCs.

The current "transport" names are still supported for compatibility with
existing RPC users.

Change-Id: Ib03dda384dc01a41a18c06c56baff16b82d36c00
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367422
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>
2017-06-30 12:43:18 -04:00
Daniel Verkamp
37a7ff0fd7 nvme: add API to convert trtype and adrfam to string
Also add adrfam to the NVMe bdev JSON config output.

Change-Id: I9472bda04947cffc0df9b02eba0035bac01b7d7b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367292
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>
2017-06-30 12:43:18 -04:00
Daniel Verkamp
dbbde9991d test/bdev/nbd: allow building with old kernels
Older kernels do not support flush or trim operations; add #ifdefs to
allow the NBD test code to work on those kernels.

Fixes build on older distributions (e.g. CentOS 6).

Change-Id: Iae06f96b7db9a3bf4a494e2b2c2c15b37e6c1293
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367132
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-06-29 16:51:12 -04:00
Seth Howell
b3022e129d test/nvmf: Replace hard coded references to NVMF_FIRST_TARGET_IP.
Change-Id: Icb40afb76cef9a1aca5796b2bb5c1f307ee9a5e3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/367289
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>
2017-06-28 14:02:30 -04:00
Daniel Verkamp
144ba3a1cb test: move iSCSI unit tests to test/unit
Change-Id: Ibe282aa67de22e062de9d88c3b157c766be9dfae
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366910
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>
2017-06-28 13:10:27 -04:00
Daniel Verkamp
9fa2762711 test: move log unit test to test/unit
Change-Id: Ib62195660d64331eac56e2c01b68f445f4b3d2bb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366907
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>
2017-06-28 13:10:27 -04:00
Jim Harris
4b468d7c9b bdevperf: create task buffer pool after enumerating targets
This ensures we have calculated the correct minimum
buffer alignment before allocating the buffers.

Fixes issue reported by Ziye Yang that bdevperf did not
work with AIO bdev backend.

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

Reviewed-on: https://review.gerrithub.io/367291
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-28 13:06:37 -04:00
Daniel Verkamp
255d0e529c test/iscsi/param: fix declaration after statement
Change-Id: I5906e132636d9d246d625e884af693cbb672f44f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367124
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>
2017-06-27 13:57:06 -04:00
Daniel Verkamp
6d4147c2de test/unit/json_util: initialize output object
Make sure all fields are zero initialized in output before passing it
to spdk_json_decode_object().

Change-Id: I8a534777491445a31459cd5b676850342a77fb61
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367112
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>
2017-06-27 13:57:06 -04:00
Daniel Verkamp
16fb6ba93b Revert "test/blobfs: use test stub"
Temporarily disable stub usage in the RocksDB test until we diagnose the
cause of the intermittent test failures (no hugepages available).

This reverts commit 6bd7c5b42c.

Change-Id: Ie0eca36c3a15708d2483bae32ce2e217036d2b1d
Reviewed-on: https://review.gerrithub.io/367263
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-27 13:52:15 -04:00
Liang Yan
097352282f test/blobfs: test long file name when opening file in async mode
Change-Id: If5ebe2fba160d0c215f638a80dbeece1440a7cb5
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/365108
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>
2017-06-26 13:44:35 -04:00
Jim Harris
f316c38783 test/bdev: add nbd test app
This utility enables accessing an SPDK block device
through the kernel using NBD (Network Block Device).

This can be helpful for running utilities like
parted on an SPDK block device for testing upcoming
GPT support.

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

Reviewed-on: https://review.gerrithub.io/366490
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>
2017-06-23 13:01:04 -04:00
Daniel Verkamp
0ac06e088b env: extend PCI address domain to 32 bits
In some cases (for example, Intel VMD or Microsoft Azure), the PCI
domain may be larger than 16 bits.  Extend the domain field of struct
spdk_pci_addr to 32 bits to accomodate this.

Note that equivalent changes must be made in DPDK's struct rte_pci_addr
for larger domains to actually work.

Change-Id: I21c4666a68bc8a4aedfcc82b44042c02734246de
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366520
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: Cunyin Chang <cunyin.chang@intel.com>
2017-06-23 11:20:05 -04:00
Jim Harris
fa3dd136d0 test/app/stub: remove sentinel file on shutdown
Rather than manually adding signal handlers, just convert
the stub app to use the event framework and use its
shutdown handler.

Still rm -f the sentinel file in the autotest_common.sh
kill_stub function, although it really isn't needed
anymore.

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

Reviewed-on: https://review.gerrithub.io/366545
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>
2017-06-23 11:02:04 -04:00
Jim Harris
5b3bc8bd6e Revert "blockdev, nvme: test parsing device exported by NVMe-oF in conf"
Seeing some intermittent test failures in the test pool related to this
patch.

This reverts commit 8912fc193f.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie81efec005da6b0d1074e8ecc073027b5d7fd7a8
Reviewed-on: https://review.gerrithub.io/366696
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>
2017-06-22 19:05:24 -04:00
Ben Walker
4185205540 scsi: Remove cb_event. It is no longer necessary.
This is an artifact from a past design. There is no longer
any reason to create an event here - the bdev layer will
correctly queue events and call completions on the correct
thread.

Change-Id: I145dab4046899834c0449ec7380dcbb28215b493
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/364831
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>
2017-06-22 10:47:31 -04:00
Karol Latecki
ae2932c9b4 test/vhost: change vm_kill_all to vm_shutdown_all
Change killing VMs with SIGKILL to proper shutdown.

Change-Id: I3547f1b57e33dc5ecd7613d7600e9feeadd44283
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/366087
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>
2017-06-21 19:03:35 -04:00
Ziye Yang
8912fc193f blockdev, nvme: test parsing device exported by NVMe-oF in conf
Change-Id: Icc10071d471c9b1063d1d9d3e3f6c5a103a60e48
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/366043
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
2017-06-21 19:02:49 -04:00
Daniel Verkamp
728d001395 test: move blob library unit tests to test/unit
Change-Id: I151672e49c442dc1420b5ef6b5a6a47eb78e7464
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366517
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>
2017-06-21 18:57:35 -04:00
Daniel Verkamp
a4a8c40fe2 test: move IOAT library unit test to test/unit
Change-Id: I9b4ec6cf5a936c081be4a0ea6caea8a085765413
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366516
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>
2017-06-21 18:57:35 -04:00
Daniel Verkamp
70318fd2e6 test: move NVMe-oF library tests to test/unit
Change-Id: I363c5865d96af60ad6314b2e05d13c50f30d4002
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366167
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>
2017-06-21 16:51:12 -04:00
Daniel Verkamp
fe13f87926 test: move NVMe library tests to test/unit
Change-Id: I9fda95d47a6d7a5ad94de438805d88961ceef8cf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366166
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>
2017-06-21 16:51:12 -04:00
Daniel Verkamp
6f7bf9314b test: move JSON-RPC tests to test/util
Change-Id: Ib394f110f59df32daf8ac00d54635827a1443369
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366164
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>
2017-06-21 16:51:12 -04:00
Daniel Verkamp
50ff9de715 test/nvme/aer: clean up and simplify AER test
The NVMe AER test tries to submit a large number of Get Features
commands during the test cycle to ensure that admin queue wraparound
works and other commands can be issued while still handling AERs
correctly.  However, it tried to do this by submitting all of the Get
Features commands up front, which runs out of admin queue nvme_request
objects.

Change the test to submit one Get Features command per device and
resubmit it as it completes until the test is over.  This exercises
the queue wraparound case without submitting a large number of requests
at once, and it also simplifies the test code.

Change-Id: I7cf865b6a8d821f62bba3d889cd21fc929a4d484
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366149
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>
2017-06-21 14:04:14 -04:00
Daniel Verkamp
2d34864a61 nvmf: stub out Abort command support
Add handling of the Abort command in virtual subsystems.  This doesn't
actually abort any requests - the spdk_nvmf_request_abort()
implementation just fails all abort requests - but at least this gives
us a place to hook up actual abort handling later.

Change-Id: Iafaa393c6f9e7f404af91747cbd81c64ab4810bb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365905
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>
2017-06-20 20:03:01 -04:00
Ziye Yang
ee368e7b81 Autotest: Enable ASAN if there is asan lib
It seems that asan does not work well with:
(1) Valgrind. If asan is enabled, we do not use valgrind.
(2) Spdk fio plugin. If asan is enabled, we cannot work
with it even with the suggestion by using LD_preloads.
(3) Hotplug. If asan is enabled, it catches the SEGV earlier
than our defined handler

Change-Id: Id4bd5ae0f545aaba7d028e3da14fdddc18682429
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/364917
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>
2017-06-20 18:00:15 -04:00
Ben Walker
c9f8765a69 scsi: Move event subsystem initialization to event_scsi
This removes the event framework dependency from the
scsi library entirely.

Change-Id: I73546d06721487f86c4c6a3be24474a5677bdb41
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365728
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>
2017-06-20 16:58:35 -04:00
GangCao
619ab1a700 nvme: no need to send abort notification for died application
Change-Id: I7005159b2c4cc71c249cfdc4adbf8500f006fb1c
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/365646
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>
2017-06-20 15:43:21 -04:00
Daniel Verkamp
d57bf4cc82 test: move JSON library unit tests to test/unit
The jsoncat test tool is left where it is (test/lib/json/jsoncat) since
it is not a unit test.

Change-Id: I3d7dd9786c271dcd4e4002a05c3d0618c807e5d6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366162
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>
2017-06-20 13:46:07 -04:00
Daniel Verkamp
8b0f2ad4f3 test: move SCSI library unit tests to test/unit
Change-Id: I0971d9c32b05c00d43fc6abd33cbe1af5649f6d9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366161
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>
2017-06-20 13:46:07 -04:00
Daniel Verkamp
a9c37fd366 test: move SCSI/NVMe translation test to test/unit
Reorganize the scsi_nvme.c unit test to where it ought to be (the file
is in lib/bdev now, not part of the SCSI library).

Change-Id: I83fd9e1bf2a2644eea2508334362f70ed8e6ad2b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366160
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>
2017-06-20 13:46:07 -04:00
Daniel Verkamp
e37b070a2e test: move lib/util unit tests to test/unit
Change-Id: I3f5bc75913dc9c8ec19911f48661026cccf10780
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/366159
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>
2017-06-20 13:46:07 -04:00
cunyinch
c80e7df5c3 test/nvme: optimization of hotplug script.
Change-Id: I167faf4daf04e50b7cb74a90cfeaa0f7a78a113a
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/366032
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>
2017-06-19 17:22:54 -04:00
Daniel Verkamp
a4381cfe31 test: begin moving unit tests into test/unit
This is a proposal to make the distinction between unit tests and other
kinds of tests clearer.

All unit tests will be gathered under test/unit/<dir>/<filename>.

Change-Id: I52a3cc40928c33374e8f423a4c926a150de20b1b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365492
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>
2017-06-16 16:43:48 -04:00
Ben Walker
235a8e377e log: Rename, document the open and close calls
Name them spdk_log_open and spdk_log_close, and give them
API documentation.

Change-Id: I6c2bbdd6a32894c1e030ec70a97dc054cd7102a9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365292
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-16 16:15:06 -04:00
Ben Walker
dda26fba8b log: Change priority to generic log level
The log priority was very syslog specific. Instead, create
a generic set of log levels as an enum.

The log level/priority isn't actually used anywhere today.

Change-Id: Iebcf6b7e1b263b56f317b86b5f2ea0d9e45170f3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365267
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>
2017-06-16 16:15:06 -04:00
Jim Harris
5dff1923b6 test/nvme: use stub to accelerate test time
For now, just hardcode the shm_id to 0 for any test apps
that currently do not support command-line arguments.

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

Reviewed-on: https://review.gerrithub.io/365732
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-06-16 15:27:13 -04:00
Ziye Yang
d939572ab3 event/env: remove dpdk_ prefix
Remove dpdk_ prefix in spdk_app_opts and spdk_env_opts

Change-Id: I6f231f67072b808e84945d41b1fe31a180beb350
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/365787
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>
2017-06-16 14:20:26 -04:00
cunyinch
22f65e474d test/nvme: detect the online NVMe devices before the setup.sh.
This patch remove the fixed delay time before the setup.sh, make sure the test
could keep go on as soon as all the NVMe devices get online.

Change-Id: I42b49f9b1dc79690aabb3f1a855fecf28a570aba
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/365742
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>
2017-06-16 14:06:14 -04:00
Jim Harris
4f2d6a2fc9 Revert "test/vhost: reenable resets"
This reverts commit 28db2ce082.

Even with latest changes, there are still some intermittent
failures in the CI test pool.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I16649fe8e161dc7791fe9e79c48ebe1806f61d5f
Reviewed-on: https://review.gerrithub.io/365873
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>
2017-06-16 13:46:24 -04:00
Ben Walker
674de77551 rpc: Add a separate subsystem library
This separates the RPC library from the event framework.

Change-Id: I26a9cb318b56d44ec9337f8a4db98967eb87ad95
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365283
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-06-16 13:10:26 -04:00
Ben Walker
4808ff7957 copy: Create a separate copy subsystem library
This removes the strict dependency on the SPDK
event framework.

Change-Id: Ie6b6f9585d09ab1df0f25bf33d53e7cdecd83faa
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365281
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-06-16 13:10:26 -04:00
Ben Walker
4c0eaac47a bdev: Create a separate bdev subsystem library
Much like bdev modules inside the bdev directory,
add a subsystems directory inside of event. The subsystem
specific code for the bdev library is placed in to
a separate library in that directory, breaking the
strict dependency of the bdev library on the event subsystem
code.

Change-Id: I255941b823a9ec3e2d62f22a586414949d8ff5ad
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365055
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-06-16 13:10:26 -04:00
Daniel Verkamp
a0a41eefb1 nvmf: allow inactive namespaces in virtual mode
Now that virtual mode namespaces can be chosen arbitrarily, there can be
holes in the ns_list.  Make sure all of the virtual mode code paths are
prepared to handle these inactive but valid NSIDs.

Change-Id: I0d70fd9dae37a29a8358e1d38dcc6cac3237fd9a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365717
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>
2017-06-16 12:48:38 -04:00
Jim Harris
28db2ce082 test/vhost: reenable resets
Recent commits have drastically improved the reset handling
for cases where multiple bdevs are muxed onto a lower bdev
(i.e. split module on top of nvme).

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

Reviewed-on: https://review.gerrithub.io/365715
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>
2017-06-15 19:51:27 -04:00
Ziye Yang
356e2ab20f event: remove spdk_app_init
In this patch, spdk_app_init will be merged into
spdk_app_start.
Due to this change, we need to change event_perf
to use spdk_app_start, since we cannot use spdk_app_init
anymore. So the related changes for event_perf is to
make it work with reactor framework.

Change-Id: Id67edf209fd628cca361a499068c93aeedfe6167
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/364153
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>
2017-06-15 18:26:52 -04:00
Daniel Verkamp
f65731c47e nvmf: allow caller to pick NSID when adding ns
Change-Id: I1ea22fd3f56a3c048e25dead986992c848cf37b1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365508
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Sriram Popuri <sgpopuri@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-06-15 16:52:31 -04:00
cunyinch
ff9c4b9a6e test/nvme: Increase the run time of hotplug.
Since we have increase 5s delay between insert device and setup.sh,
we also increase 5s for the run time of hotplug just make sure the
application will not exit before the hotplug actions.

Change-Id: If020824373ba82ccd1bc743993c5ddbcc50c6d0c
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/365529
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>
2017-06-15 13:50:12 -04:00
Paul Luse
be74ecf79a test: add one unit test showing example of ut_mock wrap
This patch shows how to use the spdk_mock library which now only
consists of --wrap capability for a few functions.

Next will be a patch that provides a generic mock capability to
use either the --wrap feature or a combination of globals and
stubs to make adding more UT easier wrt mocking. After that is
in place nvme_ut.c will be updated to use the new library for
all mocking.

Change-Id: I1a6ffb722da043bb70bd4cfe1afa7c5e39a0fccb
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/365074
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>
2017-06-15 13:46:19 -04:00
Daniel Verkamp
8025dee513 test/nvme/hotplug: delay before running setup.sh
Make sure the guest kernel has time to enumerate the new PCI devices
before running setup.sh during insert_devices().

Change-Id: I9e1288882b59e0cf44afc0c50668302886594c23
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365494
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>
2017-06-14 16:36:08 -04:00
Jim Harris
d46f502999 test/vhost: temporarily remove vhost reset testing
These tests are failing intermittently.  Removing these
for now while we continue to debug.

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

Reviewed-on: https://review.gerrithub.io/365496
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>
2017-06-14 16:29:34 -04:00
Jim Harris
7d93868a5e test/nvme: cleanup overhead output
Do not print out the raw TSC totals, and convert
the TSC values to nanoseconds so the user does not
have to do that manually.

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

Reviewed-on: https://review.gerrithub.io/365266
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>
2017-06-14 14:20:03 -04:00
Jim Harris
ef3d6d9824 test/nvme: add histogram to overhead test app
Also add the nvme.sh test script to enable this new histogram
when running the overhead tool.

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

Reviewed-on: https://review.gerrithub.io/365265
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>
2017-06-14 14:20:03 -04:00
cunyinch
73b2cdd1ba test/nvme: Fix the SIGILL when test hotplug in Qemu.
Make sure we have sufficient memory for VM because we will
reserve 1024 2M hugepages for SPDK.

Change-Id: I7c4d10b00e29886804c2b8810234bad1f5b4afdb
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/365312
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>
2017-06-14 12:21:25 -04:00
Jim Harris
7b7799bf9c fio_plugin: switch to LD_PRELOAD instead of dynamically loading
fio has a race between reap_threads() and free_ioengine().  free_ioengine()
will call the ioengine's cleanup routine and then dlclose it if it
is dynamically linked (like the spdk fio plugin).  free_ioengine() does
not set td->io_ops = NULL though until after dlclose() is complete.  If
reap_threads() tries to dereference td->io_ops after our plugin has been
closed but before io_ops was set to NULL, it will segfault.

Solution (until an upstream fio fix is available) is to use LD_PRELOAD
instead.

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

Reviewed-on: https://review.gerrithub.io/365272
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: Ziye Yang <optimistyzy@gmail.com>
2017-06-14 11:12:29 -04:00
Daniel Verkamp
c7e5d9f1b7 test/blobfs_sync: prevent local variable address escape
Make sure the global request pointer is not pointing at the local req
variable when we exit the function.

Change-Id: If0df4fdc3ca013e324b65b81f3f11ba3ff34f108
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365070
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-06-13 18:07:21 -04:00
Daniel Verkamp
9f237eac85 env_dpdk: save and restore optind in spdk_env_init
DPDK's use of getopt() needs special handling of the optind global
variable since we are passing it a separate array of arguments (not the
typical argv and argc).  Set optind to 1 internally to env_dpdk so that
the apps don't need to know about it, and restore optind in case the
calling app is also using getopt().

Change-Id: Icbf07002c99fa9f94c866e8eff707124b0ef679b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365062
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>
2017-06-13 17:39:38 -04:00
Daniel Verkamp
1f5bbe02cf test/stub: require -i shm_id parameter
Change-Id: I8ae709876f7b189a8acfbf638108c1c555e92259
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365053
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-06-13 13:14:09 -04:00
Ziye Yang
3b3ab8696c nvme,test: change coremask to make nvme multiple test stable
Should find the root cause later.

Change-Id: I28ef058038c105c03e53555f7b972c75ac7121ae
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/365110
Reviewed-by: GangCao <gang.cao@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>
2017-06-13 13:11:03 -04:00
Daniel Verkamp
f30f09e994 test/json_util: initialize array values before test
Make sure the decoder is filling out my_int[] correctly. This cleans up
a scan-build warning about my_int[0] and my_int[1] being garbage values.

Change-Id: Ibdef1823d3bccaf41fc57c12f690bb007f673fd0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/364529
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-09 15:46:49 -04:00
Daniel Verkamp
66a0a5d4ff test/nvme: extend name buffers to fit traddr
Fixes GCC 7 snprintf() overflow warnings.

Change-Id: Ie3a1b25f7dfab347a6ca24bcc5505f3eb4c832c5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/364303
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-09 15:46:33 -04:00
Seth Howell
74bf43a4a2 test/json_util_ut: added object decoding unit tests.
Change-Id: I8e88d81602b62e969a716d4fded7e157a0a3bab3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/362633
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>
2017-06-08 19:25:32 -04:00
cunyinch
c15ceac1a5 bdev/error: Change the global error information to per bdev.
Change-Id: Iea492a36d23caa5d514f2c80e168486f7f616fda
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/363676
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>
2017-06-08 19:25:10 -04:00
Lu Fan
7a7593c0d4 test/nvme/nvme_c: id parse and compare
Change-Id: I6185bebaa362a065ff7cbdaec2229ceab171a30a
Signed-off-by: Lu Fan <lux.fan@intel.com>
Reviewed-on: https://review.gerrithub.io/364180
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>
2017-06-08 19:23:59 -04:00
Jim Harris
c33dfd741e test: add blobfs test plan
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I86ae72aac40526ec1ee63d14fa89b9817836e0a2

Reviewed-on: https://review.gerrithub.io/361810
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-08 17:25:50 -04:00
Ziye Yang
1424b6a554 test, pdu: fix memory leak related issue for pdu test
Change-Id: I0e4f5a099f9af68a4a67d9305f678e664f3bda64
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/364543
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-08 17:21:46 -04:00
Ben Walker
aff7e226f7 bdev: spdk_bdev_[read|write|flush|unmap|reset] now return int
It is not actually useful to be immediately returned
a handle to the bdev_io. There isn't anything valid
that the user can do with it at that point. Instead,
return an integer error code.

Change-Id: Iffa9a8dc5b2eefab57e3cc1f68919985431d17d1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/364137
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-08 16:35:49 -04:00
Seth Howell
aabf253940 nvme.sh: add multiprocess test flag.
Change-Id: I1a129a41f76586404c6a7ef226a42163defdb612
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/364677
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-08 15:41:13 -04:00
Ben Walker
fc6e9354ca bdev: Remove spdk_bdev_unregister from public API
This is only needed inside of bdev modules.

Change-Id: Ia532a0bd40ead5ff08a0e352f9aeb60f3898245b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/364118
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-06-06 18:18:28 -04:00
Lu Fan
0eed0a64a7 test/nvme/nvme_ctrlr: update_firmware
Change-Id: I52031a13bc9f208b644cd809a7fd0b079883aeae
Signed-off-by: Lu Fan <lux.fan@intel.com>
Reviewed-on: https://review.gerrithub.io/361893
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-06 13:31:13 -04:00
Daniel Verkamp
887683858b nvmf: add NVMe I/O passthru for virtual mode
Change-Id: I338f47000a1c898309a7421fe52f148bae9f2e6b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/364116
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-06 13:07:32 -04:00
Maciej Szwed
61119d7862 json: Added support for 64 bit unsigned value converter in json
This patch prepares support for 64 bit values that will be used in lvol bdev.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib5c8a438135e246c69887c4775c9ea6f0fa6eb1b
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/363344
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
2017-06-06 12:00:25 -04:00
Daniel Verkamp
7089d58244 json_util: parse integer numbers directly
Avoid a trip through floating-point numbers when parsing JSON numbers as
integers.

This will allow parsing 64-bit integers that cannot be represented in
double precision floating point.

Change-Id: Ic428c9f12e44e6dbee72f39a91ecb56ab30b365f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/364132
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-06-06 12:00:25 -04:00
Ziye Yang
5b89e4a18f iscsi, param: fix memory leak related issue
issue: ASAN reported that param_ut free already
freed memory.

Reason: spdk_iscsi_negotiate_params does some
modifcation on params and may free old params
and create new params. To solve this issue,
we need to input **params but not *params in
spdk_iscsi_negotiate_params

Change-Id: I68658fd8e08f317343753620692f04e7b0b57577
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/363670
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>
2017-06-05 13:34:40 -04:00
Changpeng Liu
b6a9493bb1 nvme: enable CMB for submission queue by default
Also provide an option in perf tool let users to
disable it.

Change-Id: If4952513d77cecaa4f9403fbea811d86916ee87c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/363311
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>
2017-06-05 13:03:48 -04:00
Daniel Verkamp
0d6f812c8f test/event/subsystem: ensure i stays in range
Assert that the number of subsystems doesn't become negative in
subsystem_sort_test_depends_on_single().

This also fixes a GCC 7 warning about a possible snprintf() truncation
now that the range of i is known to be [1,4].

Change-Id: Idaf8ceab149ff5d786f614f790a8706cae759d38
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/363496
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-02 19:49:43 -04:00
Daniel Verkamp
108c00bd68 test/iscsi_tgt/ext4test: update for DPDK submodule
Copy the DPDK submodule and re-run configure so that ext4test works
regardless of whether the autotest agent is using the submodule or the
hard-coded /usr/local/share/dpdk path.

This reverts commit f21448cf (test/iscsi: do not rsync dpdk directory
for ext4test) since the DPDK submodule is now needed to build.

Change-Id: Ib08c19bf7a6c3cbb450a4f613168bdab529ba9aa
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/363460
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-02 12:04:30 -04:00
Ben Walker
4fe9536de0 bdev: Remove reset_type
There is now just one type of reset, which is equivalent
to a HARD reset previously.

Change-Id: I955b219cbc5c25793d97de1cc003b30ae99313ac
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/362615
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-06-02 12:02:53 -04:00
Daniel Verkamp
7b2a6b05d0 nvmf: add public API to get subsystem serial number
Change-Id: I61b6579e8698d16e5a8ab74d304af9ea53f9dce4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/363307
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-01 19:43:45 -04:00
Daniel Verkamp
1c7b6f8dab nvmf: add spdk_ prefix to nvmf_find_subsystem()
Change-Id: I02a44c3790830b3918dca418c6bb85e82ddac273
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/363298
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-06-01 19:43:45 -04:00
Tomasz Zawadzki
5e132b6b7a scsi: Set proper transport protocol id
This patch adds property of transport protocol id to spdk_scsi_dev.
This allows to change it depending on which appliation is using
the device. Previously only iSCSI was used for all.

Setting protocol id is done at the time when device is added to
vhost controller (vhost) or target node (iSCSI).

Please note that for SPDK vhost SAS protocol id is used,
as that is what kernel vhost reports as well.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I455a856c5d7796a749b6650fee0218d526e094ed
Reviewed-on: https://review.gerrithub.io/362864
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>
2017-06-01 12:10:22 -04:00
Seth Howell
972caf1603 test/json_util: add string decode tests.
Change-Id: Ia41bfb8d7611ee9e856669d81cd95f41a38f31bd
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/362429
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>
2017-05-31 17:54:20 -04:00
Ziye Yang
2b2ab24477 reactor: handle start_fn event after subsystem init is ready
SPDK subysystem initialization now is async,
so we need to guarantee the initialization is done,
then call event composed of start_fn passed by user
in spdk_app_start.

Change-Id: Icc790cbb3da04c1063204938b79140c4218986e4
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/362654
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>
2017-05-31 15:30:58 -04:00
Ziye Yang
6e0d1dcdfa subsystem: make subsystem init in async manner
The next patch will make bdev modules init
in the async manner.

Change-Id: I4909c80510d786daf54003b99a5925428cf37373
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/362110
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-31 15:30:58 -04:00
John Meneghini
8a44220b1a env: Rename spdk_malloc/zmalloc/realloc/free to spdk_dma_(func)
- rename spdk_malloc_socket to spdk_dma_malloc_socket
  - rename spdk_malloc to spdk_dma_malloc
  - rename spdk_zmalloc to spdk_dma_zmalloc
  - rename spdk_realloc to spdk_dma_realloc
  - rename spdk_free to spdk_dma_free

Change-Id: I52a11b7a4243281f9c56f503e826fd7c4a1fd883
Signed-off-by: John Meneghini <johnm@netapp.com>
Reviewed-on: https://review.gerrithub.io/362604
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>
2017-05-31 15:30:27 -04:00
Pawel Wodkowski
17ce81a0d9 ut/blobfs: fix compilation error
Recently merged outdated patch break build becouse API change. Fix this.

Change-Id: I99be2a8b07578eb1d821031896de1ad5b703ce16
Fixes: 18bc3a5ef6 ("test/blobfs: Test create sync file")
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/363183
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-05-31 11:30:03 -04:00
Daniel Verkamp
dc772e543f test/blobfs/blobfs_sync: fix build after API change
Fixes: commit 18bc3a5 ("test/blobfs: Test create sync file")

Change-Id: Ic4465d0ae0536baa925a4516529da0faf9a21c45
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-31 00:38:29 -07:00
Lu Fan
7f94346a07 test/nvme/nvme_ns_cmd: read_with_md
Change-Id: I8cc8fc38a827444f89762aa45ee536da08696be5
Signed-off-by: Lu Fan <lux.fan@intel.com>
Reviewed-on: https://review.gerrithub.io/361876
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: GangCao <gang.cao@intel.com>
2017-05-31 01:37:57 -04:00
Jing Xia
18bc3a5ef6 test/blobfs: Test create sync file
Change-Id: I1f766502cf2d21698f01a05b755f15a7d346949a
Signed-off-by: Jing Xia <jingx.y.xia@intel.com>
Reviewed-on: https://review.gerrithub.io/361879
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-05-31 01:37:20 -04:00
Seth Howell
7883a289ec json_util: fixed off by 1 error.
Also add tests to ensure against regressions on this fix.

Change-Id: Ic617f75f1865f17121896f7622290e64020bb2d6
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/362275
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>
2017-05-30 23:55:36 -04:00
cunyinch
3d38fcc312 test/nvmf: use stub application
The stub application will ensure that each
nvmf test does not need to reinitialized DPDK
memory and NVMe devices.  This drastically
cuts down on the amount of time needed to run
all of the nvmf tests.

Change-Id: I6abad4e1298111884f18026e72e36f5d8b73c4b9
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/362810
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>
2017-05-30 17:59:44 -04:00
cunyinch
ad84526d1c test/nvmf: move the nvmf test cases to the separate script.
Change-Id: I14dcb4c37d19b9696e6ad1ee088b37e34efbf3ff
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/362809
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>
2017-05-30 17:59:44 -04:00
Ben Walker
a30ffb986e io_channel: No longer use thread-local storage
This serves two purposes. First, some older compiler
chains don't support thread local storage. Second,
we're going to need a way to iterate the list of
threads in the future, so keep them in a list.

Change-Id: I80e709f4665afb03cf4bcf0db19ef8ea353acdc1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/362255
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-05-26 17:41:22 -04:00
cunyinch
7fb3b2484c test/iscsi_tgt: optimization for ext4 test.
This patch make sure the mkfs command only run for 1 time for all
the devices.

Change-Id: Ic2fce52580d0ff871c77f56fce60ec5ca79e513c
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/361907
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-05-26 14:48:08 -04:00
Ben Walker
2ef5722f3c io_channel: Add a message passing callback
When a thread is registered, the user must provide
a function pointer that can pass a message to that thread.

Change-Id: I743b5e0d6e3b5118c0a68d2fcedbccdd6fb237f9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/362067
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-05-26 13:42:19 -04:00
Ben Walker
f1c5344b32 io_channel: Add a thread identifier
This will be used in the future to pass a message
to any given thread.

Change-Id: I3be5fe66244e360b7667427647fd8fdede110930
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/362066
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-05-26 13:42:19 -04:00
Ben Walker
d969ac445a io_channel: Remove per-channel priority
This wasn't used anywhere and we currently believe there
are superior software-only techniques for controlling
quality of service.

Change-Id: Icdadd5870ed0629b338c307d2619bbc242c3e7a3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/362065
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-05-26 13:42:19 -04:00
Jim Harris
94e1719bf5 test/iscsi_tgt: restrict rpc ip_address test to 2 nics
This is plenty to test the add/delete IP address code.
Testing additional interfaces only adds to test time
with no additional coverage.

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

Reviewed-on: https://review.gerrithub.io/362629
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-05-26 13:17:26 -04:00
Ben Walker
b0355c0266 test/blobfs: Use a lock instead of volatiles
Thread sanitizer detected a number of race conditions in this
test. Use a simple lock to pass messages between threads instead
because that's easier to get right.

Change-Id: Ia1f905f7b3787b4e89cf5ca1d16a1f24e0a562f9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/362437
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-05-26 13:17:14 -04:00
Jim Harris
675dc02b81 test/app/stub: create sentinel file when init complete
This is more reliable than checking for the DPDK generated
/var/run/*config file, and is not DPDK dependent.

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

Reviewed-on: https://review.gerrithub.io/362628
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-05-26 12:14:19 -04:00
Jim Harris
6bd7c5b42c test/blobfs: use test stub
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iba5bb17a30b7d7ec39fe64df93860dd8500f2ad1

Reviewed-on: https://review.gerrithub.io/362607
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-05-25 16:55:03 -04:00
Jim Harris
a8e1295d4b test/iscsi_tgt: use stub application
The stub application will ensure that each
iSCSI test does not need to reinitialized DPDK
memory and NVMe devices.  This drastically
cuts down on the amount of time needed to run
all of the iscsi_tgt tests.

While here, add a new common ISCSI_TEST_CORE_MASK
shell variable, eliminating a bunch of copies of
the 0xFFFF core mask, and ensuring the stub application
chooses a core mask that overlaps all of the iscsi_tgt
test cases.

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

Reviewed-on: https://review.gerrithub.io/362454
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-05-25 16:55:03 -04:00
Jim Harris
7c34782192 test/iscsi_tgt: add timing for iscsi_tgt app startup
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic05849d9381709340016f05148118173709ec152

Reviewed-on: https://review.gerrithub.io/362612
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Ben Walker <benjamin.walker@intel.com>
2017-05-25 16:55:03 -04:00
Jim Harris
d67536f6b5 test/iscsi_tgt: specify reactor mask from command line
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1a4d9fd8940e17b2e4854edbe09ee5fe6fd62edb

Reviewed-on: https://review.gerrithub.io/362596
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-05-25 13:52:09 -04:00
Jim Harris
4b521e1720 app/stub: add a stub application to accelerate startup
Starting SPDK applications can take a long time due to
two factors:  DPDK memory initialization and NVMe
device initialization.

This stub application facilitates eliminating those
delays by leveraging DPDK's multi-process mode.  This
stub application acts as the primary process,
initializing DPDK as well as all NVMe devices bound
to userspace modules (uio/vfio).  Then another
SPDK process can be started using the same instance
ID, which will make that SPDK process a secondary
process of the stub and leverage the DPDK memory and
NVMe device initialization already performed by the
primary process.

To start this will be used to accelerate the iSCSI
system level tests (in test/iscsi_tgt) to significantly
reduce test time in the CI pool.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3019c7d883f40b3ee8fb3345db013df2afc25645
Reviewed-on: https://review.gerrithub.io/362453
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-05-25 13:52:09 -04:00
Jim Harris
b20d0296f8 test/iscsi_tgt: add a common bash script
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I76b442115caa5e9320ded671be6bc54a6a98a2b4

Reviewed-on: https://review.gerrithub.io/362451
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-05-25 13:52:09 -04:00
Jim Harris
f21448cfbc test/iscsi: do not rsync dpdk directory for ext4test
This test sets DPDK_DIR to the main repository so does not build
DPDK on the mounted iSCSI LUN.  So don't bother copying the
dpdk subdirectory to the iSCSI LUN which saves a few seconds
for every test run.

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

Reviewed-on: https://review.gerrithub.io/362268
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-05-25 13:52:09 -04:00
Jim Harris
27c6d380b5 examples/nvme/perf: add a latency summary
A single -L can be used to get the latency summary.
Two -L's (or -LL) can be used to get both the latency
summary and the detailed histogram.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3fc0f4e2dfff7b041a665fe35aa33f11e4c3ebad
Reviewed-on: https://review.gerrithub.io/362270
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>
2017-05-24 23:39:06 -04:00
Seth Howell
50662135b1 json_util_ut.c: added int32 and uint32 json decode tests.
Change-Id: Ib3162973b1b4e5bd2a3034857ca2d55d3228b532
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/362232
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>
2017-05-24 11:51:30 -04:00
Jim Harris
4c438999e0 test/iscsi_tgt: move iscsi script invocations to separate file
This enables iSCSI tests to be more easily run in isolation.

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

Reviewed-on: https://review.gerrithub.io/361811
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>
2017-05-24 11:48:38 -04:00
Jim Harris
2e3f07ac40 bdev: add spdk_io_channel parameter to spdk_bdev_reset
This ensures that all spdk_bdev_io structures now have
an attached channel, simplifying some future work around
things like counting the number of outstanding IOs for
a given channel (which otherwise would have had to
account specially for resets).

Reset semantics are still that they affect the entire bdev
and not just the channel it was submitted on.

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

Reviewed-on: https://review.gerrithub.io/362251
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>
2017-05-24 11:42:15 -04:00
Ziye Yang
615c54b443 bdevperf: move location of bdevperf_construct_targets
Change-Id: Id6a384b91d7ab40de4382601a771b2f02bf31e81
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/362280
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>
2017-05-24 11:39:45 -04:00
Daniel Verkamp
b9bcc3531e bdev: make enum spdk_bdev_io_status private
The user should not see the bdev_io status directly; the NVMe and SCSI
error code wrappers provide the ability to translate to the desired
format regardless of what kind of error is stored inside the bdev_io.

Replace the spdk_bdev_io_completion_cb status parameter with a bool
simply indiciating whether the I/O completed successfully.

Change-Id: Iad18c2dac4374112c41b7a656154ed3ae1a68569
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/362047
Tested-by: <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-05-23 16:30:10 -04:00
Cunyin Chang
7b5a229c5f test/hotplug: increase the test time for hotplug
This will make sure the hotplug instance not exit before all the hot insert and
remove events done, the setup.sh for hot insert events will use several seconds
sometimes.

Change-Id: I4ad61937760529547cdcf7701f3c3d9033121e45
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/362131
Tested-by: <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-05-23 15:52:25 -04:00
Jing Xia
dc8acbf8d5 test/blobfs: Modify the value of g_fserrno
Change-Id: I120f2f6ffe49d0f4bf6b92892e26228010c9c132
Signed-off-by: Jing Xia <jingx.y.xia@intel.com>
Reviewed-on: https://review.gerrithub.io/362100
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: <sys_sgsw@intel.com>
2017-05-23 13:46:09 -04:00
Ben Walker
305cb239d2 io_channel: Remove unique flag
This is no longer used anywhere. For the places where we previously
used it, we've since found alternate solutions that do not
require it.

Change-Id: I738a80b95ef50348ce1c14969a3812b0a625b3fd
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/362064
Tested-by: <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-05-22 19:27:17 -04:00
Daniel Verkamp
5f3841f0e3 nvmf: allow NQN to be 223 bytes + null terminator
An ECN to the NVMe 1.3 specification has clarified that the NQN may
contain 223 bytes before the null terminator.  Make all of our NQN
length checks consistently enforce this behavior.

Change-Id: Iebfd57d11abea64964c7a6ad9d886e40efa243c3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-18 14:36:39 -07:00
Ben Walker
bea2e2308f blob: Remove per-channel queue size configuration
This will need to be configured globally for all channels.

Change-Id: I773252f220373617f8d09d1f24243db8095cf8a4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-05-18 14:36:11 -07:00
Daniel Verkamp
f66a0c9e34 scsi: pass management function as a parameter
Specify the function as a parameter to spdk_scsi_dev_queue_mgmt_task.
This makes the API clearer by making it explicit that the management
function is required for management tasks.

Change-Id: I92d893aadb6faebea81dd79729894d2c2fddf088
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-18 13:47:42 -07:00
Daniel Verkamp
1e7e6a618b scsi: automatically set spdk_scsi_task::type field
The type of a task is known due to the function used to submit it:
- spdk_scsi_dev_queue_task() for normal SCSI command tasks
- spdk_scsi_dev_queue_mgmt_task() for management tasks

Change-Id: I183a1f89ab85f3fce1de2491e77d95d4b147fd72
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-18 13:47:42 -07:00
Cunyin Chang
32b4ab71a2 bdev/error: Add new bdev/error to inject errors in bdev layer.
Change-Id: I3c68cb5911b3662dbb35f551dc291d5ebdd84bf6
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-05-18 07:56:14 -07:00
Dariusz Stojaczyk
679e2831bd vhost: added rpc commands to remove vhost controllers and devices
Added new rpc commands together with underlying vhost API and tests.

Change-Id: Ib9c6a530d0909193ea5115aaac4920c44f39613c
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-05-18 01:01:46 -07:00
Jim Harris
f2c8d0dc11 test/iscsi_tgt: exit rbd.sh if CEPH_DIR not defined
This allows the iscsi_tgt tests to be run more easily
in isolation.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1fa87e8b02f6e6ed62c75f07471d93ce84da30c2
2017-05-17 15:41:56 -07:00
Jim Harris
8de75f8107 nvme/perf: add software-based latency tracking
The latency tracking is done with ranges of bucket arrays.
The bucket for any given I/O is determined solely by TSC
deltas - any translation to microseconds is only done after
the test is finished and statistics are printed.

Each range has a number of buckets determined by a
NUM_BUCKETS_PER_RANGE value which is currently set to 128.
The buckets in ranges 0 and 1 each map to one specific TSC
delta.  The buckets in subsequent ranges each map to twice
as many TSC deltas as buckets in the previous range:

Range 0:  1 TSC each - 128 buckets cover deltas    0 to  127
Range 1:  1 TSC each - 128 buckets cover deltas  128 to  255
Range 2:  2 TSC each - 128 buckets cover deltas  256 to  511
Range 3:  4 TSC each - 128 buckets cover deltas  512 to 1023
Range 4:  8 TSC each - 128 buckets cover deltas 1024 to 2047
Range 5: 16 TSC each - 128 buckets cover deltas 2048 to 4095
etc.

While here, change some variable names and usage
messages to differentiate between the existing latency
tracking via vendor-specific NVMe log pages on Intel
NVMe SSDs, and the newly added latency tracking done
in software.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I299f1c1f6dbfa7ea0e73085f7a685e71fc687a2b
2017-05-17 09:49:27 -07:00
Daniel Verkamp
a591161cb2 bdev: make struct spdk_bdev contents private
Change-Id: If203e82f8cd10d5998a565ad490ef11e2916687f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-17 09:45:42 -07:00
Daniel Verkamp
9d1e05d2f2 bdev: add getter for write cache enable status
Change-Id: I93656deda8956c77e9565ee1f271795642e62ac9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-17 09:45:42 -07:00
Daniel Verkamp
ed362f1f35 test/bdevio: remove gencnt manipulation
The bdev generation count is an internal implementation detail;
applications should not be reading or writing it.

Change-Id: Ic4455b7b72dc80babbc410420c89f52ef5d77e6d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-17 09:45:42 -07:00
Jing Xia
928df4a448 test/blobfs: Rename blobfs test file name
Change-Id: I584c667aff5a0cdfee26b958a2b58c6ed41d45f7
Signed-off-by: Jing Xia <jingx.y.xia@intel.com>
2017-05-17 08:21:59 -07:00
GangCao
b347d551e8 nvme: detach the pci device with calling process's own devhandle
Change-Id: I2693b4bd29e0500379d5e399723aec7e44bffca3
Signed-off-by: GangCao <gang.cao@intel.com>
2017-05-16 10:35:29 -07:00
Jim Harris
4eafea0360 bdev: add a null bdev module
Also change the discovery/nvmf.sh test to use it.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I56bce9a84bd46f13b6d4f34da81abf23413f2598
2017-05-15 14:00:37 -07:00
Daniel Verkamp
658f816344 test/scsi_bdev: add read LBA range tests
Change-Id: If0cc8f970c20c4a398882183de9e7b066753f030
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-15 13:35:18 -07:00
Daniel Verkamp
19a9871495 scsi: remove spdk_scsi_task::owner_task_ctr
The SCSI library already provides a callback when the task is released
(free_fn), so the user can update their own task counter.

Change-Id: I7fb13f6fff66dbba2315fd03fb06e49f793be123
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-15 10:12:42 -07:00
Daniel Verkamp
7145cf62c6 scsi: set free_fn in spdk_scsi_task_construct()
The task free callback function is required, so make its assignment part
of task construction.

Change-Id: I2f5fdf73b064653ee85b4e7961cb1653a0a4107d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-15 10:12:42 -07:00
Daniel Verkamp
1aea6c5b6f bdev: add getter for maximum unmap descriptors
Change-Id: Ifbdd29e2081600bf0d860582d80696546107cf1b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-15 10:11:23 -07:00
Daniel Verkamp
326786a943 bdev: add getters for block size and block count
Change-Id: I6fad28da43c163ea4e2c4a04ced356b67d63652f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-12 10:34:58 -07:00
Daniel Verkamp
1bcf22cde1 bdev: add getters for bdev name and product name
Change-Id: I6a75fada94fa845ecedd4cd8afc78f4259df14fe
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-12 09:36:30 -07:00
Daniel Verkamp
8d24e2da5b test/nvme: support systems with non-0 PCI domains
Fix up a second copy of linux_iter_pci in the same manner as commit
6562e95092 (scripts/setup.sh: support
systems where more than one domain is used).

Change-Id: I3d9b842891d70c2960de8287e3b11c1a11b02d1f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-11 10:12:49 -07:00
Karol Latecki
ac9d99071e vhost/test: SIGKILL vhost after unsuccessful SIGINT
Added 1 minute timeout for vhost to exit after receiving
INT signal. After timeout send KILL signal to vhost app
and exit with error.

Change-Id: Ib1659660667991b21103b3401bbd780290521433
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
2017-05-11 01:27:31 -07:00
Daniel Verkamp
6a8cd333a9 bdev: add API function to get buffer alignment
Change-Id: I4c7eff4c903411994fc6bb9fae98f967eb14669c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-10 13:16:27 -07:00
Daniel Verkamp
ceb8f2a952 test/nvme/hotplug: disable SSH host key checking
The first time this test runs on a machine, it will not have the SSH key
in its known_hosts, so allow it to connect without user intervention.

Change-Id: I27f750f41e1819b526197af2d0b9ae15382d9aa4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-10 09:18:42 -07:00
Ben Walker
42491fb8fc env: Add wrappers for a lockless ring
Change-Id: I9679e4bcfc10e38672d1851f7e9f16b6adf7de9b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-05-09 14:02:15 -07:00
Jing Xia
510e0861da Add test case "cache_write_null_buffer()" to cache_ut.c.
Change-Id: I629810761a6c10c324a8a3d29c3dc49e63d42ccc
Signed-off-by: Jing Xia <jingx.y.xia@intel.com>
2017-05-09 10:22:03 -07:00
Daniel Verkamp
22b6098965 bdev: remove spdk_bdev thin_provisioning flag
Blockdevs already indicate support for unmap via
spdk_bdev_io_type_supported(bdev, SPDK_BDEV_IO_TYPE_UNMAP).

Change-Id: I634f27a281fd900bb3a6da2e4ff8a74e43579578
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-09 08:42:10 -07:00
Ben Walker
9ed75e4dab bdev: Rename rbuf to just buf
We plan to use these buffers for more than just reads.

Change-Id: I8fa6cb432a6cfe4406fbf240cd3aa2ae4ab5f3d5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-05-09 08:14:31 -07:00
Ben Walker
b961d9cc12 include: Move the remainder of the code base to stdinc.h
Change-Id: I6a142feeaad3117bd3c75e7c5cb7231a1cfa78ae
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-05-08 13:20:36 -07:00
Vishal Verma
578c0d550d env: Adding socket variants for malloc and zmalloc
Signed-off-by: Vishal Verma <vishal4.verma@intel.com>
Change-Id: I2399842cf7bb80aefb6c511e167157502ba9018a
2017-05-08 09:41:47 -07:00
Daniel Verkamp
cdfa0091f7 bdevperf: remove unnecessary caller_ctx access
The bdev layer manages the bdev_io caller_ctx internally.

Change-Id: Icb5a4f26b090d6f761af988fb26a319005e66a6d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-05 09:39:49 -07:00
Daniel Verkamp
825379870b bdev: add accessor function to get an I/O's iovec
Change-Id: I09321abe93303d6225fbcce4065b0024dd541b19
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-05 09:39:49 -07:00
Daniel Verkamp
414b754579 scsi: remove SCSI task id and add iSCSI task tag
The SCSI layer was not using the task ID for anything; the iSCSI layer
was using it to store the task tag, so move it there and rename it to
"tag" to make its purpose clear.

Change-Id: Ibda4f4e215056116b9be4a3a0264f98bc4c29535
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-04 10:10:47 -07:00
Daniel Verkamp
dc9e11163e bdev: add API to translate to SCSI status
Move the scsi_nvme translation code from the SCSI library into bdev, and
provide a generic way to translate any bdev_io status into a SCSI
status.

Change-Id: Ib61a6209387c24543e31574e2b5ca249e2ac8b74
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-04 09:11:42 -07:00
Daniel Verkamp
2990f869a1 scsi: make spdk_scsi_port definition private
Change-Id: Ib2c17a4dd4ce680161be92f76b831df792f9ff4d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-04 09:05:53 -07:00
wenzhong wu
c233e455bb Add Cunit test function at subsystem_ut.c
Change-Id: I75ee85e318fdc83122245d486d6a63b3e452a965
Signed-off-by: wenzhong wu <wenzhongx.wu@intel.com>
2017-05-03 17:12:45 -07:00
Fan Lu
7e961dd6e0 Add test function at spdk nvme_ctrlr_c
Change-Id: I4b13414224a95ce391aecf0a3f009e65758522fe
Signed-off-by: Fan Lu <lux.fan@intel.com>
2017-05-03 16:52:43 -07:00
Changpeng Liu
21b08e13ae test/bdevperf: remove unnecessary DPDK log function call
Change-Id: I525bb326d944fc333ba6cd2a95b26326d7ac16d5
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-05-03 15:34:14 -07:00
Daniel Verkamp
a3738d9031 scsi: make spdk_scsi_dev definition private
Change-Id: I62b36a22e11e845045f190886ae00aa644f96ec6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-03 12:34:57 -07:00
Daniel Verkamp
a6e713d8a1 test/json_util: add unit test for spdk_json_decode_bool()
Change-Id: I18bb8135ef6dda065a57e771894285128c242cba
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-03 10:57:51 -07:00
Daniel Verkamp
bf2795c65d test/blobfs/rocksdb: clean before building
RocksDB's build system does not correctly generate dependencies - if
headers have been removed in the SPDK repository since the previous
build, the .d files will prevent the build from continuing.

Avoid this by cleaning up any left-over build outputs from the previous
run.

Change-Id: Ib8669273eb38c241f83e14714683693430469462
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-02 16:49:50 -07:00
xiajingx
8af7a3a44b Add test cases to blobfs_ut.c
Change-Id: I9c5e9d415465ffbd61d19c27e74121082b1d7fd6
Signed-off-by: xiajingx <jingx.y.xia@intel.com>
2017-05-02 15:17:59 -07:00
Pawel Wodkowski
6999fc24cc test/vhost: simplify autotest.config
Convert autotest.config to a sourceable file. This enables direct or
indirect usage of variables and a chance to remove error prone
statements like '$(cat | grep | awk')'

Change-Id: I3ae4152fd7548e4b2bfd01c00b614155871b2db3
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2017-05-02 15:16:51 -07:00
Daniel Verkamp
12965bb6ce scsi: make spdk_scsi_lun definition private
The contents of struct spdk_scsi_lun don't need to be part of the public
API.

Change-Id: I101b77871054557380610fd901ab38bada463202
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-02 09:41:43 -07:00
Daniel Verkamp
f50ea14403 rocksdb: stop passing $DPDK_DIR to db_bench build
The RocksDB SPDK environment no longer depends directly on DPDK.

Change-Id: Ifcabcd137292f86724a1e3fed93abb94fa5a2344
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-01 11:11:03 -07:00
Daniel Verkamp
8375124f24 test/blobfs/rocksdb: check for errors
Change-Id: I8ab76beff22b803ac1ff22f1c91826870dbe9e7b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-05-01 11:11:03 -07:00
Daniel Verkamp
388ca48336 test/iscsi_tgt/nvme_remote: kill both processess on failure
Fix the incorrect iSCSI PID ($pid) and also terminate nvmf_tgt on
failure.

Change-Id: I92457591c98c12f101a1713763ed9dc1feb32cb9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-28 15:06:27 -07:00
Daniel Verkamp
6b7ea8f032 test: clean up redundant process_core invocations
Similar to commit 378fc7787c, remove
unnecessary process_core calls.

Change-Id: I2fb55e39770ca57274c177fce3161f46a94d4efe
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-28 14:50:31 -07:00
Pawel Wodkowski
01af49aa04 test/vhost: limiting max_sectors_kb is no longer needed
Setting max_sectors_kb to 4k was workaround and is no longer needed.
Vhost must work with arbitrary guest settings.

Change-Id: I9ff9d752916e200e79cdd2b4b3d64afdecae11bc
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2017-04-27 18:18:50 -07:00
Daniel Verkamp
6c17247560 test/nvme/aer: fix inaccurate error message
Change-Id: I5b45db29727e60e4053d3a507e0dbc44211ebb9c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-26 21:54:14 -07:00
Fan Lu
18f855b138 Add test function at nvme_ut.c
Change-Id: Ib2bb3a219b6853bf0bd45191be80487decdd9144
Signed-off-by: Fan Lu <lux.fan@intel.com>
2017-04-26 21:54:00 -07:00
Daniel Verkamp
e2bf067577 Fix comma spacing errors spotted by astyle 3.0
Change-Id: Ie0543b220367c68c15bc9c4668e39b5336880021
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-25 10:01:18 -07:00
John Meneghini
decea46f59 test: remove unneeded rte includes from overhead.c 2017-04-24 17:09:24 -07:00
Daniel Verkamp
30c849c1a5 test/nvmf/host/fio: skip test if FIO is unavailable
Change-Id: I7a0e2d433a995d7815634fb60a970b722aa41dcd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-24 15:03:31 -07:00
Changpeng Liu
2e9cd69f52 test/nvme: don't run sgl tests when NS is extended LBA format
Change-Id: I7c60b347c787fa271ab385389ddbbc286366f8e9
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-04-24 13:56:59 -07:00
Daniel Verkamp
6b91943209 scripts/check_format.sh: check spaces in comments
Fix up all existing spacing errors in comments and add an automated
check for patterns like /*comment*/.

Change-Id: I28f61c93612dc0f8aed66bd509da78e91ea9737e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-24 13:37:41 -07:00
Ziye Yang
13fc774bf4 fio_plugin: add NVMe-oF host support in fio_plugin.
Also adds the automation test case for using remote
NVMe devices exported by NVMe-oF target.

Change-Id: I2b839a4eeec33d5b0c30d654e6013ad8c7949e23
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-04-21 09:38:45 -07:00
Ziye Yang
e15bd00711 nvme: support new format in spdk_pci_addr_parse
The new format is: domain.bus.device.function

For this format, since we use '.' as separator,
to avoid misusing, we only support the following:

1 domain.bus.device.function ( 4 values provided)
2 bus.device.function  (3 values provoided with domain = 0)
3 bus.device  (2 values provided with domain = 0, function = 0)

Change-Id: Ide03db38b4ac7802cf36f0e536e8b997101d6cd3
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-04-21 09:38:45 -07:00
GangCao
b3cc183a53 nvme/example: add shm_id in identify tool under multi-proc case
Change-Id: Ia5427dda190d984edc79603c4b41e74ce49a7a5a
Signed-off-by: GangCao <gang.cao@intel.com>
2017-04-17 13:09:45 -07:00
Jim Harris
b5b9410da3 nvme: remove DELAY_BEFORE_ENABLE quirk and always wait 100us
A 100us is so small that applying the quirk to the specific
SSDs that require the delay is more trouble than it is worth.
So remove the quirk and always wait 100us before re-enabling
the NVMe SSD during initialization.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id6a8cc6e35d103fffdf135580301fc3e5b27e722
2017-04-17 11:56:36 -07:00
Daniel Verkamp
0911aa83fb test/bdev: temporarily disable bdevperf reset test
The bdevperf reset test only executes in the nightly test run, so this
problem wasn't caught during review.

It gets stuck in an infinite loop and produces lots of log output; turn
it off to avoid filling up the disk with logs until we determine what
broke it.

Change-Id: I7601ba324a0531de3733cf5784ccd46da5618082
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-14 15:42:08 -07:00
Daniel Verkamp
5742e9b9e7 nvme: allocate requests on a per-queue basis
Change-Id: I7bec816e518a0a6f2e9fb719128c83d4b908d46c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-12 21:05:24 -07:00
Daniel Verkamp
cd13f280f4 nvme: track qpair within nvme_request
Change-Id: Ia40a1e79db6327c4693731e9bb7a57810795429d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-12 21:05:23 -07:00
Ben Walker
193f4f8392 nvme: Queue aborts beyond the abort command limit
Queue aborts that would exceed the abort command limit
in software as a convenience for the user.

Change-Id: I8c1f0380984cc6c0cdb453db961939a7f571b336
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-12 13:11:01 -07:00
xiajingx
a005708d7d blobfs: Add code to create results folder.
Change-Id: I28a4a1bcce3de6df62a1d4ee2171447c7e26dc9e
Signed-off-by: xiajingx <jingx.y.xia@intel.com>
2017-04-11 09:51:26 -07:00
Ben Walker
10f9391a22 test: Shorten some relative paths using readlink
Core dumps stop working if the path is longer than 64 bytes.
Use readlink to shorten some of the very long relative paths.

Change-Id: I5e7eb6580ca581c5ac3a71afb7b62953836e2660
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-07 08:14:34 -07:00
Ben Walker
7f7c03a935 env: Remove all use of RTE_LCORE_FOREACH
Replace with an env abstraction.

Change-Id: I706374d265a270890e1f3ca920a10a0dc09624b0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-05 11:16:37 -07:00
Ben Walker
16ae587966 env: Move lcore functions into env layer.
They were previously in the event library.

Change-Id: I24ffd8f771e895ccf5395c8120423cd114893139
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-04 09:19:01 -07:00
Prashanth Nayak
1e4920b261 nvme: remove unused rte_* includes
Change-Id: I9a1e6fab58af3a4b7ba5d408c393a00fc177d3a6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-03 12:31:12 -07:00
Ben Walker
36a793ad63 nvme: Add a quirk to delay before enabling
It has been discovered that some devices require
a very small delay before writing CC.EN to 1 after
CSTS.RDY goes to 0.

Change-Id: I73d31726d17ebf5bbec7ee528e2f98fcd05234dd
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-03 11:18:15 -07:00
Daniel Verkamp
edbca2a676 conf: add Boolean value helper function
Change-Id: Ie86745fe397167416aee356dc773a1bf8387b492
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-03 11:17:47 -07:00
Tomasz Zawadzki
7254f2b639 test: removed superflous comments in test config files
This patch removes comments within configuration files for tests
that are not relevant to the test itself.
It reduces the need to update comments in test config files with each update.
As well it makes those same as other test configuration files.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I48116613435fadf0738b5a948d32f458c7ce06be
2017-04-03 11:05:49 -07:00
Jim Harris
5490f17328 test/blobfs: fix a couple of unit test memory leaks
In the cache_append_no_cache test case, we need to
sync the file first, before calling cache_free_buffers().
Otherwise the buffers do not really get freed since they
contain dirty data.

This fixes a couple of memory leak bugs detected with
CONFIG_ASAN=y.

Reported-by: John Meneghini <john.meneghini@netapp.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If1ff6ed7d9e7a6dc67af0a2baf3b2555ace610ee
2017-04-03 10:10:12 -07:00
Jim Harris
cc9b53ec25 test/scsi: initialize blocklen parameter for bdev
This parameter is not actually used by the unit
tests using the bdev, but setting it to a non-zero
value silences a couple of static analysis errors.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id53a17bcd1f4ec51f35a954ec0f6e6ea9803086e
2017-03-30 10:05:13 -07:00
Piotr Pelplinski
425b902bc0 scsi: use SOFT reset when reseting bdev
This fixes multiple SCSI reset issue.
This patch does not remove sleep in iSCSI tests.

Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I5e9f3705e5dc34004b9d1b9e40fbdcb04a3bee4e
2017-03-30 16:09:33 +02:00
Jim Harris
913257cba5 Revert "scsi: use SOFT reset when reseting bdev"
Some intermittent issues still observed with multiple
resets in quick succession.  Reverting for now while the
issue is more fully root caused.

This reverts commit 7fa7f91ee3.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I493b564e8a110bbfb7a6cc47107d53d6eca40053
2017-03-29 15:42:11 -07:00
Daniel Verkamp
f00d22bb29 test/iscsi: fix conf leak in target_node_ut
Change-Id: Iac2ba5dd033682e62d2e32a84e77bbf9585c5235
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-29 15:27:50 -07:00
Daniel Verkamp
df009d7323 test/iscsi: move iSCSI unit tests to unittest.sh
Change-Id: I19f3f5485bfbf3dec275acddbc45786f76cd4198
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-29 15:27:50 -07:00
Daniel Verkamp
14cc383fb0 test/iscsi: build iSCSI unit tests on FreeBSD
Change-Id: Ie640069b831eba4eada9ff0955dca41af852d3a5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-29 15:27:50 -07:00
Jim Harris
6b1046f780 test/blobfs: use default cache size
Automated test scripts now set up 4096 huge pages by default,
so we can now safely allocate the default 4GB for blobfs cache.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8aea322068a5df79ca75737c43a4e0e80e7d2be4
2017-03-29 14:13:22 -07:00
Daniel Verkamp
f5f1f24a1f test/scsi_bdev_ut: zero-initialize bdev structures
The bdev product_name field is used in the Inquiry command translation
and was previously uninitialized.

Change-Id: Ie9d056ddaddfbb60ce5c3444ed87f852c00a296d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-29 11:56:54 -07:00
Daniel Verkamp
70c41f75b5 test/vhost: override NRHUGE to avoid extra setup
Rather than re-running setup.sh during the vhost tests, just
pre-configure NRHUGE to the necessary value for all setup.sh invocations
during autotest.

Change-Id: I1a4d9a7f7ab52082a8f626c3c64807417a493b5f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-29 10:43:11 -07:00
Pawel Wodkowski
7fa7f91ee3 scsi: use SOFT reset when reseting bdev
This fixes multiple SCSI reset issue.

Change-Id: Ie62e0c1850faff17d383bcea00071d63d6bfa7f4
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2017-03-29 09:17:26 -07:00
Daniel Verkamp
c09faf35d9 test/blobfs/cache_ut: remove unused g_sem variable
Change-Id: Iee668de1f7253273f88d1468739c9dcb16101546
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-29 09:17:18 -07:00
Daniel Verkamp
d7cca6ca16 test/nvme_ns_cmd: free request in md test
Change-Id: Id29425cc96e0e05c6cf3fc45463b5f2053edce47
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-29 09:16:01 -07:00
Jim Harris
ab5511c754 test/scsi: free configs in scsi/init unit tests
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic629639e3b4b71760d515234dc1c7ca684d47429
2017-03-29 09:07:46 -07:00
Jim Harris
a871d5e5d7 test/bdevperf: validate inputs are positive integers
Negative queue depths, I/O sizes or time durations do
not make sense, so exit() if user input contains any of
those cases.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9d0261d1151f41dfc11013c797bf949b736ebba3
2017-03-28 12:31:15 -07:00
Jim Harris
031937d0ff test/blobfs/rocksdb: allow alternate location for output
For the automated tests, use this to directly write output
files to the output_dir.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I403f51a4f4d0cac0fca7ec610527bf616f97b20d
2017-03-28 07:55:40 -07:00
Ben Walker
88213615b6 blob: Fix potential NULL pointer dereference in blob_ut
Change-Id: I07c70c4ec579d4eec50821b1fac74c7d4155539f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-27 15:15:24 -07:00
Jim Harris
3f7f19cb36 test/blobfs/run_tests: rework perf checks
Change NO_PERF to USE_PERF which defaults to 1.  This
will be overridden to 0 if set to 0 in the environment
or perf is not available on the system.

While here, disable perf in the automated test suite.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia182f6a3068d0da631973d4010dce24bd0f98eb5
2017-03-27 14:23:27 -07:00
Ziye Yang
a1ed48c970 test, nvme: correct the parameter for spdk_nvme_ns_cmd_reservation_report
Change-Id: Idec799800bb8eaaad0191125410acbaa6e423cff
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-27 09:53:34 -07:00
Ziye Yang
76604c3294 test/blob: Change one NULL pointer check to a fatal assert
Change-Id: I99d95123b4c0c4a5040ba27799a1f9c5e2104e76
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-27 09:50:22 -07:00
Jim Harris
7fc640b296 test/blobfs/cache_ut: assert calloc returns a buffer
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9d605fb844c2f11bc12b0200ca9fd1cac6c5f95d
2017-03-24 16:21:05 -07:00
Jim Harris
2e667dc351 test/blobfs: assert that some callocs succeed
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5ad2a93a2fc4b21522745718d1399c1b432710c5
2017-03-24 16:06:37 -07:00
Karol Latecki
0488fd84b8 vhost_test: update vhost ext4test for spdk vhost
- Renamed to integrity filesystem test
- Add detecting if qemu is installed
- Default vhost.conf using NVMe; ramdisk may be too small
  for copying & building both dpdk and spdk
- Use kernel source (present on VM) for running test compilation
- rename to integrity test

Change-Id: Id369a5aac3008700cffbc51a5197b72f10645a1b
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
2017-03-24 14:23:12 -07:00
Jim Harris
1edd9bf3e4 blobfs: Add a lightweight filesystem built on the blobstore
This is the initial commit for "blobfs", a lightweight
filesystem built on top of the SPDK blobstore.

Also included in this patch:

1) a shim for using SPDK bdevs as the backing store for
   SPDK blobstore/blobfs
2) documentation for using blobfs as the storage engine
   with RocksDB
3) scripts for running a set of workloads and collecting
   profiling data with RocksDB and blobfs

See doc/blobfs/getting_started.md included in this commit
for more details on blobfs, including some of the current
limitations.


Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2a6d3d4b87236730051228ed62c0c04e04c42c73
2017-03-24 14:15:45 -07:00
Changpeng Liu
34369a1243 nvme: fix potential null dereference of spdk_nvme_ctrlr_get_ns
Change-Id: Ibe353e61020caa264cb9b4ad38a091f46ecccfb1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-03-24 12:18:37 -07:00
Ziye Yang
74da2fade4 Replace sprintf with snprintf in several files
Change-Id: I2a46433e81e605e57df4b2a1a9c1c27097333d0c
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 13:33:21 -07:00
Ziye Yang
532de4d9df test/nvmf: free the allocated subsystem
Change-Id: I1a0977c626facaa739c8c0c26a302bcc0c1aeafe
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 13:11:12 -07:00
Ziye Yang
774a544bd4 test/scsi/lun: Verify lun is not NULL
Change-Id: I9bedc80ffb1b82f198b88f40012520062fd2d54a
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 11:30:15 -07:00
Ziye Yang
1a1a8e89a9 test/scsi: Assert callocs do not return NULL
Change-Id: I4cf2027c5fbb09e8c451d4c9c40ccee2f55973f2
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 09:19:41 -07:00
Daniel Verkamp
ab061a717a build: replace DPDK_INC with ENV_CFLAGS
A few instances of DPDK_INC were added after the env library abstraction
was introduced; replace them with the correct ENV_CFLAGS variable
defined by env.mk.

Change-Id: I54ab2b2360a72506049fee549491f6614601a148
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-21 15:41:13 -07:00
Ben Walker
d89352a95c blob: Add a persistent, power-fail safe block allocator
This is the initial commit for the "blobstore", a lightweight,
highly parallel, persistent, power-fail safe block allocator.

Documentation will be added in future patches.

Change-Id: I20a4daf899f1215d396f7931c3ec9a2e2bb269d0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-21 14:21:21 -07:00
Jim Harris
e2b330e989 nvme: correctly handle valid PRPs with non-block size first/last elements
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I801547126987b1a2c5e8e95d468c30e508a1c3b0
2017-03-21 08:03:29 -07:00
Ben Walker
6d7b6e882c bdev/aio: The user now provides the names of AIO bdevs
The user now must choose the name for each AIO bdev. This
provides consistency for names across restarts.

Change-Id: I13ced1d02bb28c51d314512d60f739499b0c7d8d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-20 15:18:03 -07:00
Tomasz Zawadzki
d329d85774 vhost: QEMU arguments changed to fit patches on QEMU mailing list
This patch changes following:
- device renamed to vhost-user-scsi-pci
- VM image set as first in boot order

Additionally cleaned up test paths.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Krzysztof Jakimiak <krzysztof.jakimiak@intel.com>
Change-Id: Ib89954ba083bf047e1a46bc350345e42272badd9
2017-03-20 13:01:52 -07:00
Daniel Verkamp
790bad22c3 nvmf: add discovery controller ops
Simplify code that previously needed to check for subsystem type by
factoring out the discovery controller operations into a new ops
instance.

Change-Id: Id87b498e4623451993fe779ffb765be5a6743fd9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-17 15:55:36 -07:00
Daniel Verkamp
d535f9b7bb nvmf: split discovery service into its own file
No functional change, just rearranging code.

Change-Id: I28328dfefd7de269d326834c484f2c2fca4e6c1f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-17 15:55:36 -07:00