Commit Graph

1900 Commits

Author SHA1 Message Date
Daniel Verkamp
e00bb0e984 ioat/kperf: replace sprintf() with snprintf()
Change-Id: Ifb3170a49cc388da30a080c9e6df293bf945c81a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-24 14:04:19 -07:00
Daniel Verkamp
d540f448b4 iscsi_top: replace sprintf() with snprintf()
Change-Id: Idcd9f088f07026be45ba5ba9e6e4f16454ba9acd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-24 14:04:11 -07:00
Ziye Yang
dc1a2f814e bdev,nvme: check the return value of spdk_nvme_ctrlr_get_ns
Change-Id: Icae49d87562b07e80099622681cdf83fa6930b30
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-24 12:18:51 -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
Daniel Verkamp
07295a8155 Revert "travis: disable vhost build on Travis-CI"
As of commit 6e2d7be8a1 ("vhost: add copy
of virtio headers"), we bundle the appropriate headers that were causing
the Travis-CI build to fail, so re-enable vhost in the Travis build.

This reverts commit 2d0246da83.

Change-Id: Ib52f66c91264aee138e420606ae1f16824aa3c10
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-24 10:53:23 -07:00
Daniel Verkamp
0d752e42f8 scsi: ensure LUN name is null terminated
Change-Id: I2c0d0d9dd4f4b852401f21b65142ee85c29f3c62
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-24 10:52:48 -07:00
Daniel Verkamp
2b0b705fb1 reactor: make sure socket_count isn't zero
Avoid division by zero in the event mempool cache size calculation.

Change-Id: Ic117ef2dc3a798fb0a57572f1178233e83e73849
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-24 10:52:28 -07:00
Ziye Yang
31b81b0dd6 bdev, split: check the memory allocaton of spilt_base
Change-Id: I4cc3d6e5397143b0b98d4a222c01a76128093191
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-24 10:52:05 -07:00
Cunyin Chang
b6671531ad event: Verify log_facility is not NULL before using it.
Change-Id: Ia20d8764c2c91c200d06b7017ed06060e40cc2ed
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-24 12:33:00 +08:00
Ziye Yang
fea78497a1 lib/vhost: Handle realloc failure
Change-Id: I47157e33e306205fa261e65e4b99fa13c1f1148d
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 16:04:27 -07:00
Cunyin Chang
1bbb43c544 nvme: Replace some strcpy with snprintf
Change-Id: If80ae64fa672ae6b847ad985be6862e5d2b3729b
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-23 15:26:07 -07:00
Changpeng Liu
c3ec79faee examples/perf: update usage information
Change-Id: I427075ead5fcdc15f03e6086d55d59b6b1030b26
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-03-23 15:04:03 -07:00
Dariusz Stojaczyk
0e2ea8797f bdev/nvme: remove dangling pointer from g_nvme_bdevs list on bdev_nvme destruction
It was causing segfaults and infinite looping.

Change-Id: I4c19b5d3af1ba1360250cd5f6aa573a27003409f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-03-23 14:40:35 -07:00
Cunyin Chang
118c08154e lib/env_dpdk: exit if allocating dpdk_args fails
Change-Id: Ib7268d679ed73e73b5bc20f08dc381315ee4fd9d
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-23 14:33:10 -07:00
Daniel Verkamp
48ee3eba39 autotest: look for core.* in process_core
Match the default FreeBSD core file location as well as the Linux one.

Change-Id: I4c9803d314e89dc7982682c145a83e41dc9027e4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-23 13:53:58 -07:00
Daniel Verkamp
6e2d7be8a1 vhost: add copy of virtio headers
This enables the vhost library to build on systems missing the (fairly
recent) linux/virtio_scsi.h header.

Change-Id: I680863b26961ec3cbe4ad4e575555454f6461bbf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-23 13:51:04 -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
228a81f1bc lib/net: Replace sprintf with snprintf
Change-Id: I86999b8f8ad4363e163c7e3f8d46dd49fb7c848c
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 13:30:09 -07:00
Ziye Yang
0c0582d3ce event: Verify lcore is valid when registering poller
If we do not do a bounds check, this can run off the end
of an array.

Change-Id: I43cc4848fca7d68218e507db20e33823f8b550e4
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 13:30:04 -07:00
Daniel Verkamp
4b887a8cbc nvmf: start even if no transports are available
Attempting to add a listen address for an unavailable transport will
fail with a better error message.

Change-Id: If4cf5b66c16dadcb6e0f0b28cea4aa510ba6a9fc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-23 13:17:52 -07:00
Daniel Verkamp
7035c39136 nvmf: print error if transport name isn't found
Rather than failing silently, let the user know why the listen address
failed.

Change-Id: I41c2a51c6071ee739b282a1a39198a2887a73c4d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-23 13:17:52 -07:00
Daniel Verkamp
9412e60062 nvmf: check spdk_nvmf_tgt_listen() return value
spdk_nvmf_tgt_listen() can fail due to invalid user input (e.g. from a
config file), so we can't just assert() that it worked.

Change-Id: Iea2d4ab2c82d79f6eada24e6082456489bf304b8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-23 13:17:52 -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
Changpeng Liu
4ed8870958 vhost: add gitignore the vhost application
Change-Id: I9f73fa558f104eeb4295074ec0000d0eab94dd2d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-03-23 10:15:22 +08: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
Daniel Verkamp
2563429809 nvme: convert uevent failure message to TRACELOG
The message about the uevent socket is not a fatal error; it just means
that hotplug monitoring will not work.

Change-Id: I29f6a253e96a86420c0fde9e19135f9f1d229bb9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-21 15:39:21 -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
Seth Howell
39ad6c3151 bdev/nvme: Fix null terminator checks in trid
The fields are char arrays, not pointers.

Change-Id: Ieb21e7a70853ed582e459d167a66b1aa5b8c93d3
Signed-off-by: Seth Howell <seth.howell@intel.com>
2017-03-20 14:13:10 -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
Cunyin Chang
1054432d06 doc: Add initial documentation for iscsi hotplug.
Change-Id: I432b83c9bf4a39cd061579d0318b91903299e080
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-17 16:06:26 -07:00
Cunyin Chang
3979c15f66 doc: Add initial documentation for nvme hotplug.
Change-Id: I67303d07aee931d19b3a9ae1e618d22fc6de9f58
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-17 16:06:20 -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
Isaac Otsiabah
f5b56f6356 examples/nvme/fio_plugin: update to FIO 2.18
The enum fio_filetype member FIO_TYPE_DB has been changed to FIO_TYPE_BLOCK.
2017-03-17 15:26:09 -07:00
GangCao
7f819108bd doc: add the documentation for NVMe Multi-Process feature
Change-Id: Iace3e4f1804be19f46044ee3b2530e49c8adf4d8
Signed-off-by: GangCao <gang.cao@intel.com>
2017-03-17 14:44:03 -07:00
Ben Walker
1f38243914 nvmf/rdma: Combine RDMA WRITE and SEND into single post
When data needs to be transferred from the controller
to the host, do a single ibv_post_send containing
both the data and the completion.

Change-Id: I072c545b31593e0e324c97ed700b42c6a4c358e1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-17 14:42:06 -07:00
Ben Walker
6696fce7ae nvmf/rdma: Manually inline nvmf_post_rdma_send
This call had been reduced to a simple wrapper
around the ibv call. Delete it.

Change-Id: I42926d123db262617119a9cff77bc0d0eb1e8f31
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-17 14:42:06 -07:00
Ben Walker
7488116a78 nvmf/rdma: Manually inline nvmf_rdma_post_[read|write]
These functions were only called from one place and
their functionality has been reduced to a wrapper
around the underlying ibv call. Remove them.

Change-Id: I65182012dbe6393b9d57f4191fd327bcd025a6c8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-17 14:42:06 -07:00
Ben Walker
a4a3b5e7fd nvmf/rdma: Move all SGL setup to the prep_data step
This keeps all SGL handling in the prep_data function.

Change-Id: I9bfeed3748c1b329288350b85aa87bd604cfce4e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-17 14:42:06 -07:00
Ben Walker
e0bdfb14ee nvmf/rdma: Manually inline nvmf_rdma_post_recv
Now that all of the SGL mappings are static,
this function just called ibv_post_recv. Delete
the function and call ibv_post_recv directly.

Change-Id: I45216170a157709249b08c4cb0ebdb1adb906049
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-17 14:42:06 -07:00
Daniel Verkamp
2d0246da83 travis: disable vhost build on Travis-CI
The virtio_scsi.h header is not available in the version of
linux-libc-dev shipped with Ubuntu Trusty.

Change-Id: I442f2cfc160b166b56b3c0b6f2f3ff02df971abb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-17 14:36:18 -07:00
Pawel Wodkowski
4a385f2c38 vhost test: print qemu.log
Change-Id: I4e1b9118906df1e7f62204b1e1f3888aac9f9656
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2017-03-17 14:28:10 -07:00
Daniel Verkamp
6369fd2395 travis: update to Ubuntu Trusty environment
Change-Id: Ia0eb918b6a20ae1d57fca380adb62a2e20e9f661
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-17 13:40:33 -07:00
Daniel Verkamp
d9aed01ff0 nvme/fio_plugin: simplify getevents/event hooks
The previous implementation tried to maintain a ring buffer of completed
I/O retrieved from ->getevents() that had not yet been retrieved by
->event(), but this is not necessary.  None of the other FIO engines
implement this sort of ring buffer, and the only code that calls
->getevents() will always retrieve the full number of events via
->event() afterwards.

Instead, just count how many I/Os have been completed within each
->getevents() call in iocq_count, and reset iocq_count on each new
->getevents().

Change-Id: I2776c3a5c89a0d2b24478328bc138ff7a9fb5bdd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-17 09:37:42 -07:00
Dariusz Stojaczyk
b276649c98 vhost: check if file is a socket when creating a controller
This patch makes create_vhost_scsi_controller check if given file is a socket before deleting it

Change-Id: I7a37c12913b461f779732e724c85e2f7b5d67442
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-03-17 08:59:02 -07:00
Ben Walker
cc294653ca nvmf/rdma: Send data and completion at the same time
For an NVMe read, send the completion immediately
following the RDMA WRITE, without waiting for
the acknowledgement. RDMA is strictly ordered,
so the WRITE will arrive before the completion.

Change-Id: I7e4e01d7a02c2130b655ef90f5fdaec992d9361a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-16 16:44:45 -07:00