Commit Graph

78 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
29a3efdd26 test, aer: continue sending admin commands while waiting for AER
Change-Id: I44b9dfc0657bc2d26f2ddb10797628c901028ea1
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-15 18:40:52 -07:00
Ziye Yang
97660c1adb nvmf,test: Add frequent nvmf subsystem add/delete test
This patch creates a new test case: use rpc to
frequently add/delete a same subsystem to verify the
correctness of our code.

Change-Id: Ib582061f9fa909f271bea4865df29a3f432f807c
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-13 10:51:24 -07:00
Xiaofan Yang
de850e57cf test: Reduce one subsystem for nvmf/multiconnection nightly testing
Change-Id: I10155fb4e2042e1823408ba3c0295aa7e4c8b9a7
Signed-off-by: Xiaofan Yang <xiaofanx.yang@intel.com>
2017-03-03 17:08:50 -07:00
Daniel Verkamp
3139c76394 test/nvmf: handle 'nvme disconnect' non-0 return
Newer versions of nvme-cli return a non-zero status from the disconnect
command when it is successful.  Catch this in the test scripts so that
the tests don't consider this a failure.

Change-Id: I3abf4042ec8b0bc8aed5a4c36128ae73230aa190
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-03 16:53:59 -07:00
Daniel Verkamp
44ceff8c17 test/nvmf/shutdown: reduce number of subsystems
The setup.sh parameters we use in autotest don't allow for enough RAM
for 12 subsystems; reduce it slightly while still testing a large
number.

Change-Id: I595589db6e5199ad87ad9511bb0ad63b7b60211d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-02 09:55:05 -07:00
Ziye Yang
bfe2897da3 nvmf,target: solve shutdown coredump issue
It is caused by this commit:
4163626c5c

nvmf_tgt_delete_subsystem registers the poller
with function subsystem_delete_event.
subsystem_delete_event is called asynchronously,
the deletion should happen in this function.
Otherwise, with the current code,

g_subsystems_shutdown = true
TAILQ_EMPTY(&g_subsystems) = true
when subsystem_delete_event is firstly called.

If there are multiple subsystems, the logic is wrong.
Thus other subsystem will never be delete. since
we already execute shutdown_complete().

Also add related test scripts.

Change-Id: I3823563fc9e8611c11a6d798685ff64e2939842e
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-02 09:39:48 -07:00
Ziye Yang
0801877b7d nvmf,direct: add AER support in direct mode.
After checking the code, aerl in our session is 0,
so there will be only 1 AER. So currently,
we will only handle 1 AER case.

When the AER event is triggered by real NVMe device owned
by the subsystem, it notifies all sessions belonging to
the subsystem.

Change-Id: Ia80fb0f03e893c20d8dd14afbed8db10db38301c
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-01 10:47:52 -07:00
Xiaofan Yang
25083abc12 test: add nvmf/multiconnection testing into autotest
Change-Id: Iacc4e8c5918bd522234075aeb8d6657649fd9ea4
Signed-off-by: Xiaofan Yang <xiaofanx.yang@intel.com>
2017-02-14 10:36:03 -07:00
Ziye Yang
3c441d69e5 nvmf,host: add "direct mode" subsystem for test
Change-Id: I6d0abf5fd467888db64c14d2da0d5a77ed7d05bb
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-02-10 09:54:49 -07:00
Daniel Verkamp
b33a298dd7 test/nvmf: drop unnecessary chmod of /dev/nvme-fabrics
The autotest.sh script is already running as root, so we should not need
to change the permissions on /dev/nvme-fabrics.  This block has just
been cargo-culted across the various NVMe-oF test scripts.

Change-Id: I078ebf102d3fc354e42be9c6f1fc37481ffae291
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 14:08:38 -07:00
Daniel Verkamp
7a8840c09b nvme/identify: convert NVMe-oF to -r TRID format
Change-Id: I620331e2a865d399bddf2e5759f0a832f9c2e86b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-25 16:31:38 -07:00
Daniel Verkamp
094524ba9e test/nvme/host: test perf with QD 128
This reverts commit 456540bcf5.

