Commit Graph

599 Commits

Author SHA1 Message Date
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