Commit Graph

360 Commits

Author SHA1 Message Date
Jim Harris
77f23fe3fa Revert "fio_plugin: Support multiple jobs for fio when enabling SPDK"
This patch is causing intermittent errors in the automated tests, so
reverting for now until this can be resolved.

This reverts commit 1d9891989c.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I237e31b1b8a1a1e28262851ae0a21cd7345f0f1b
2017-05-01 15:53:42 -07:00
Daniel Verkamp
e2bf067577 Fix comma spacing errors spotted by astyle 3.0
Change-Id: Ie0543b220367c68c15bc9c4668e39b5336880021
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-04-25 10:01:18 -07:00
Ziye Yang
1d9891989c fio_plugin: Support multiple jobs for fio when enabling SPDK
Change-Id: I455c6075d93def33647881cc62a2856b1d014b6d
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-04-25 10:00:40 -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
GangCao
4613ed760c nvme: add the temperature related fields for the health info page
Change-Id: I5231412d122615a92566e81a8712d83577c7327e
Signed-off-by: GangCao <gang.cao@intel.com>
2017-04-24 12:15:23 -07:00
Ziye Yang
177ab97b6e fio_plugin: Reset the cpu core affinity after spdk_env_init
The reaon is that rte_eal_init called in spdk_env_init binds
the master thread on master core, we need to restore the
affinity.

Change-Id: I4eb2d36b74404c1af6d242c4fd5c403bd3d5036c
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-04-21 12:36:40 -07:00
wenzhong wu
013471a121 nvme/fio_plugin: Modify the fio repo address in README.md
Change-Id: I0169bf9ce1b0720bb74057043529a8aac27d36e6
Signed-off-by: wenzhong wu <wenzhongx.wu@intel.com>
2017-04-21 11:05:13 -07:00
Ziye Yang
da06e2ea03 fio_plugin: make spdk_env_init only once
This patch will be prepare to support multi threads.

Change-Id: I2234ae1d564c9cf17b92c85fd0a414adaa639bf2
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-04-21 09:38:45 -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
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
Daniel Verkamp
801388a796 Add missing .gitignore files for binaries
Change-Id: I2a2b23fb5e71ff4c0b9c85e0709968e8d7e75f63
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-06 09:51:00 -07:00
Daniel Verkamp
104356c97f examples/nvme/hotplug: vastly simplify and rewrite
This example should show how to use the hotplug features of the NVMe
library API.  It doesn't need to measure performance or allow lots of
unrelated options.

For now, the hotplug example will run everything (I/O and hotplug
probes) on a single thread.  The current code has lots of thread safety
problems.  A real application implementing hotplug would likely call
spdk_nvme_probe() on one core and pass remove and add notifications
to other cores via the event framework or another cross-thread
synchronization mechanism.

Change-Id: Id6df39812ef53383edc8ab9edb4cc3540fcb16c0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-05 11:13:16 -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
94c2dd8bdf nvme/hotplug: print message when a device is removed
Change-Id: If9c116d72bd889196331567542920c3ca818c68e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-02 08:39:52 -07:00
Daniel Verkamp
051b059e26 examples/nvme/hotplug: return 0 on success
Change-Id: Id19bef766fa2366208aced87ca3433e6ab05ff9b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-01 09:12:26 -07:00
Daniel Verkamp
9d025383eb nvme: rename nqn fields in public API to subnqn
The discover and probe 'nqn' fields are subsystem NQNs, so name them
subnqn to be consistent with the spec and the rest of the code and to
distinguish them from host NQNs.

Change-Id: I4a80fbc1f4b037c8a4f91c8f28d2a96e47c66c47
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-12-01 08:08:19 -07:00
Cunyin Chang
038236949f example: Add example for nvme hotplug.
Change-Id: I7e0bbf48798b77365c4dc968427c8834e0b05a44
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-12-01 10:23:10 +08:00
Daniel Verkamp
7d5bcb4893 nvme: remove spdk_nvme_transport_type from API
Use the NVMe over Fabrics spec definitions for TRTYPE rather than the
internal library transport type.

Change-Id: Idead559a8f8d95274fc580d10e82033822e6eda8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-22 13:42:00 -07:00
Jim Harris
407b550ff4 build: define SPDK_LIB_LIST to simplify building dependencies and linker args
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia969f9e5ed01f4b58cec2559133347d836118131
2016-11-22 11:45:48 -07:00
Jim Harris
5616e0880d build: create a common mk file for nvme library tests and examples
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ief0f99b7f014cf905d08e2c0cd9dc99653bd0bb8
2016-11-22 11:45:47 -07:00
Jim Harris
bb155377c3 examples/nvme: rename reservation.c to reserve.c
This enables some future Makefile simplifications.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I071b32fbb695b74880c9659558d9653d3a904c10
2016-11-22 11:45:47 -07:00
Daniel Verkamp
5c146a19f6 nvme/identify: print NVMe over Fabrics probe info
Also clean up the PCI address output to be consistent with tools like
lspci.

Change-Id: I41f704943a1297379a7ad71cdc9ee9508b5235f5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-22 11:36:34 -07:00
Daniel Verkamp
b3e46acfe9 examples/nvme/identify: clean up arguments
- Make the usage columns line up
- Fix the wording of the usage messages
- Fix the getopt() string for -x, which has no argument
- Use the default discovery NQN if none specified
- Use the nvmf_spec.h #define for max NQN length

Change-Id: I88608ead57d1bee46738ba05dc2074230d22be0d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-21 17:02:12 -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
Daniel Verkamp
44e60dc47d build: consolidate library outputs in build/lib
Make it easier to use SPDK libraries by putting them all in a single
directory that can be added with -L rather than scattered around the
source tree.