Change-Id: I90ddf9f5adb0546e2819408b46e414e979528e48
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-20 17:07:48 -07:00
Daniel Verkamp
042452af55 nvme/perf: convert -r argument to TRID format
Change-Id: Ib0568ace157c19c9a86741b7d46fcf5cdb8cdb69
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-19 14:05:57 -07:00
Ziye Yang
d61ddd3c93 nvme/rdma: Support directly connect via trid
Preivously, we only supports probe the NVMf target
via discovery info, now we can support to directly
to connect it.

Change-Id: I08ce1d95de6744286357e68b48c97b773b902ac8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-01-13 10:57:03 -07:00
Jim Harris
456540bcf5 Revert "test/nvme/host: test perf with QD 128"
This reverts commit c1e6d94269.
2016-12-20 16:40:46 -07:00
Daniel Verkamp
c1e6d94269 test/nvme/host: test perf with QD 128
Change-Id: Ic4658e82b90896f5041fe3aa2c7d5e6eaac3b878
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-20 13:49:57 -07:00
Ziye Yang
0d7ce601cb nvmf host/test: upgrade the test script to use spdk's own identify
Change-Id: Icb02a38767698da0eff79db90999d616c6e5e3a8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-12-07 12:34:02 -07:00
Daniel Verkamp
6c68441e14 test/nvmf: don't echo newlines when configuring kernel target
If we use regular 'echo' without -n when setting up the kernel target
sysfs entries, the traddr and trsvcid will contain the newlines, so use
echo -n to prevent the newlines from being added.

Change-Id: I924ffc0d1957eed25e97a12fe12d43d390176c05
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-07 12:34:02 -07:00
Ziye Yang
87eb023afe nvme/rdma: Add identification test for kernel nvmf target
Change-Id: Ibcfdf1a451f88e186ae328560c21480c81dc44b3
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-12-06 16:35:50 -07:00
Ziye Yang
4a0c1021fc nvme: update nvme perf program to test nvmf target
1 update nvme_rdma.c to fix the I/O queue creation bug.
2 update examples/nvme/perf/perf.c
3 add perf.sh

Change-Id: Ic7d4845219deb93bc042e34abbb7b2e05793ccd8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-12-02 08:41:12 -07:00
Daniel Verkamp
8b45a830c4 test/nvmf: put host tests into a timing group
Change-Id: I4efecdd273a8a83ee9f2bb249141129a0ba82ee3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-30 09:56:51 -07:00
Daniel Verkamp
9589f0371a test/nvmf/host/identify: remove unrelated cruft
This script is testing the SPDK NVMe-oF host and target code, so the
kernel nvme-rdma driver should not need to be loaded.

It is also not running FIO, so it doesn't need to clean up the FIO
job state files.

Change-Id: I3cfe619abf36885df4bdc6eecebf0e197fb869be
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-30 09:56:51 -07:00
Ziye Yang
246c39a7ee nvme: Add nvme over fabrics support
Change-Id: I6f6259e77baa5dc5861f31ec4a9034e15297d333
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-11-18 13:58:44 -07:00
John Kariuki
ac2aee6725 added nvmf subsystem discovery via RPC
Change-Id: Ia2bcc5e8b4d1b1f5ca698e65cdc6ec3a4fd4aa8e
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
2016-11-07 14:07:37 -07:00
Liang Yan
e3580da167 test: Use lspci to discover default kernel drivers
Instead of searching /sys for devices and checking which
driver happens to be loaded, use lspci. The lspci tool is
a bit smarter - it knows which driver is loaded now but
also which driver is the default driver the kernel wants
to load for that type of device. It's that default that
we need.

Change-Id: I1dc01ab6eac233e85f42316567bde2f4ed2203c6
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
2016-11-02 16:37:40 -07:00
Daniel Verkamp
91d7bf5d15 test/nvmf: use bdev names from construct_*_bdev
Replace hard-coded list of Malloc0 Malloc1 with dynamically-generated
list based on the names that were returned from the bdev creation RPC
calls.

