Commit Graph

202 Commits

Author SHA1 Message Date
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
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
c3c851f677 nvme/identify: show atomic write unit parameters
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id5bcf3cb1486500a69c68989e28caeb634607954
2017-04-17 11:56:36 -07:00
Daniel Verkamp
4f9f191c89 nvme/perf: align buffers to block size for libaio
This is required by libaio.  Previously, buffers were aligned to 512
bytes, but 4K devices need 4K-aligned buffers.

Change-Id: I96080e72dc77e0e72f426f7c9fe98b6724f66e1b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-06 14:57:33 -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
84230409fd examples: Simplify register_workers algorithm
Several examples have a function to associate workers
with threads. Simplify that algorithm.

This seems to just shift some of the complexity
from register_workers down to main, but in the long
run the DPDK threading will get abstracted into
env as well and greatly simplify that part.

Change-Id: Ic106dde58fa5351a1ce0a058161b08062e121d3b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-04-05 11:13:52 -07:00
Jim Harris
9ee30b87b7 fio_plugin: enforce thread=1
The SPDK fio plugin only supports jobs as threads, not separate
processes.  So log an error and bail if --thread=1 is not
specified.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I318f924e0b7fbb76f11427a447dd7c5fc0ebc221
2017-04-04 09:12:41 -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
Ziye Yang
21ce0f4030 examples/nvme: replace sprintf with snprintf
Change-Id: I08c594e26df9e1cdae67596e92db646c92701f85
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-27 13:54:49 -07:00
Ziye Yang
fcc2eec870 nvme_manage: Rely on fgets to NULL terminate string
fgets guarantees that strings returned are NULL terminated,
so delete logic that attempts to insert a NULL terminator.

Change-Id: Ibeadcda9af431091b04daff41596d5738419b43f
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-27 12:55:04 -07:00
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
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
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
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
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
Daniel Verkamp
b58a5d73ef util: add SPDK_COUNTOF() array size macro
SPDK_COUNTOF works like sizeof, except it returns the number of elements
in an array instead of the number of bytes.

Change-Id: I38ff4dd3485ed9b630cc5660ff84851d0031911f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-07 12:43:42 -07:00
Daniel Verkamp
ba5081db23 examples/nvme/perf: set io_queue_size in NVMe probe
Since we know the queue depth that we will be using during the test,
request that as the queue size when attaching to NVMe controllers.

Reserve one extra queue entry above the expected queue depth since NVMe
queues must always have one entry free to distinguish between queue
empty and queue full cases.

Change-Id: I809982207edb4894148aec09b10c4e2de4a040d3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-07 12:15:59 -07:00
Ben Walker
18d26e42a3 env: Move DPDK intialization into the env library.
Change-Id: Ie3a324f1523ffa0ddb0bd6a24a9a3cd0acbf64b0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-02-15 17:16:37 -07:00
Ben Walker
25270f1d7c Rename instance_id to shm_id and make it default to pid
By default, all SPDK applications will not share memory.
To share memory, start the applications with the same
shared memory id.

