Commit Graph

1828 Commits

Author SHA1 Message Date
Tsuyoshi Uchida
4c8a8f09f3 iscsi: delete the unnecessary comment (#110) 2017-02-13 09:50:45 -07:00
Ziye Yang
0456bd08cd nvmf/conf: call spdk_nvme_probe_cb via trid
Change-Id: Iae11ebd2c565d8f0d806bcca3615147fe3261e91
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-02-10 12:51:13 -07:00
Daniel Verkamp
59fc5ba613 nvme: fix extended LBA block size calculations
For namespaces with end-to-end protection information, metadata size
of exactly 8 bytes, and extended LBA configured, the NVMe driver would
calculate the size of the data block incorrectly.  The NVMe spec has a
special provision for this specific case (8-byte metadata only) and
PRACT = 1 that requires that the host does not send the metadata as part
of the host memory buffer.

To fix this, clean up the calculation of the per-block data transfer
size by adding a new extended_lba_size field in the namespace, which
represents the total size of data to be transferred per block based on
the namespace's configured metadata size and whether it transfers
metadata as part of the data buffer.  Then add the special case for
PRACT = 1 and PI configured and extended LBA in the R/W helper
functions.

Change-Id: I0b383a58c773cac06e6c018858b57129064c6059
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-10 10:24:26 -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
84d904841f util: move common helper functions to util.h
These were repeated a few different places, so pull them into a common
header file.

Change-Id: Id807fa2cfec0de2e0363aeb081510fb801781985
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-10 09:38:52 -07:00
Liang Yan
187ec2fde2 nvmf: Add AIO config in nvmf.conf.in
Change-Id: Ibd00ea0309a4cf8339beecea8f36e472c49fbbf1
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
2017-02-09 15:23:42 -07:00
Jim Harris
d0d946ddb4 test: add an spdk_malloc implementation for test_env
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6f738d510fde00d5d068dd530885d8b0b5e17035
2017-02-09 11:03:11 -07:00
Jim Harris
5efd4b8800 test: move test_env.c to a more generic location
This prepares for using this in tests for other libraries.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibd4d12006d602f772cd9253f3eab9d47c0593767
2017-02-09 11:03:11 -07:00
Ziye Yang
86f80d2d70 doc, nvmf: change discovery to discover
Change-Id: If545f24d4737c190bc90e4a82155cbddbfef5bb0
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-02-09 09:56:36 -07:00
GangCao
fcdb601ea5 nvmf: continue rdma_poll even meets error
Change-Id: I82fc3e939cc82a696b4c0b186bbc1d6cd82b8b54
Signed-off-by: GangCao <gang.cao@intel.com>
2017-02-08 10:09:02 -07:00
Daniel Verkamp
48519cba2f test/ioat: run ioat_kperf in autotest
Change-Id: I8afc3869c7b854339d9308375ef3ebd47ec99115
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-08 09:45:09 -07:00
Daniel Verkamp
ff0047816d nvme: track submit time instead of timeout time
This removes one addition from the submission path (negligible, but a
nice side effect), but also opens up the possibility of reporting the
total time an I/O took - since we are always tracking the submission
time anyway, there is no extra cost to report it in the completion
callback.

Change-Id: I7129e7c09d20da8082042a7622d045846461dd9c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-08 09:23:58 -07:00
Daniel Verkamp
4a1d47ebea barrier: add compiler barrier and use it in MMIO
spdk_compiler_barrier() prevents the compiler from moving pointer
dereferences across the barrier.

Use this in the MMIO helper functions to ensure that the compiler can't
reorder operations around e.g. hardware register access.

Specifically, this fixes the compiler optimizing out writes to
g_thread_mmio_ctrlr in the NVMe hotplug handling code.

Change-Id: I6b9cec48da0e6d8d75825c28b12ece5251110080
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-08 09:20:41 -07:00
Ben Walker
4baf5962e9 nvmf_tgt: Use new ip parsing utility function
Change-Id: Ia6575f8d7fb8be8002a5c1fec0abf04f837a0545
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-02-07 18:06:08 -07:00
Ziye Yang
38980dedfa nvmf,tgt: fix issue while shutting down nvmf tgt with CTRL + C
The phenoemon is that we can not shutdown the nvmf tgt.
The solution is that we need to adjust the shutting down orders of
nvmf tgt subsystem and rdma trasport layer.

Change-Id: Ie39657370b1574960e0ee7cf604cc5872db0bed3
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-02-07 17:43:45 -07:00
Ben Walker
08238af7ee util: Add a function to parse ip addresses.
This function parses in place by inserting null terminators.

Change-Id: I61cb97b87ec05d0183fbaa993fd3d7580a188bde
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-02-07 17:12:38 -07:00
Chun Liu
8314b54996 nvme/fio_plugin: fix compliation with recent FIO
Fixes compilation after fio commit
565e784df05c2529479eed8a38701a33b01894bd ("Don't malloc/memcpy
ioengine_ops on td initialization").

Change-Id: Id7138e774e523af3a27ac24e08b8ccd05a3ed77a
2017-02-07 15:42:36 -07:00
Daniel Verkamp
a9133b405a env/vtophys: expand vtophys map value to 64 bits
Split the ref_count field of the bottom level of the vtophys map tree to
a separate array so that the pfn_2mb field can be expanded to a full 64
bits again.  This doesn't change behavior for the current use as a page
frame number; it is setup work for storing an arbitrary 64-bit pointer
value in the bottom level.

Change-Id: I0bc44df3edc9df4a479229d69c2f3884d43a340d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-07 15:13:22 -07:00
Ziye Yang
6f8a505d23 nvmf: cleanup spdk_nvmf_rdma_close_conn
No need to return

Change-Id: I902162dfa8bc21cc160f690bb20085d56bc29a13
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-02-07 15:10:03 -07:00
Changpeng Liu
04ddd8f2c9 examples/ioat: fix the stop flag issue for kernel test tool
The "idle" status has 2 meanings for IOAT kernel performace
test module dmaperf: performance test task has finished or
no performance task at all. For the lastest kernel(4.8), the
userland tool will get the "idle" status before the kernel
changed to "running", but for some older kernels(3.17,4.0)
the test tool run correctly. So add a sleep syscall before
to get the status will fix it.

Change-Id: Ia236416607c77b3b8689933fe71ce53a783a04cc
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-02-07 15:07:07 -07:00
GangCao
200217a47e nvmf: poll the NVMe subsystem once under more sessions case
Change-Id: Ie13a787eb0ff3b6b95fb6796871ac0b747b992ad
Signed-off-by: GangCao <gang.cao@intel.com>
2017-02-07 14:54:28 -07:00
Daniel Verkamp
b3d229e02a iscsi_tgt: add modules to dependency list
Make sure iscsi_tgt gets rebuilt when a blockdev or copy module is
modified.

Change-Id: Ia10cfbb4b71b686e9a97c68be1d50ae1eebac21f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-03 15:15:38 -07:00
Daniel Verkamp
9b38556afe bdev/split: pass correct bdev to base_bdev functions
Since the io_channel will be passed to the underlying bdev's
read/write/... functions later, we need to also acquire an io_channel
for the underlying bdev, not for the virtual bdev.

Change-Id: Ica13076973fef875ea636770fce8eb27017aa1c3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-03 15:15:07 -07:00
Daniel Verkamp
ad063db506 nvmf: apply const to several char * arguments
These strings are not modified by the functions they are passed to, so
they can be const char *.

Change-Id: I11532f232990a305d706c14aac1b0f8f93b8f576
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-02 09:45:29 -07:00
Daniel Verkamp
b913ad119e test/bdev: shorten bdevperf autotest
Change-Id: I1234f7dbb4a96b5790bb70800148cf6827810b4d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-01 16:44:24 -07:00
Daniel Verkamp
0a701f3a1c test/event: run autotests for shorter times
Change-Id: I1e70e15236b123608972fab00fddd1d157134a8a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-01 16:44:24 -07:00
Daniel Verkamp
1d3edefbcf build: remove -Wunused-result flag
This flag is on by default for compilers that support it, and it
prevents compilation on older compilers that do not recognize it.

Change-Id: I862cff6297ecd4fc40f2f8761bf398d524771921
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-01 09:51:49 -07:00
Daniel Verkamp
d57f3db1b5 nvme: clarify nvme_ctrlr_set_state debug prints
For infinite timeout states, instead of printing UINT64_MAX as a
decimal number, interpret it as "no timeout" instead.

Change-Id: I579f5857f96286734940ab5f493261e60354c4fe
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-31 18:06:09 -07:00
Daniel Verkamp
459cd69571 test/nvme: set DPDK base address for multi-process
Map the DPDK hugepage virtual address space to an area that should not
interfere with randomized mmap() addresses.

Change-Id: Iffc657858f861fc1316f77b68f9f121167d604b1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-31 16:00:46 -07:00
Daniel Verkamp
018e6afff2 nvme: remove ctrlr_get_pci_id transport callback
The PCIe transport initializes the quirks directly, so the generic hook
to get PCI ID is no longer necessary.  This path was dead code.

Change-Id: I25bdaa598db53e4312a264d9d8356d1b416696e5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-31 14:50:40 -07:00
Daniel Verkamp
a384110d7a nvme: move nvme_qpair_fail() call to generic code
The logic to fail queue pairs when the controller is failed should be
handled in the generic code, not in the individual transports.

This also allows nvme_qpair_fail() to be private to nvme_qpair.c.

Change-Id: I6194576dceb35073b9af8847e59314900028637c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-31 14:50:40 -07:00
Daniel Verkamp
b71c31335d event: move component descriptions to doc/ and rewrite
Change-Id: I53b061933319204f9153423fa18532712676287a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-31 14:50:29 -07:00
Daniel Verkamp
47eec4329e env: add API to get NUMA socket ID of a PCI device
Change-Id: Ic13298752bd5c68e3449d7dc004bd466ef468085
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-31 14:50:18 -07:00
Daniel Verkamp
bcd1dc93fb bdev/split: copy base bdev max_unmap_bdesc_count
Change-Id: I33082c3493f489f12d484ad450be27c4404b2a47
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-31 09:58:27 -07:00
Daniel Verkamp
aac10bf92c event: call MP/SC ring functions explicitly
Avoid a runtime check for the rte_ring type - we know that the event
ring is multi-producer/single-consumer at compile time.

Change-Id: I5d42aee9c635db86e545b661361a68818d80961d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 15:01:08 -07:00
Daniel Verkamp
cfa8a2a989 nvmf_tgt: save unmap descriptor pointer in request
Avoid accessing the internals of the bdev_io from outside of the bdev
library.

Change-Id: I01dfc38b2520353ad42bcd8587b90f197eadf101
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 14:23:33 -07:00
Ben Walker
eb2ec1b07b nvme/rdma: Reap multiple completions per poll
This is more CPU efficient than only grabbing one
completion per call to ibv_poll_cq.

Change-Id: I0c70d33639f0f345482d9e7c810f9c6723937058
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-01-30 14:16:05 -07:00
Daniel Verkamp
378fc7787c test: clean up redundant process_core invocations
The main autotest.sh script automatically runs process_core as needed.
Individual test scripts should not be calling it.

Change-Id: I19d8799cd39f37f4768d8d89d3ece6aa993a6c95
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 14:08:38 -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
72ad2c0173 doc: cut out whitespace between header and content
Change-Id: Ic839ac1466f3f16c1a2c6b2066209b580ced8058
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 14:08:06 -07:00
Daniel Verkamp
2c0bc38754 bdev: add "split" virtual blockdev example
This virtual block device takes an underlying block device and splits it
into several smaller equal-sized block devices.

Change-Id: I6f6e686c1177b2e4885f7e88809ad329caae55bd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 13:51:18 -07:00
Daniel Verkamp
efccac8c7e bdev/nvme: remove NvmeLunsPerNs and LunSizeInMB
These were only intended for testing and should be replaced by a virtual
blockdev that can be layered on top of any kind of bdev.

Change-Id: I3ba2cc94630a6c6748d96e3401fee05aaabe20e0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 13:51:18 -07:00
Daniel Verkamp
c6952d45df event: replace outdated reactor run loop comment
The work item queueing code was replaced with the current reactor/event
model, but the block comment above _spdk_reactor_run() wasn't updated to
match.  Replace the pseudo-code with something resembling the current
behavior, and delete the outdated paragraph below it.

Change-Id: If0686c6a5d063f56d8ea3df9bf3a1e98eef40207
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 13:06:21 -07:00
Daniel Verkamp
b809cdd3ab env: add spdk_mempool_create() socket_id parameter
Change-Id: I8ab0bb2c6e1fdf1681fbd049a096c1768e54dc27
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 13:05:30 -07:00
Daniel Verkamp
4c55092882 env: add a name for special "any socket ID" value
Change-Id: I1f339ee5ff80eee9cf7d6378daa71e2f59c158b2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-30 13:05:30 -07:00
Ziye Yang
4440cd8d28 nvmf: Solve subsystem add/delete issue
When we do frequent same subsystem add/delete,
we will face the adding issue. For example,
1  Add subsystem A
2  Delete subsystem A
3  Add subsystem A  (Fail in this step).
The reason is that we did not correctly free
the listener resources of subsystems, and this patch
can solve this issue.

Change-Id: I6765a306a3f10c9a0f38c95dbba12e2a4073e705
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-01-30 11:14:38 -07:00
Ziye Yang
bd2697e6b0 ioat, kperf: fix the testing output.
The previous performance caculation is wrong,
which is smaller than the per channel performance,
so fix it with the average performance data.

Change-Id: I40580e5f70fb4273fa080bbdfb17ce85436446aa
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-01-30 10:42:36 -07:00
Fan Lu
23dd35a729 test/nvme: add nvme_ns unit test
Change-Id: I4c32a3dfad21e759d63c23683b119a1eb5870545
Signed-off-by: Fan Lu <lux.fan@intel.com>
2017-01-30 09:57:38 -07:00
Fan Lu
fb85072562 test/nvmf:add virtual.c unit test
Change-Id: I48aab13b93f3b231c799a82e0044fa3eae8d5df1
Signed-off-by: Fan Lu <lux.fan@intel.com>
2017-01-27 10:54:28 -07:00
Daniel Verkamp
aaa87dc00e env_dpdk: allow linking against DPDK shared libs
Detect whether the specified DPDK directory contains static or shared
libraries, and use the appropriate extension when building the library
list. Static libraries are still preferred.

Change-Id: I78c68fd38fba1ea42dd605fb77209651f8cdca75
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-26 10:51:11 -07:00