Change-Id: I2171b650fa540184de0e6dfd6bb5f66611e9c0d8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-31 11:19:24 -07:00
Cunyin Chang
706bace35a test: Create malloc bdev dynamically for nvmf test cases.
Change-Id: I64ec6eb16ff8480ce95fbd2c07d479c4d05965e9
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-10-18 09:51:32 -07:00
Daniel Verkamp
4afe9d1acb nvmf/rpc: make hosts parameter optional in create
Instead of a magical "All" value for allowing all hosts, allow the
caller of construct_nvmf_subsystem to omit the "hosts" parameter.

Change-Id: I97c7ae806a0be7142fb59708d47023e42e127fcc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-10-13 08:50:03 -07:00
Cunyin Chang
d7734d165b test: Use rpc methods to create nvmf subsystem.
Change-Id: I5db50a2db0b7096a10fb97406d51410c1678dc92
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-09-27 12:04:05 -07:00
Daniel Verkamp
f9967879c6 test/nvmf: disable trace log level
The trace logs were useful during development, but now that the target
is working reliably, we can make the test output quieter and shorter by
turning them off.

Change-Id: I46cd2e22a3ccd69a5f94a1843b722f517223a343
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-09-08 10:09:59 -07:00
Daniel Verkamp
3e9ddce6f3 test/nvmf: add virtual subsystem to nvme-cli test
Change-Id: I4880e227b90949a26670900baed6f6bcf836a66e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-30 09:28:15 -07:00
Cunyin Chang
b4d9cca109 nvmf: Add support for virtual controller.
Change-Id: I413553fcf7315038b4ce4ac9ebea70fffbec9a3d
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-08-25 15:02:21 -07:00
Ben Walker
a9f1988ed6 nvmf: Use nvme-cli to connect inside tests
Change-Id: I953a41a54e8eddcf07a8fa607c9a1e1a34e2b20c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-08-19 10:53:06 -07:00
Ben Walker
f0ab59a325 nvmf: Include the JSON RPC server
This allows live configuration of the target, much like
the iSCSI target. More function calls will be added
over time.

Also, make the tests wait until the target is listening
on the RPC port to determine that the target is ready.

Change-Id: I8f762e49511d482ef820f6b25a7d3ad9a8bb41f9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-08-19 09:47:04 -07:00
Daniel Verkamp
0d61bf4b50 autotest: move NVMe device cleanup to startup
Make sure any partition tables or other random data on the disks is
cleaned up before running the tests, rather than trying to clean it up
on failure when the system is in a potentially bad state.

Change-Id: Ia2119485aee6a50243744328dff2314d7a72adad
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-17 09:04:16 -07:00
Daniel Verkamp
6697ff02f9 nvmf: test nvme cli over NVMf
Change-Id: I2d71945edc9596775092b59f70ca108c775b322e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-05 12:51:30 -07:00
Ben Walker
8e1a8b8752 nvmf: Change fio tests to write and verify
No need to do read and writes plus verify - the verify is
a read itself.

Change-Id: I28d08717e49b1327b04490810f8e6069504173c2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-26 09:24:31 -07:00
Ben Walker
e660e677b8 nvmf: Delete partitions when tests end
Change-Id: Ia30e037e98df8b0c781ce769453bbf891091334d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-26 09:24:31 -07:00
Ben Walker
0e1dcce24a nvmf: Disconnect the initiator on test exit.
Change-Id: I8e640a77dc4c17582ff5ec0a4daba4f1d509c30c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-25 14:12:58 -07:00
Ben Walker
944695ca21 nvmf: Remove controller.[ch] and probe for each subsystem.
This is a much simpler approach and is only slightly
less efficient.

Change-Id: I909de376d576a74156c1be447e90e7dbc240f025
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-22 09:24:45 -07:00
Cunyin Chang
d439f4408a nvmf: Add subsystem modes
Change-Id: I74f69eb10e4d8807a323f463775f4953fe0baee0
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-07-21 17:45:06 -07:00