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>
This patch adds Intel NVMe device list and overrides the
supported log pages according to the quirk list.
In particular, the READ_CMD_LATENCY and WRITE_CMD_LATENCY pages are
supported on Intel DC P3x00 devices despite not being listed in the
Intel vendor-specific log page directory.
Change-Id: I3a2b6a5fa142c6e9c93567df65e85980bd3c7cc0
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
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>
1 Add new API nvme_ctrlr_is_feature_supported().
2 Add unit test for new API.
Change-Id: Ia6d8710755c3b13984fca9d56700efe043be1402
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
This will allow replacing these _nvme_fail_request_bad_vtophys() calls
with the correct error later. vtophys is not actually used within the
SGL request builder, so this is the wrong error.
Change-Id: Ibc2a3b029a8abad1d563b9df200325d7d64498da
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
No code change, just moved into a function for readability.
Change-Id: I883443c06d961c6dbeffed1a6fb153177e6e3fcd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This cleans up the I/O splitting code somewhat.
It also moves the SGL payload function pointers up into the hot cache
section of struct nvme_request without pushing the other important
members past the cacheline boundary (because payload is now a union).
Change-Id: I14a5c24f579d57bb84d845147d03aa53bb4bb209
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
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>
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>
This patch is used to wrap the inner implementation
of libpciaccess and prepare for the same interface
to applications in the future patch
Change-Id: I4d40fae0bd86b451ed38dbfd9bcc015f9bfc8436
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
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>
This patch is used to remove unnessary pci_device
related parameter
Change-Id: I8869307f49364797543c88ffa9c456da34d1487d
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
For the purpose to support different types of input scattered payloads,
such as iovs or scattered list, we define common method in the NVMe
driver, users should implement their own functions to iterate each
segment memory.
Change-Id: Id2765747296a66997518281af0db04888ffc4b53
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Doxygen doesn't understand GCC attributes, so use the PREDEFINED setting
to define it to nothing. Otherwise, Doxygen's parser gets confused on
e.g. packed structs.
Change-Id: I25b2a5fd7cfcc5014408c93d1913128e863dc60c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
libaio is required by examples/nvme/perf on Linux, so add it to the list
of dependencies to install before building.
Change-Id: Iae590153f54327711081f9e81538dae4b2ef3f71
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
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>
Change nvme_ctrlr_is_log_page_supported() to match
nvme_ctrlr_cmd_get_log_page().
Change-Id: I4c8a1f11044b083f8f8990ef40a4f789fa3c24e3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Request allocation may fail, so we need a way to indicate failure to the
caller.
Change-Id: I278c3f42e4d2fa1902bb0ab33ad3bf7c7007fd0d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
1 Add supported log pages data structure.
2 Bulid up supported log pages when NVME start.
3 Provide unified API for getting log pages.
3 Unit test suit optimization base on above modification.
Change-Id: I03cdb93f5c94e6897510d7f19bc7d9f4e70f9222
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
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>
Use /sys/bus/pci/devices/.../driver to determine which driver is loaded
for a particular device.
Change-Id: I5859a776e524033e1c6d6ec3796b7e11bdcf0bc4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
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>
nvme_ctrlr_process_io_completions() and
nvme_ctrlr_process_admin_completions() now return the number of
completions processed.
This also adds the possibility of returning an error from the
process_*_completions functions (currently unused, but this at least
gets the API ready in case error conditions are added later).
Change-Id: I1b32ee4f2f3c1c474d646fa2d6b8b7bbb769785f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
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>
_Static_assert is new in C11, and older versions of GCC don't support
it. Detect whether static_assert is available in <assert.h> and if not,
define a fallback macro.
Change-Id: Iaf513677e5f356832e0a3d1f6b1f4f9ea07e6627
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Make sure allocation succeed in the unit tests.
Change-Id: I1c9dd64c256d529f2e40be49448d56359969a6f5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The normal CU_ASSERT_FATAL macro calls a function that is not marked as
noreturn, so static analyzers (e.g. scan-buid) can't figure out that
fatal asserts are really fatal.
Add a wrapper macro that calls abort(), which the analyzer can determine
does not return.
Change-Id: I0c087bf9c8d3c272bf88120caa70e87dab6d9546
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This ensures that any uninitialized fields are 0/NULL so if
ioat_channel_start() fails, ioat_channel_destruct() will not try to free
bogus pointers.
Change-Id: I99278c9fa280cbcdf3f7448e77db3ac98b59cdd6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Previously, if nvme_allocate_request() failed in
nvme_ctrlr_construct_and_submit_aer(), there was no error checking, so a
NULL pointer would be dereferenced.
Add a return value to nvme_ctrlr_construct_and_submit_aer() so we can
signal failure to the caller. This can only really be reasonably
handled during initialization; when resubmitting a completed AER later,
there is nowhere to report failure, so the AER will just remain
unsubmitted.
Change-Id: I413eb6c21be01cd9a61e67f62f2d0b7170eabaa3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
If any command fails during the asynchronous event request test, exit
the test with an error rather than waiting for an event that won't
arrive.
Change-Id: I7297afe362bfdac04dd6585cc97ffdceb9f0096e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
The top-level autotest.sh script will catch any core dumps at the end of
the test run, so sprinkling process_core in the individual test scripts
is unnecessary.
Also make the per-component test scripts run with 'set -e' (exit on
error).
Change-Id: I85f124e164ca93d35eaf672a428a841c119c550b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Switch to /usr/local/share/dpdk on Linux to use the latest installed
DPDK.
This is the filesystem layout from building DPDK with:
make install T=x86_64-native-linuxapp-gcc DESTDIR=/usr/local
Change-Id: I95cb0a3ee2ad1fcc89f6abb73ff0005aa65110e5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
DPDK's install target now requires DESTDIR to be set, so change the
build instructions to set DESTDIR=. to match previous behavior.
Change-Id: Ib697c2f54704210a5b60278ba1a5b20a16f517be
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
It was just using 16 make threads by default before.
Now it uses the number of CPU cores.
Change-Id: I695705eb73fc5f5ed3eafe1f85c686bde0e4b7d6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
The deallocate command's num_ranges have changed to unit16_t.
Update the nvme_ns_cmd_deallocate unit test for the change.
Change-Id: I43b8637bbb953b0e56c39998e1e6682a54304a8f
Signed-off-by: Liang Yan <liangx.yan@intel.com>
The ioat library currently only supports DMA copy operations, but the
hardware can do other types of transfers. Add a union of the hardware
descriptor structures to enable support for the other operations in the
future.
Also add a generic hardware descriptor type to allow access to the parts
of the descriptor that are common between all types.
Change-Id: I3b54421ce771f58b78910e790b53026f311f918e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>