Change-Id: I5c0f5dd6e7058b5f92fa9bc41548190ffc064761
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-17 13:15:09 -07:00
GangCao
987ba616fa nvme: create the mempool from the name with the suffix of pid
Change-Id: I3bf3ecf5b83e206553d4103d47ed04ebe80387eb
Signed-off-by: GangCao <gang.cao@intel.com>
2016-11-09 22:04:27 -05:00
Daniel Verkamp
dca887b7d8 env: remove spdk_pci_device_get_device_name()
It always returns NULL in the current DPDK env implementation and was
not used outside of a few ioat examples where it is not particularly
informational.

Change-Id: I14b237c33bc25ddebc6b36bfbd6a4edf6762e3ca
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-02 15:58:03 -07:00
Daniel Verkamp
fcb00f3780 nvme: expand probe information to a struct
spdk_nvme_probe() will now provide a struct spdk_nvme_probe_info to the
probe and attach callbacks in place of the PCI device pointer.

This struct contains the useful information that could be retrieved from
the PCI device during probe.

The goal of this change is to allow expansion of the probe information
in the future when other transports (specifically, NVMe over Fabrics)
are added that do not necessarily use PCI addressing or device IDs.

Change-Id: I59a2a9e874e248ce5fa1d7f4b57c8056962ff3cd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-02 14:15:02 -07:00
Daniel Verkamp
bbd7e1c4da env: add spdk_pci_addr_parse()
Add a helper function that converts a PCI address from a string into a
struct spdk_pci_addr and use it in place of the various sscanf()
invocations throughout SPDK.

Change-Id: Id2749723f76db741567e01b4bcb0fffb0e425fcd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-02 14:15:02 -07:00
Daniel Verkamp
03aa3af0e7 nvme_manage: use spdk_pci_addr_compare()
Replace open-coded PCI address retrieval and comparison functions with
the new env.h PCI APIs.

Change-Id: I282a3f8d2e0c7c2cfde7b8a752260dd2bf0cb031
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-01 09:40:36 -07:00
Ben Walker
18a2cc11c1 env: Remove unused DPDK headers.
Remove #includes for all DPDK headers that weren't
necessary.

Change-Id: Ib02522e0f04e64a1c98afceb7508cc0e8d931a9d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-12 09:53:32 -07:00
Ben Walker
7f5b671db7 env: Convert some rte_mempools to spdk_mempools
This converts some, but not all, usage of rte_mempool
to spdk_mempool. The remaining rte_mempools use features
we elected not to expose through spdk_mempool such as
constructors, so that will need to be revisited.

Change-Id: I6528809a864ab466b8d19431789bf0f976b648b6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-12 09:53:32 -07:00
Ben Walker
0aa2986475 Replace rte_get_tsc calls with spdk_get_ticks
Change-Id: I809b900321433693ff9f2498183ad0dcdbb15030
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-11 13:34:09 -07:00
Ben Walker
2224ff2162 env: Replace rte_malloc with spdk_zmalloc
Use the env library to perform all memory allocations
that previously called DPDK directly.

Change-Id: I6d33e85bde99796e0c85277d6d4880521c34f10d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-11 13:34:09 -07:00
Ben Walker
0dd80395f3 env: Move pci.c from util to env
This allows users to swap their PCI library from
libpciaccess/dpdk to another mechanism using the standard
method for swapping out the env library.

Change-Id: Ib2248f8b43754a540de2ec01897e571f0302b667
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-05 11:53:24 -07:00
Ben Walker
a4747c6048 env: Make the environment library configurable.
This allows users to swap out SPDK's third party
libraries for an implementation based on their own
framework.

Change-Id: Ia0b7384ce5e31acba5ad0d7002dec9e95b759c52
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-05 11:51:37 -07:00
Ben Walker
a30b5532cb memory: Rename to env
The new env library will wrap all third-party library
calls and be easily swappable with alternate implementations
at build time. For now, it's just the memory library
renamed.

Change-Id: I26a70933289f8137107208ba75f7520fd7a33da0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-05 09:49:35 -07:00
Ben Walker
6b1e4e732d Drop libpciaccess and switch to DPDK PCI
This patch also drops support for automatically unbinding
devices from the kernel - run scripts/setup.sh first.

Our generic pci interface is now hidden behind include/spdk/pci.h
and implemented in lib/util/pci.c. We no longer wrap the calls
in nvme_impl.h or ioat_impl.h. The implementation now only uses
DPDK and the libpciaccess dependency has been removed. If using
a version of DPDK earlier than 16.07, enumerating devices
by class code isn't available and only Intel SSDs will be
discovered. DPDK 16.07 adds enumeration by class code and all
NVMe devices will be correctly discovered.

Change-Id: I0e8bac36b5ca57df604a2b310c47342c67dc9f3c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-10-04 15:59:00 -07:00
Ben Walker
29004b6738 ioat: Use log library instead of ioat_printf
Change-Id: I10a71b5c83f60d3ef1bbf83b464813405edd1938
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-09-28 10:15:56 -07:00
Ben Walker
b0e349a804 nvme: Use log library instead of nvme_printf
Change-Id: Ic9b2db9bff3a914b3e5021695287157f1e076f9f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-09-28 10:15:55 -07:00
GangCao
372942e569 nvme: move global request_mempool allocation into nvme_impl
The user no longer needs to create the request pool.

Change-Id: I83bb8948143d4cc961d232f9f30df3106d5e0eab
Signed-off-by: GangCao <gang.cao@intel.com>
2016-09-27 14:25:39 -07:00
Daniel Verkamp
df56ab7711 examples/nvme/arbitration: simplify log page allocation
spdk_nvme_ctrlr_cmd_get_log_page() now allocates a physically contiguous
buffer internally, so the caller does not need to provide special
DPDK-allocated memory.