Change-Id: Ib6180369ef0ed12d05983a21d7943e467402b21a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-02-15 17:16:37 -07:00
Felipe Franciosi
26c8e7ccef examples/nvme/hello_world: fix typo in comment (#114) 2017-02-15 16:36:22 -07:00
Daniel Verkamp
b4572d452b ioat: print PCI addresses in hex for consistency
Change-Id: I0cc81e0b44f75268b1171c4ab5a23f97d9f8c8e2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-02-14 10:27:47 -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
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
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
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
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
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
6a93946040 ioat/perf: exit early if no channels found
If no channels are available, don't try to run the test.

Change-Id: I4c40635a3da598064da7c94b3c7960a83ba25f8f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-25 09:26:55 -07:00
Ziye Yang
294e743b99 ioat/perf: make the perf tool more general
Previously each core can only leverage one ioat channel.
With this patch, we can support the following features:
(1) Users can input the number of ioat channel to be tested.
(2) If the number of CPU cores is c, the total ioat channels
are n, each cpu core can use n/c channels.

Change-Id: I6b2179d3d633cb0999a3f4c5f40d4605c8cebc45
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-01-24 15:22:18 -07:00
Daniel Verkamp
b8ac57f9e4 ioat/kperf: hard-code maximum ring size
The kernel module parameter (ioat_ring_alloc_order) was removed in
kernel commit cd60cd96137f6cb3ea82cace9225626619e7a52d (dmaengine:
IOATDMA: Removing descriptor ring reshape).

This parameter was only used to issue a warning about a too-large queue
depth, so just hard-code the current kernel's limit.

Change-Id: Ib3b32851f538164590b82cb347b02c1c3b9c0106
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-23 20:32:06 -07:00
Daniel Verkamp
3b3060f14b ioat/kperf: -h option has no argument
Fix the getopt string for the -h switch so that it does not expect an
argument.

Change-Id: I8ea86018d6ee2c61ad698eead9718b2babfe6791
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-23 20:32:06 -07:00
Daniel Verkamp
c6ddd1b894 ioat/kperf: fix 'modprove' typo in help message
Change-Id: I0bbbf246384b8ef2f96a6101a58db8c9cfd76fa0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-23 20:32:06 -07:00
Daniel Verkamp
f12e7085ec nvme/perf: allow multiple -r (transport ID) arguments
This allows the user to connect to multiple remote NVMe-oF targets or to
specify multiple specific PCIe device addresses to test.

Change-Id: I05b2072b8aa1480891b37b17b5207369344b617d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-01-20 17:07:30 -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
0a573526b6 nvme/pcie: Add the support to probe nvme by pci_addr
Currently we use the pci functions provided by DPDK,
it identifies the device by class id related
info but not by pci bdf info, so we can add the filering
by pci_addr in pcie_nvme_enum_cb function.

Change-Id: I5942e98853f00fc10fa6aae5c113517653d1b357
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-01-18 15:30:45 -07:00
GangCao
11f4362130 examples/nvme: add task_count to dynamically allocate memory
The memory allocation is based on user specified queue depth,
number of attached active namespaces(aio files) and number of
cores involved in the IO operations.

Change-Id: I370b9fdacc1bb40d110bec7e96adac2424d39431
Signed-off-by: GangCao <gang.cao@intel.com>
2017-01-17 11:27:16 -07:00
Ziye Yang
1c6d354d41 nvme/identify: change trid to g_trid
Also do some cleanups in parse_args to fix and
optimize the logic.

Change-Id: If00929f45a89be820f2c60e6532f068f9d6abc3b
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-01-13 10:58:04 -07:00
Ben Walker
df46c41a4c nvme: Unify spdk_nvme_discover and spdk_nvme_probe
They were very close to the same already, so finish the job.

Change-Id: Ifba9e3b2d11a3e70cbfbe46f57a67552db2757ed
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-12-19 11:22:57 -07:00
Daniel Verkamp
f8baa259a1 test/nvme/hotplug: print an error if counts mismatch
Change-Id: I99339b16051011c9685d9d8afb79463eba01bfc4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-15 16:29:34 -07:00
Daniel Verkamp
d24ea9009a nvme: add offset to spdk_nvme_ctrlr_cmd_get_log_page()
Change-Id: I1af4950995062f892062f29db85da2a8dd793d85
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-15 11:16:14 -07:00
Cunyin Chang
d77a04d148 example: Replace the printf with fprintf to stderr.
This patch will make sure the information will show up
on console immediately.

Change-Id: I0080866a40de35fb9deef840551ff212759b0191
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-12-14 15:04:33 -07:00
Daniel Verkamp
0346dd775e nvme: add ADRFAM (address family) to transport ID
This isn't used yet in the NVMe library, but it will be necessary later
for supporting non-IPv4 addresses.

Change-Id: I167ce63ad25b0e0c9aa192b12d764c8d078e67f9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-14 10:14:10 -07:00
Ben Walker
32e838af3c nvme: Remove probe_info, just use transport_id
The probe_info was reduced to just containing a
transport_id, so remove probe_info entirely.

Change-Id: Ica9a22d126cd14e282decd3eea1a0afe0460f099
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-12-12 10:49:17 -07:00
Ben Walker
6c2e170dc7 nvme: Remove pci_id from probe_info
This can be obtained by parsing traddr into a pci_addr,
then getting a handle to the pci_dev and asking for all
of the pci information.

Change-Id: I1948cbd3ec65611293192ef5558ace19dd444d4c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-12-12 10:49:13 -07:00
Ben Walker
3da43e64e4 nvme: Remove pci_addr from probe_info
This can be obtained by parsing the traddr.

Change-Id: Idaf35066cbf900c87e771a44934de99fb5420001
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-12-12 10:46:50 -07:00
Cunyin Chang
2bd8c87a4c example: Add input parameters for expected hotplug count.
Change-Id: Iac626b05b72b26097d8742d6f427c9cd007a5da4
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-12-08 20:36:10 -07:00
Ben Walker
5f78155fde nvme: Embed a transport_id in the discovery_info struct
Instead of repeating the fields, just embed a transport_id.

Change-Id: I282704c9d59784abd5f7c93be4e47c673fcf6dde
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-12-08 11:48:21 -07:00
Ben Walker
4af9f06c73 nvme: Rename discover_info to transport_id
This is a small step toward making discovery more like
scanning a local PCI bus.

Change-Id: Ie7149ad060f2eeb56939b1241187bdf09681f2aa
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-12-08 11:48:21 -07:00
Daniel Verkamp
8b3ec5bb42 nvme/examples/arbitration: clean up duplicated usage
The usage help is already printed when an invalid parameter is specified
or when requested with -h.

Change-Id: If4201ee868106f99084436971763bb7e5e87ede0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-07 13:36:15 -07:00
Daniel Verkamp
f9be7a36f6 examples/ioat/verify: fix misaligned pointer
Dereferencing a non-8-byte-aligned uint64_t pointer is undefined
behavior (caught by UBSan).  Use memcmp() instead for an equivalent test
that works at any byte alignment.

Change-Id: I641b11abe9c5fc99d4c57b0b4ba15eb6a8d6d000
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-06 16:49:57 -07:00