Change-Id: Ic9964fdea3532303b172e591536b57d102d1d0b1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-09-22 20:59:10 -07:00
Daniel Verkamp
afd2fc556e examples/nvme/arbitration: fix mixed tabs/spaces
Change-Id: I2c0ac6356107b96a09520ce0a912851215149784
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-09-22 20:59:10 -07:00
Changpeng Liu
18529e917d nvme: print the End-to-End data protection information in identify application
Change-Id: I97171328f5c7dea593aa1e9b40a96d7a42f37e2c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-09-21 12:55:13 -07:00
Jim Harris
edbed73064 Rename and move fd related helper functions to fd.c.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ieccdd778348e8709ca4ef6cdf4f58f40021638db
2016-09-14 10:51:25 -07:00
Daniel Verkamp
c747375988 examples/nvme/reserve: simplify buffer allocation
Now that the NVMe library handles physically contiguous buffer
allocation for reservation functions, the example can just use normal
local variables.

Change-Id: Ieaafc3affbc2e05541041579d330e26151375366
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-09-14 09:16:44 -07:00
Daniel Verkamp
03cbd9aa72 nvme/identify: simpify buffer allocation
After the NVMe library API change to perform user copies, we don't need
to pass rte_malloc() memory to the NVMe controller utility functions
like spdk_nvme_ctrlr_cmd_get_log_page().

Use regular global variables to simplify the identify example code.

At the same time, fix the code that retrieves error log pages -
previously, it was allocating space for multiple error log entries, but
it was only passing the size of a single entry to the Get Log Page
command.  Now we preallocate the worst-case array size: ELPE, which
indicates the maximum number of error log page entries, is a single
byte, and it is 0's based, so the largest possible array is just 256
entries.

Change-Id: Ia3b3b85e33bb5482df9d366803fc6e6807bf5d88
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-09-13 12:49:06 -07:00
Daniel Verkamp
7bd558ab3b nvme/identify: fix spacing of SGL features
Change-Id: I0ec6a6851fe33b93e2fc41adfd9c8cba4c3ab8fd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-09-02 09:22:44 -07:00
Daniel Verkamp
1b957fa58e nvme/identify: print out controller data VER field
Dump both the MMIO region VS register and the Identify Controller VER
field, which should match.

Change-Id: I4c0eaa512424d85169a0f21ee86dbaedbfbc051f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-26 08:48:17 -07:00
Daniel Verkamp
1efc92c7f8 nvme_spec: define OAES bits in Identify Controller
Add bitfields for Optional Asynchronous Events Supported.

Also add it to the nvme/identify example.

Change-Id: Ifeb1cf8af94286a6cf437ec4b6f9e8b752c7d2f9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-26 08:48:17 -07:00
Daniel Verkamp
84812653be nvme/identify: interpret CMIC bitfields
Print out the multi-path I/O features in a human-readable way.

Change-Id: If1302933eff7649c31e21188f71cc361cc90ff01
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-26 08:48:17 -07:00
Daniel Verkamp
060ffe8dee nvme/identify: fix max data transfer when MPSMIN != 0
Correctly calculate the maximum data transfer size as defined in the
spec - MDTS is a power of two in units of the minimum memory page size.

Change-Id: Ifd517d3051a28d404246c5a5d342147aa69ceedc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-26 08:48:17 -07:00
Daniel Verkamp
76af27c0fc nvme/identify: fix Error Recovery Timeout spacing
Change-Id: I4c2f04d72ab80c5341d6d2e5390e9d835c4a67be
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-26 08:47:36 -07:00
GangCao
9dfc65b081 nvme: Create Proc Type for primary and secondary processes
Change-Id: I283ce03ed50fd12b9da906b0e09b4559b41776ef
Signed-off-by: GangCao <gang.cao@intel.com>
2016-08-15 09:21:20 -07:00
gongchuang
4d01cd7d8a nvme:fixup print in hello_world (#35)
Signed-off-by: gongchuang <gong.chuang@zte.com.cn>
2016-08-08 11:29:52 -07:00
Daniel Verkamp
720f0e77e4 examples/ioat: simplify kperf Makefile
There is only one source file, so use the simpler build syntax that
defines a module filename matching the source filename.

Change-Id: I11fc1b81fb38ffa56d3c61f10cf32a3d7d7f82fc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-08-03 09:04:09 -07:00
Jim Harris
a2fbd991cd fio_plugin: add norandommap=1 recommendation to README
While here, also mention that the plugin only supports
a single thread currently.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I265e59a89e77cd8ed26419e811aa2f36afcd37b3
2016-08-02 13:31:38 -07:00
Daniel Verkamp
e120c17a96 examples/nvme/hello_world: specify -n to DPDK
The example won't run without specifying the number of memory channels.

Change-Id: I278c225ee82181677a6206f73a11df09fd045209
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-20 09:05:01 -07:00
Daniel Verkamp
fc8d73f896 nvme_manage: list allocated NS IDs in NS attach
Change-Id: Ie518cc5b1a9eb0cb8a59f4d101b7d2181975728d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-19 14:10:36 -07:00
Ben Walker
68eb363be7 perf: Write a pattern instead of 0.
Writing 0's hits SSD firmware special cases and gives
unrealistically high performance numbers.

Change-Id: I73c72ee52494075e354dcddd067e3ce49c156204
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-07-08 08:49:47 -07:00
Daniel Verkamp
e2256173a8 nvme/identify: dump CAP and VS registers
Change-Id: I157dc7f1eda082f1bdf0a176fc6c6061291e2ac1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-07 15:32:20 -07:00
Tsuyoshi Uchida
247a59082a nvme/perf: add min and max latency (#23)
Change-Id: I8f6ac966dad5f2ef0ab81c5160417dd6cb74a913
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-07-06 13:36:40 -07:00
Daniel Verkamp
19fec6bb9c nvme: add remove callback to spdk_nvme_probe()
This will allow removal notifications to be propagated to the library
user (e.g. for hotplug).

The callback is currently unused, but this at least prepares the API for
the future hotplug support.

Based on a patch by Dave Jiang <dave.jiang@intel.com>

Change-Id: I20b1c2dbf5e084e0b45a7e51205aba4514ee9a95
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-28 14:21:58 -07:00
Daniel Verkamp
e2d3cc6502 nvme: replace rte_memcpy with specialized function
Use the knowledge that both the source and destination of
nvme_copy_command() are aligned to emit the aligned variants of the
SSE2/AVX mov instructions.

Change-Id: I0a7e32a3bb10b9a1920cd85691b79fa7172eecb3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-28 14:17:21 -07:00
Ben Walker
6b10df3576 nvme: Update nvme_spec.h to 1.2.1
This moves some definitions from nvmf_spec.h to
nvme_spec.h based on the latest publication.

Change-Id: I51b0abd16f7d034696239894aea5089f8ac70c40
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-06-24 09:18:14 -07:00
Ben Walker
9a2f8eb234 nvme: Add gitignore for hello_world example
Change-Id: Ifc6632de1da6733ff78510e64d27fbfeb9ac390e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-06-24 08:55:55 -07:00
Daniel Verkamp
39cc59635a build: include -lrt and -lpthread in LDFLAGS
Simplify the build rules so that common libraries are always linked.

Also fix up a couple of -lpciaccess instances that should have been
changed to $(PCIACCESS_LIB).

Change-Id: I4c50fa3aa59cae013d3385e38fbb830794299f6e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-06-23 09:04:02 -07:00
Tsuyoshi Uchida
7fea41512c fix typo in fio plugin REAME (#25)
Fix defconfig_x86_64-native-linux-gcc to
defconfig_x86_64-native-linuxapp-gcc
2016-06-21 17:08:27 -07:00
Ziye Yang
7991eb1957 Create a utility and enable WRR arbitration mechanism
Change-Id: I2194863ae812ece72c17b78e003ccf7895b8a812
Signed-off-by: GangCao <gang.cao@intel.com>
2016-06-21 16:35:04 -07:00
Jim Harris
213e7a640d examples: add hello_world example for NVMe
This is a very basic example app that shows how to
use the SPDK NVMe driver API for basic enumeration and
I/O operations.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I411f6f90781832f00d98b3d6782a9c2ca6591ce3
2016-06-17 12:05:39 -07:00
Tsuyoshi Uchida
3fc793591d nvme/perf: Improve aio code
Use O_WRONLY flag for write IO
Cleanup io_context_t and io_event when perf exits

Change-Id: Iefa1d8be5e017a1ca5719489c1ec4b868df94722
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-05-25 15:50:14 -07:00
Tsuyoshi Uchida
239fdb3d2e nvme/perf: Free memory
Free memory of worker_thread, ns_entry and ns_worker_ctx when perf
exits.

Change-Id: I4707eea31ca1a1c4a9ce6ded857c4576e57b4532
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-05-24 09:55:09 -07:00
Daniel Verkamp
4957d2642a nvme: return NSID from spdk_nvme_ctrlr_create_ns()
Previously, there was no way to determine what namespace ID was assigned
when a namespace was created via the NVMe library interface.

Also drop the incorrect comment about calling
spdk_nvme_ctrlr_process_admin_completions(), since
spdk_nvme_ctrlr_create_ns() checks the admin queue internally.

Change-Id: If90a6e9fc773aefa220ebbf6effc2d033c9f20cc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-05-18 17:06:09 -07:00
Daniel Verkamp
8f876a612f nvme_manage: display available LBA formats
Add a helper function, get_lba_format(), to print available LBA formats,
and use it in Create Namespace as well as Format NVM.

Change-Id: I4bfa4db0aa5a083f51b8da6b5103acf64f1da788
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-05-18 16:52:14 -07:00
Ben Walker
ddb59105ee nvme: Add an fio plugin
Change-Id: Ife815e371325df7fbec388530dc09097c3e4ffac
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-05-18 13:51:36 -07:00
GangCao
dd27218532 nvme/identify: Correct the Arbitration Burst bits (0..2)
Change-Id: Ia9bcca01d7d2e2c0a7c97c0a7c7a49f5c3417a0b
Signed-off-by: GangCao <gang.cao@intel.com>
2016-05-16 09:56:50 -07:00
Cunyin Chang
0f805b3622 nvme_manage: Add command to support firmware upgrade.
Change-Id: I3702c979de136a4821dee671434667e8beabf119
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-05-11 10:18:38 -07:00
Changpeng Liu
de1669585e spdk/perf: add average latency statistics to perf tool
Change-Id: Ic8042e0c7b1e727292af211a3857fda987dfb2b0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-05-11 09:52:04 -07:00
Daniel Verkamp
cd48a01fcb build: wrap $(CURDIR) relative paths in $(abspath)
Resolve relative paths before using them to clean up command lines.

This should also help shorten the overall command line length that gets
embedded in the binary and used when locating the executable from a
coredump.

Change-Id: Ibff9849ede198bb04313496c8b7131485ffaf14f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-05-09 13:56:07 -07:00
Cunyin Chang
32ecdedda3 identify: Add support for intel marketing description page
Change-Id: I9d3db2efa7111b1812aa944d6cf591451c53baa2
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-05-06 09:01:52 +08:00
GangCao
4e91a0b017 manage: add support for protection info and multi-path IO
Also made a slight change in the Namespace Display output.

Change-Id: Ieee288f4ec8c91c11ed5006824a5c7c069e89b00
Signed-off-by: GangCao <gang.cao@intel.com>
2016-04-07 10:24:07 -07:00
Ben Walker
c9290aa492 identify: Print out the NVMe Error Log Page
Change-Id: Ieddc9f4d7f295fc9ffa5c458d9fc8d27465425af
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-03-29 09:45:48 -07:00
Daniel Verkamp
173b4144da nvme_manage: shorten simplistic controller listing
Fit all of the info about a controller onto a single line.  This is more
readable with larger numbers of controllers.

Change-Id: I145844d5df5c0b1e3f544fd6c8d846ee94b4e662
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-29 09:41:23 -07:00
Daniel Verkamp
5bb16e86a1 nvme_manage: replace magic number with #define
Change-Id: I870db323a7801fc0d49cb3ad27e306c898fae603
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-29 09:41:23 -07:00
Daniel Verkamp
4fe88e4393 nvme_manage: only ask for required info in format
If the selected LBA format does not have metadata, skip the questions
about metadata and protection information.

Change-Id: I3620990eff2f12f2b7df2e8a293314b4001f52b2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-29 09:41:23 -07:00
Daniel Verkamp
6a3735e393 nvme_manage: show supported block sizes for format
Change-Id: I4da94631d9543c6e50b3cd4f8935845a1237ccab
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-23 10:16:18 -07:00
Cunyin Chang
eae688576a spdk: Add nvme format interface and unit tests.
Change-Id: Ie0506debf547a5fc011e116421387a5adb7abf0e
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-03-17 13:37:20 -07:00
Daniel Verkamp
4fc355ba68 examples/nvme/reserve: add malloc checks and frees
Change-Id: I576ac640c3c8a94237e5437e7e7f029d8526c071
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-17 10:07:55 -07:00
Daniel Verkamp
1698689412 nvme_manage: handle fgets() failure
fgets() will return NULL if it encounters EOF.

Change-Id: I35b1744514f2a90d6e95156c3916a18c1a4ecce2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-16 14:39:42 -07:00
Daniel Verkamp
4ad99808f2 nvme: allow user to override controller defaults
Provide a new structure, spdk_nvme_ctrlr_opts, to let the user modify
the default controller initialization options during probe/attach.

Currently, only the number of queue pairs can be modified in this way;
other options will be added later.

Change-Id: Ie27b9429291d93a9353c0d820f0ad467d3b0e7cb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-16 08:14:15 -07:00
Daniel Verkamp
cf0871a57e ioat: make channel allocation explicit
Add a parameter to each I/OAT library function that requires a channel
instead of implicitly using the thread-local channel registration model.

I/OAT channels are already reported by the spdk_ioat_probe() attach
callback, so no infrastructure for channel allocation is necessary.

Change-Id: I8731126fcaea9fe2bafc41a3f75c969a100ef8f0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-15 09:50:17 -07:00
Daniel Verkamp
3272320c73 nvme: make I/O queue allocation explicit
The previous method for registering I/O queues did not allow the user
to specify queue priority for weighted round robin arbitration, and it
limited the application to one queue per controller per thread.

Change the API to require explicit allocation of each queue for each
controller using the new function spdk_nvme_ctrlr_alloc_io_qpair().

Each function that submits a command on an I/O queue now takes an
explicit qpair parameter rather than implicitly using the thread-local
queue.

This also allows the application to allocate different numbers of
threads per controller; previously, the number of queues was capped at
the smallest value supported by any attached controller.

Weighted round robin arbitration is not supported yet; additional
changes to the controller startup process are required to enable
alternate arbitration methods.

Change-Id: Ia33be1050a6953bc5a3cca9284aefcd95b01116e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-14 16:00:54 -07:00
Daniel Verkamp
e3cabfafd7 nvme_manage: accept more PCI address formats
Change-Id: Ie8177b320271c9e7cb9b2216dbdd9c3c11f39579
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-11 09:37:21 -07:00
Cunyin Chang
73b0afa867 nvme manage: nvme manage tool optimization.
Change-Id: I2647451c168a7bcdc739a5f599810387f52b17a8
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-03-11 09:33:10 -07:00
Cunyin Chang
30089f8939 nvme manage: Add interface for format progress indicator.
This patch just implement the feature of format progress indicator.
the NVMe available does't support FPI currently.

Change-Id: Ie937591fb1720d8a062354322aabcc95ff14b2d3
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-03-10 09:02:06 +08:00
Daniel Verkamp
b1b84a2a66 nvme_manage: use inttypes.h SCN macro for uint64_t
Also switch from %d to %i to allow either decimal or hexidecimal input.

Change-Id: Ia866f9ab804d09e4bf8a2726b8db99208637a5ed
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-08 08:45:41 -07:00
Daniel Verkamp
2e61a144dd nvme_manage: sort devices by PCI address
This way, they are listed in a consistent order across runs.

Change-Id: Ie920f4e0c2763efb6c1d2856b5ed0f57ecbe48c8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-04 16:08:14 -07:00
Daniel Verkamp
ce13ccf8b0 nvme_manage: check NS management support earlier
Don't keep prompting the user for input if the controller doesn't
support the NS management command.

Change-Id: I5bf001657ca1cbbdbf33cafff2509ade2d47bd9d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-04 15:49:51 -07:00
Daniel Verkamp
6e2a6ff132 nvme_manage: move ctrlr_list to a local variable
This doesn't need to be stored in the device struct, since it is only
used within ns_attach(), and it is freed at the end of the function.

Change-Id: I0d4a14a6743e8cbf9e8f1a6c19c68cf0dfc2bab2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-04 15:48:45 -07:00
Daniel Verkamp
c015a2485b nvme_manage: move ndata to a local variable
This doesn't need to be stored in the device struct, since it is only
used within ns_manage_add(), and it is freed at the end of the function.

Change-Id: If725408026736d4ef9a0695ab28bc30e6648932e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-04 13:51:46 -07:00
Cunyin Chang
9841610855 spdk: Add namespace management interface and unit tests.
Change-Id: I9d203bf7532d50b1f8c8ca50c50df09ded8b5256
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-03-04 09:52:30 +08:00
Daniel Verkamp
5ee7a5df37 nvme: add spdk_nvme_ns_is_active() function
This function returns true if the namespace is active or false if it is
inactive (e.g. no namespace has been attached to the specified namespace
ID yet).

Also use the new function to add checks in the examples and tests where
applicable.

Change-Id: I35465b315ae1a1677c5a82191ad9b1da1c216d50
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-03-01 14:40:44 -07:00
Daniel Verkamp
bba5f43ce5 kperf: use $(MAKE) to invoke make
Change-Id: I51e587abe2c032ff97ea3133e53dd3bc36dd58cf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-23 16:36:37 -07:00
Daniel Verkamp
ab7541d810 kperf: add .gitignore entries
Change-Id: I80725118e44e147e12dcac31d0ba58f175a89d10
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-23 16:36:37 -07:00
Daniel Verkamp
5cab054f4e ioat: add spdk_ prefixes
Change-Id: Ic42f204a9a4e65661931af2220e8f8ac77242a69
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-11 12:35:57 -07:00
Daniel Verkamp
6ce73aa6e7 nvme: add spdk_ prefix
Shorten commonly-used names:
controller -> ctrlr
namespace -> ns

Change-Id: I64f0ce7c65385bab0283f8a8341a3447792b3312
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-10 11:27:45 -07:00
Daniel Verkamp
ad35d6cd86 nvme_spec: add spdk_ prefixes
Use shorter names for commonly-used objects:
namespace -> ns
controller -> ctrlr
command -> cmd
completion -> cpl

Change-Id: I97d192546b35a6aeb76ad3a709f65631502cde71
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-09 11:06:48 -07:00
Daniel Verkamp
8332f9e47e nvme_intel: add spdk_ prefixes and tweak names
Change-Id: I7c256bce365c92636f4f183e218117a1d7fe63d9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-08 16:53:36 -07:00
Daniel Verkamp
40c591eac8 string: add spdk_ prefix
sprintf_alloc() -> spdk_sprintf_alloc()

Change-Id: I24970baa37615633572d132abe3e57d0889f1a48
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-08 14:28:56 -07:00
Daniel Verkamp
8cb09df68e pci_ids: add SPDK_ prefix
PCI_VENDOR_ID_INTEL -> SPDK_PCI_VID_INTEL

Also change the inclusion guard macro to be consistent with the other
SPDK headers.

Change-Id: I29346267172cb8c07cc4289eed4eca2d55e942d6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-08 14:28:47 -07:00
Daniel Verkamp
aae6ee8c80 file: add spdk_ prefix to public APIs
file_get_size() -> spdk_file_get_size()
dev_get_blocklen() -> spdk_dev_get_blocklen()

Change-Id: Iba1eb4a22ba331887e2c5c3a16e1c0f9e695d83e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-08 13:44:34 -07:00
Daniel Verkamp
93933831f7 pci: clean up public pci.h interface
Rename all functions with a spdk_ prefix, and provide enough of an API
to avoid apps needing to #include <pciaccess.h>.

The opaque type used in the public API for a PCI device is now
struct spdk_pci_device *.

Change-Id: I1e7a09bbc5328c624bec8cf5c8a69ab0ea8e8254
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-08 09:58:13 -07:00
Daniel Verkamp
047c5aaaa8 ioat: refactor ioat_attach() API into ioat_probe()
Similar to the NVMe API change, this allows better abstraction of the
PCI subsystem.

Change-Id: I2b84d9c3c498a08d4451b4ff27d0865f0456c210
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-08 09:50:57 -07:00
Ziye Yang
ff6125195c SPDK: Support configuring libpciaccess library
With CONFIG_PCIACCESS=y in CONFIG file, we can
use libpciaccess library; With CONFIG_PCIACCESS=n
in CONFIG file, we use pciaccess functions provided
in DPDK.

Change-Id: I786c5589b8e7909ba2e59d222938dd5ba45bf92d
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-02-04 17:30:09 -07:00
Daniel Verkamp
8374a727a9 nvme: refactor nvme_attach() into nvme_probe()
The new probing API will find all NVMe devices on the system and ask the
caller whether to attach to each one.  The caller will then receive a
callback once each controller has finished initializing and has been
attached to the driver.

This will enable cleanup of the PCI abstraction layer (enabling us to
use DPDK PCI functionality) as well as allowing future work on parallel
NVMe controller startup and PCIe hotplug support.

Change-Id: I3cdde7bfab0bc0bea1993dd549b9b0e8d36db9be
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-03 11:15:31 -07:00
Daniel Verkamp
b235c942fa examples/ioat: fix initialization error handling
Previously, ioat_init() in the example programs was returning 0 even if
initialization failed.

Change-Id: I96b2ec5646f7051ab881611acff424fb8547d5eb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-02-01 15:45:16 -07:00
Changpeng Liu
8aa497f083 spdk: Add block fill API to ioat driver
For those Crystal Beach DMA channels which support block fill capability,
we add a fill API here that can zero out pages or fill them with a
fixed pattern.

Change-Id: I8a57337702b951c703d494004b111f6d206279fb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-02-02 13:29:07 +08:00
Cunyin Chang
8a7aabeae3 nvme/perf: support Intel read/write latency statistic log page
Optionally enable and display the I/O latency histograms as reported by
the hardware if supported (e.g. Intel DC P3x00 NVMe devices).

Change-Id: I5c0138d51a282138b74f36fe8e1461c9444e6d0f
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-01-29 14:18:39 -07:00
Daniel Verkamp
c02b179490 Remove year from copyright headers.
Also add a space between Copyright and (c).

The copyright year can be determined using git metadata.

Also remove the duplicated "All rights reserved." - every instance of
this line already has a corresponding "All rights reserved" immediately
below it, except for examples/ioat/kperf/kmod/dma_perf.c, where I have
added it manually.

Performed using this command:

git ls-files | xargs sed -i -e 's/Copyright(c) \(.*\) Intel Corporation. All rights reserved./Copyright (c) Intel Corporation./'

Change-Id: I3779f404966800709024eb1eb66a50068af2716c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-01-28 08:54:18 -07:00
Changpeng Liu
82db40dbd5 spdk: add reservation support flag to NVMe namespace
A namespace indicates support for reservations by reporting a non-zero
value in the Reservation Capabilities field in the Identify Namespace
data structure, and controller indicates support for reservation in the
Identify Controller data structure, Here we used namespace field as the
support flag.

Change-Id: I0e1e29548aa3fc8b6d3bbeb4149ec4864316f092
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-01-27 11:10:01 +08:00
Ben Walker
81f4046402 nvme: add FUA and LR support
Support for the Force Unit Access and Limited Retry
bits on reads and writes.

Change-Id: I9860848358377d63a967a4ba6ee9c061faf284d4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2016-01-25 15:22:26 -07:00
Changpeng Liu
92fa3ec537 spdk: add NVMe reservation commands support
NVMe reservations provide capabilities that may be used by two or more
hosts to coordinate access to a shared namespace, here we add the 4
reservation commands: reservation register/acquire/release/report.

Change-Id: Ib03ae2120a57dd14aa64311a6ffeb39fda73018c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2016-01-25 11:42:41 -07:00
Changpeng Liu
bf927b44c8 spdk: add the ioat_kperf test tool to autobuild system
Change-Id: If45a7fd3d6d3a7a52e71595de32ea4cf04e23d36
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-01-22 07:58:13 -07:00
Cunyin Chang
3f7cfd212a SPDK: Add Intel vendor-specific log.
Change-Id: Ic4ff5859f24e7cc1c7b1ceece1234f0bf6c0ab71
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2016-01-21 16:22:39 -07:00
Changpeng Liu
0021c23dfe spdk: show total performance result in the ioat_kperf tool
Change-Id: I68010590988fb3e1314922501e45381a029fb9f6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-01-21 14:37:57 -07:00
Changpeng Liu
81a36e1c1a spdk: show error message when no DMA channel found
We will check the DMA channel count which associated with kernel
ioatdma driver, and print the error message when no DMA channel
found.

Change-Id: I1d24108acb8fc6ee0c8f6041072e2dd528f55b24
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-01-21 09:17:49 +08:00
Daniel Verkamp
f752abd6fa examples/nvme/identify: use nvme_ctrlr_cmd_get_log_page()
Change-Id: Ie7aea41cf3b2e986a5ebf309fda8c8d826fab652
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-01-15 13:40:58 -07:00
Changpeng Liu
0e6463d9b3 ioat: add ioat kernel driver performance test harness
For the purpose to make performance comparison between the ioat
kernel driver and user space driver, we added the kernel driver
test harness here, all the workload executed in the kernel space
and controlled via sysfs.

Change-Id: I2c8d826283405a5e1c9ba6a033503bcb98541370
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2016-01-15 10:53:19 +08:00
Daniel Verkamp
040742359e pci: rename pci_device_has_non_null_driver to non_uio
This more accurately represents what function it performs.

Also remove pci_device_has_uio_driver() from the public API.  Callers
should use pci_device_has_non_uio_driver() instead.

Change-Id: I9623fe1345b43e981d5823804e33d01ac0d3bb1c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-01-12 08:58:02 -07:00
Daniel Verkamp
e73007a63a nvme/perf: fix memory leaks on error conditions
This doesn't really matter, since the program will be exiting
immediately if associate_workers_with_ns() fails, but it makes static
analyzers happy.

Change-Id: Ic21d234dec50bd2b6684b5fe2caa78d616f93052
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-01-11 09:45:40 -07:00
Daniel Verkamp
3da8af26b0 nvme/perf: don't crash if no namespaces are usable
Change-Id: I8ecf5b632c2d3bf94f913fb5e0aa5b4ff2e68c40
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-01-05 08:05:43 -07:00
Daniel Verkamp
777a06155c nvme/perf: ignore namespaces with invalid sizes
If the I/O size is larger than the total namespace size or smaller than
the block size, ignore that namespace in the perf utility.

Change-Id: I297303d8c41ceb36eef91c6c33da809a35758f4e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-12-30 09:10:35 -07:00
Daniel Verkamp
4e85224e3e nvme/identify: add -x flag to dump data as hex
This allows identify to print the raw data so that the user can look up
fields that aren't yet formatted in a human-readable way.

Change-Id: If3db1fed85fee06c8b8c18246a2ea253b1e6ae13
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-12-30 09:06:40 -07:00
Ziye Yang
8fc1f41aba nvme/perf: remove the unused pci_dev parameter
This patch is used to remove the unused pci_dev parameter from the nvme
perf utility functions that no longer need it.

Change-Id: Ib139b080b7668aed712b4489c5ee95bd2fa2b350
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-12-29 15:04:09 -07:00
Daniel Verkamp
c0ebf12e3e nvme/identify: identify more NVMe 1.2 features
Add support for the full set of Optional NVM Command Support bits from
NVMe 1.2, and interpret the various SGL-related feature bits.

Change-Id: Ie3fcca27571b5236479e05a1ea3b834adbeb18a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-12-23 09:06:00 -07:00
Daniel Verkamp
25cad6ffcf ioat: clean up on exit in examples
Previously, the cleanup functions were only being called if there was an
error during initialization.

Change-Id: I1606cfa9a9c3732d670131f78249d34a5db47403
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-12-09 10:14:52 -07:00
Daniel Verkamp
d4ab30ba33 ioat: add user-mode Intel I/OAT driver
The ioat driver supports DMA engine copy offload hardware available on
Intel Xeon platforms.

Change-Id: Ida0b17b25816576948ddb1b0443587e0f09574d4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-12-09 10:14:15 -07:00
Daniel Verkamp
01b48b7c90 build: define a common Makefile clean command
Use $(CLEAN_C) throughout the Makefiles to clean up a consistent set of
generated files.

This also adds coverage files to the list of cleaned files.

Change-Id: Iceb922935a45c9eecbf2f3443bd0ee4f5c966825
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-12-07 15:14:36 -07:00
Daniel Verkamp
1c3b08c63c build: move $(OBJS) definition to spdk.common.mk
Change-Id: I2dd592269ef644cfe73921151b9b174dc255323d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-11 14:59:55 -07:00
Daniel Verkamp
1c28700070 build: remove useless 'objs' targets
The .o files are always kept anyway, so there is no need for an explicit
rule.

Change-Id: Id1687ba89daabfda5802e4328deb127403277928
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-11 14:59:54 -07:00
Daniel Verkamp
dba4829471 build: factor out common compile and link commands
Add common $(COMPILE_C), $(LINK_C), and $(LIB_C) variables that contain
the commands to build a .o from a .c, an app from objects and libraries,
and a library from objects, respectively.

Change-Id: Ie2eaa13156b8bf3db7a4ffa66161382d829aef07
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-11 14:59:54 -07:00
Daniel Verkamp
68ff76297b nvme/perf: add -m option to limit max completions
Change-Id: Idb607f2024f1640d2f4a92e310360e0fc9bba67d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-05 16:45:33 -07:00
Daniel Verkamp
afee86f9f8 nvme/perf: rename -m option to -c to match DPDK
Change-Id: I367bb9d3804ae7808a10c6166f0e752b7d6ce87f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-05 16:38:54 -07:00
Daniel Verkamp
668847e150 nvme: add max completions limit to I/O polling
nvme_ctrlr_process_io_completions() now takes a second parameter,
max_completions, to let the user limit the number of I/Os completed on
each poll.

If there are many I/Os waiting to be completed, the
nvme_ctrlr_process_io_completions() function could run for a long time
before returning control to the user, so the max_completions parameter
lets the user have more control of latency.

Change-Id: I3173059d94ec1cc5dbb636fc0ffd3dc09f3bfe4b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-05 15:07:52 -07:00
Daniel Verkamp
3677f46af8 build: allow make to work from any directory
Set SPDK_ROOT_DIR explicitly in each Makefile so that make from a
subdirectory will work (assuming all dependencies from the upper
directory have already been built).  This allows partial rebuilds of the
source tree, as well as building the unit tests without requiring DPDK.

Change-Id: I3f65b805d490b40ff5ec53cceb61df542ce814f1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-04 10:19:08 -07:00
Daniel Verkamp
35e56a9603 nvme/perf: let all threads complete on error
Previously, as soon as a worker thread failed, the program would exit
before printing results.

Also add a message at exit time if any errors occurred during test
execution.

Change-Id: I7b3920f0acb8ce364e2bc5cbb78bbe88f3fa7146
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-03 15:57:33 -07:00
Daniel Verkamp
55f3f20e3b nvme/perf: increase task pool size
This matches the size of the request pool and enables running with a
higher concurrency level.

Ideally, these limits should be calculated from the requested queue
depth and number of workers, but for now, just increase the hardcoded
limit.

Change-Id: I6e890efc78a1336dddc0ab61db20c68004b30f54
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-03 15:57:33 -07:00
Daniel Verkamp
cfc88a45d0 nvme/perf: capture master lcore return code
Previously, if the work function on the master lcore failed, the perf
program would still return with a successful exit code.

Change-Id: Iec91c1f60824759ae62476ef6dce670fd402ddc5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-03 15:57:33 -07:00
Daniel Verkamp
a900f9ac9a nvme/perf: check nvme_register_io_thread() status
Do not continue running the thread work function if that thread could
not get an I/O queue.

Change-Id: I89033250bde0663f073ff35c76d1558d55b72ece
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-03 15:57:33 -07:00
Daniel Verkamp
c04ba5e952 nvme/perf: check memory allocations
Change-Id: I1ca8203a4f803e04afececc8f382cd088c53d63e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-03 15:57:33 -07:00
Ben Walker
70db0e1c08 nvme/perf: Add support for multiple cores per device.
Intelligently allocate cores and devices to handle
the following cases:

1) Equal cores and devices
2) More cores than devices by using multiple cores per device
3) More devices than cores by using multiple devices from a single core

Change-Id: I3703f5c523268539bd00d399fe104c474a8e8c99
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2015-11-03 13:07:37 -07:00
Daniel Verkamp
8307eb5f55 build: enable missing function declaration warning
This helps weed out functions that should be static, functions that are
not declared in public header files, and .c files that don't include
their .h interface headers.

Change-Id: Ie39f83ad4b320847e4a938bd1d4d0b4fa21c2ffa
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2015-11-02 14:40:23 -07:00