Modifies behavior of spdk_app_start() and spdk_app_parse_args()
such that they return on failure instead of terminating with
exit().
Change-Id: I82566417f04e1ae2e3ca60a00c72e664db26c9e4
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/401243
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
@: command was added for 'all' target previously - it's
needed for 'clean' as well.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0fa5981ba417a158ffb8285f197149968a5b6286
Reviewed-on: https://review.gerrithub.io/403070
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Automatically detect more whitespace errors.
All existing cases are fixed; only whitespace change (verify with
diff -w) except for one comment style fixup in include/spdk/nvme.h.
Change-Id: If750e54b9c8e3421ea6feda5f20184a31431631e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/402360
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
In some cases, an io_channel will be put (freed) as part
of the last execution of a poller. Previously, the
callback would set done=1 and would not continue
executing events meaning the deferred put_io_channel
events would not get executed.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia5a6ea6873ceb1c3d5daf0545cdc3615d11712d2
Reviewed-on: https://review.gerrithub.io/402139
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
All metadata operations are now done on the metadata
thread, so we no longer have to worry about one thread
updating in-memory metadata structures while another
thread is transferring the in-memory structures to
on-disk structures.
This does not protect against multiple sync operations
outstanding at once - that will be coming in an
upcoming path.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibf33edf4d41d867c96a38df017737e9ceb87fa58
Reviewed-on: https://review.gerrithub.io/401056
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
These new names are much more clear and are aligned with other
functions such as spdk_blob_close.
Keep the old names around for now but deprecate them. We will
remove them in next release.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Idc60fd0b19fa2a8b0247a1f5835774d342e721f9
Reviewed-on: https://review.gerrithub.io/400884
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
There was some thinking that we would need to allocate
I/O channels on a per-blob basis to handle dynamic
resizing during I/O. Making spdk_blob an opaque handle,
with the existing spdk_blob structure renamed to
spdk_blob_data was a first step towards making that
happen. But more recent work on blobstore has
simplified the resizing approach, so this spdk_blob_data
is no longer needed. So revert it.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I22e07008faceb70649ee560176ebe5e014d5f1a3
Reviewed-on: https://review.gerrithub.io/400881
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Unify several similar functions checking for a buffer of all zero bytes
into the util library.
Change-Id: Idfbeffa22add34ac9ed1bd75ee27d6bd8b188940
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/400892
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
For end-to-end data protection tests with extended lba format, when
Protection Information Action bit was cleared to 0, the perf
application can do some comparison based on the flags we used
for writes. For the unexptected protection information value, print
a notice for users.
Change-Id: I9851ce6338030f9b57180cd5e46368e0c94bc212
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/394158
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
The CFLAGS in these files add unneeded include directories.
Change-Id: I742a75b7ce5bff2f1dfd6f92d99ebc99a1936666
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/400862
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
It is not ideal to have to add this in a bunch of
different Makefiles, but further consolidation of
Makefiles is going to be a more arduous process.
With this change, rebuilding SPDK after no changes
will result in no output - all of the "Nothing to
be done for 'all'" messages have been removed. Note
that DPDK build output still remains - this can be
suppressed by either using an out-of-tree DPDK, or
using SKIP_DPDK_BUILD=1 when using the in-tree DPDK
submodule.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib1d45432f2baaa1d9c1b9509906ee1e77966d3ca
Reviewed-on: https://review.gerrithub.io/399918
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Add a new example application that copies data between two NVMe
namespaces, on two different NVMe controllers via the CMB that belongs
to one of said controllers. This avoids using CPU system memory as a
DMA buffer and reduces the number of external DMAs from two to one.
Use:
./cmb_test -h
for usage.
Change-Id: Id930fb3bdb5c09bbecadae449a5238a73eeef642
Signed-off-by: Stephen Bates <sbates@raithlin.com>
Reviewed-on: https://review.gerrithub.io/397040
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
App line was missing some stuff so that the apps weren't rebuilding
when underlying dependecies changed.
Change-Id: Idecc6296caf48229dfadd57b9da5768f29c9d9e1
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/399456
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
If the NVMe controller to be tested supports a CMB with the WDS
feature then we use that for the write phase of hello_world.
Change-Id: Ide6ee1005a892ca977bd32a974cd644256e95c8a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Stephen Bates <sbates@raithlin.com>
Reviewed-on: https://review.gerrithub.io/397039
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Change-Id: Id259261d387998f332dee11dca740ecaba311de4
Signed-off-by: Pan Liu <liupan1111@gmail.com>
Reviewed-on: https://review.gerrithub.io/399274
Reviewed-by: GangCao <gang.cao@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Will follow this up with a doc change but want to make sure we're
all good with it first. This is meant to not only beef up
blobstore testing but provide the 'match' utilitiy for all test
cases where we are currently calling an executable and either
counting only on a return code to determine success or failure
or worse yet we're just running it and if it doesn't explode we
assume its a pass.
The 'match' util was borrowed from the PMDK folks after first
adding the "ignore" feature upstream to make it easier to use
in SPDK. It works like this:
When the developer checks in a test they create and check in
the output of the test with two different file extensions:
.ignore: should include a string per line for output lines
that we want to totally ignore typically because they're
platform specific so the output could be different from
machine to machine. In this case I'm ignoring all output
lines with 'DPDK' or 'EAL' or '...' in them. The first
few are obvious, the last is because the test tool will
print a varrying number of these as progress indicators.
.match: this is a copy of the output that the developer
'fixes' up by replacing platform specific output strings
with replacable tokens as described in the 'match' help.
This is where you'd want to match an entire line minus
something like a CPU count or free block count or
something. The 'ignore' feature was added simply so we
wouldn't have to edit every single line of an output
file that had DPDK or EAL in it.
Then you modify the test script to save the output and
smply run the match util providing the name of the
match file and if it fails to match the actual output
with the saved output that's been token'ized the script
will error.
The obvious advantage here is that now we can confirm all
of the output from a test executable is as we expect.
Change-Id: I701d36ee83d37b6193e16ed3171e114f814e5eb3
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/397027
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tree-wide cleanup of all instances of printf()-style functions where a
format string contains a space before a newline character.
Change-Id: Ib5b5861e97bed9e9d62db03875547e3f771f4769
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/397031
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I660c2b37b22b4a60b6ebcd77ade475072a6a05a7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/398079
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Previously, running blobcli with no arguments would just print
"ERROR: Invalid option" and exit; tweak the tests in usage() so the
command help gets printed in this case.
Change-Id: I70dbe82f2e83a6f068d4bd61c7baa9d2bbc6f829
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/398078
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Add the section of boot partition support.
Change-Id: I81357d657f1a55376ab98b5ffab511c6227e43c8
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/397033
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
When an I/O failed to be issued, fio
used to freeze entirely. From the fio
perspective, that I/O was never being
completed. Fio expected us to complete
it during the I/O thread cleanup & shutdown.
(spdk_fio_getevents, line 578)
This patch makes the I/O issue callback
complete the I/O immediately on any
encountered error. Return codes are now
properly propagated with io_u->error
field. This also allows some additional
error messages to be printed.
Change-Id: I9fc3cb6c6a946b78fc8384701827a815103ed4c6
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/392534
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This patch is used to fix the time caculation for
average, min, max latency.
Also changes the float to double to make it more accurate.
Change-Id: Ia91278f04656787e2dcf94dd37d839bcf31d618d
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/394674
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
A previous commit updated the fio version for the bdev fio plugin, but
the NVMe fio plugin should also be updated.
Change-Id: I32fab18563b6b723a3e9b71589e3a3904196d07f
Fixes: 21ec62533d ("CHANGELOG: add fio 3.3 support")
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/395788
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Modifies spdk_env_init() and spdk_mem_map_init() such that
they return on failure instead of terminating with exit()
or abort().
Change-Id: I054c1d9b2e46516ff53d845328ab9547f54bdbc4
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/393987
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Add some options to reduce the number of calls to
get time.
Change-Id: Iceea12b1ad82cba96d1a4bd687af3e9743d5f58a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/393686
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
The test already writes to the entire device twice, so
the trim step does not actually accomplish anything.
Change-Id: Ie761389511196d659358f18f557feb80087628cc
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/393832
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Only Makefiles for libraries that directly depend on DPDK (rather than
the SPDK env abstraction) should add $(ENV_CFLAGS).
Change-Id: Ifdf44d3ef8c42bbf7f20edd524b330d00658235b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/392818
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Currently, each histogram range is hardcoded to
128 buckets (1ULL << 7), resulting in 58 ranges
(64 - 7 + 1) and a total size of 58 * 128 *
sizeof(uint64_t) = 59392 bytes.
To allow for more usage models in cases where this
size is prohibitive, enable the following changes:
1) specify number of buckets per range (in number of bits)
2) specify max datapoint value (in number of bits)
The latter can be useful for cases where datapoints
are never close to requiring all 64 bits - and allows
reducing the number of ranges. Any data points that
exceed the max will be tallied in the last bucket
in the last range.
Testing shows no performance disadvantage using the
dynamic approach.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5979bcdff6209faaa9dee293918ef2a78679bcd4
Reviewed-on: https://review.gerrithub.io/392707
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I7174f1799361b8337ff5590b90ad6a0564ca8e9b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/391899
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Similar to previous change, the ** paradigm is a bit
problematic for asynchronous routines that could fail.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ife7748280482356c4c51a796817b71cd7bc7e479
Reviewed-on: https://review.gerrithub.io/391483
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Using the ** paradigm is a bit problematic for asynchronous
routines that could fail. Currently we were inconsistent in
that some error paths would zero the pointer while others
did not. So make this just a plain pointer, which simplifies
the API and its implementation.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I67147931c6e8350896a4505022a6a314655de3d3
Reviewed-on: https://review.gerrithub.io/391482
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: I127279ba32388bcedb85ed0a2eba9b5345c02eda
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/366532
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
As part of clarifying the API and preparing for some
future changes, rename the following functions:
spdk_bs_md_create_blob => spdk_bs_create_blob
spdk_bs_md_open_blob => spdk_bs_open_blob
spdk_bs_md_delete_blob => spdk_bs_delete_blob
spdk_bs_md_iter_first => spdk_bs_iter_first
spdk_bs_md_iter_next => spdk_bs_iter_next
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I86bf792717b68379484a6108396bb891fe1c221e
Reviewed-on: https://review.gerrithub.io/391031
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
There is a case in high queue depth situation and the IO may be
failed due to no memory. Our perf tool did not recognize this
and always count the IO in the inflight IOs. Thus in the completion,
it waits more than actual IOs to return and the Perf is hanging.
Change-Id: Ie5472e260c75c5abd80c06eb6c613dc7d1761c78
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/391582
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Moving forward, the spdk_blob returned to users will
actually be an I/O channel - not the blob structure
itself. So rename the existing spdk_blob to spdk_blob_data.
spdk_blob_data will continue to contain global state for
the blob. In the future spdk_blob will point to an
I/O channel for the blob - for now it effectively still
points to the spdk_blob_data, but by changing the
structure names here it will reduce the code churn in
future patches.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7d0cbc0553f68f96c24173c833091a80d058eb89
Reviewed-on: https://review.gerrithub.io/390900
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Require braces around all conditional statements, e.g.:
if (cond)
statement();
becomes:
if (cond) {
statement();
}
This is the style used through most of the SPDK code, but several
exceptions crept in over time. Add the astyle option to make sure we
are consistent.
Change-Id: I5a71980147fe8dfb471ff42e8bc06db2124a1a7f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/390914
Reviewed-by: <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Use the env.h abstractions instead.
Change-Id: Ib8a34b28d86a057cc37812568f4c6cce3e8301c3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/389402
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Rename these operations in preparation for adding blobstore dump
and import operations in a future patch.
Change-Id: I5ab60d1354099502049826f22930131a7870de87
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388325
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Use the env.h abstractions instead.
Change-Id: I273ee0182b9da51f762cdd6af56056d08dcca9a7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/389401
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Use the new one from io_channel.h.
Change-Id: I7bf6729caf6eeebcb58450a36119601957ad5da4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/388290
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Change-Id: I086f094da6e697239be620f6859f4582275e7c8f
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/388144
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Make this generic and not directly dependent on
the event framework. That way our libraries can
register pollers without adding a dependency.
Change-Id: I7ad7a7ddc131596ca1791a7b0f43dabfda050f5f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/387690
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: Ifd924bcee94bc4e36530b42a07afb5141b150cad
Signed-off-by: lu fan <lux.fan@intel.com>
Reviewed-on: https://review.gerrithub.io/387722
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie7282eb2e9f403ae51c449389216bcaf45808277
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/386190
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This same code with the same test doesn't fail with the rest of
17.10 but was a real problem in script mode on error would call
spdk_app_stop() twice. In the unload_bs() path if there's no
bs loaded script mode will exit through another code path so
don't want to call spdk_app_stop() here.
Change-Id: I0175350c7e1a54b4b304b8b184d08076e6e2e0f0
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/387808
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
If it cannot be allocated, we should return error.
Change-Id: I48aa50a8842c35ee112fe7185128b1bc1930176e
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/386369
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This will be used to include common app-specific rules in upcoming
patches (it currently makes no difference).
Change-Id: Ia828ba01c94fc9f70e15db3fc1d9cafda387e912
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/387629
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Introduced when bdev was added as a required option, logic
problem with command parsing that broke things when in
command mode with, for example, providing a bogus option.
Change-Id: I067bf2783f572c6d4fa7660691bb90c470744130
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/387634
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This kind of information can be useful on related model
of Intel SSDs.
Change-Id: Iea8a8f48999ba36e2f6cbf33a892147262891b44
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/385805
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Now that there's a fio_thread
at the time of calling spdk_bdev_finish,
this work-around is no longer
necessary.
This reverts commit ae0f518e4f.
Change-Id: I416ff69552ab863b6722931c9ef086f119439ba5
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/386248
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This patch also replaces "temporary"
SPDK threads for init/finish with a
single persistent thread that's created
at the time of init, and destroyed
at the time of finish.
Change-Id: I6da922cb50f06a9c31e22817d06c5dcbf19255b6
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/386247
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
There were unprocessed events in the event ring at the time
of destroying it's thread.
Polling until *done* flag is set is not sufficient. Since a single
fio_getevents call will poll only a single message, any
message positioned after the callback that sets the *done*
flag would not be processed.
Change-Id: I8fee384cb980373672bed4bc498f75774aa64a9e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/385802
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Separated SPDK-related code
from the FIO callback spdk_fio_getevents.
This is required for upcoming patches.
Change-Id: I8d30a3f910f29b13344df91fbbff51e00dfa0a0a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/386102
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ib4fe119d42db943fd5b7f52836358a01cb4bc03f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383639
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
During SPDK asynchronous finish cleaning up of bdev and
copy engine was removed. Now it is added back taking
into account asynchronous nature of those two calls.
Only when spdk environment was initialized, on fio_exit
SPDK environment is cleaned up. Similar to init path,
this is done in temporary SPDK thread.
When in here, fixed fio_thread->iocq memleak.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4558af4539dd2617d17aeda9b568b697ea54ff44
Reviewed-on: https://review.gerrithub.io/383731
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
First this change moves spdk_subsystem_fini() to trigger on
spdk_app_stop(). This ensures that spdk_subsystem_fini() is called
before reactors are stopped in spdk_reactors_stop().
Finish paths for subsystems, bdevs and copy engine is now
asynchronous.
Each of those three mentioned have to make sure they are
asynchronous as well.
Only bdev that currently has requirement for asynchronous finish
are logical volume.
Thus the change in vbdev_lvol.c making it move to next bdev module
only after all lvol stores were unloaded.
Fio_plugin finish of bdev and copy_engine was removed for now.
Next patch in series adds it back with async support.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I80ee2d084f3d82c50bf1329e08996604ae61b1b3
Reviewed-on: https://review.gerrithub.io/381536
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: I9ced263535e8cd9c9503a208a77832140833c9d3
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/383952
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: I4bc9c0246158eeccfd819089aff095798be1f786
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/383501
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
an off by one error and a bounds checking addition
Change-Id: Ifad5ec4b5e358d69d35e06a7902d5593c4b7fb86
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/383296
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Used to be hardcoded, now is a required cmd line parm that
needs to be provided regardless of mode.
Change-Id: Ieac9ce309172a50ccfd27effde5a5846f9bfec17
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/383031
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
- fixed issue with token parsing where only a space was desired
and some other junk ended up in there that would cause issues
with parsing filenames because of the .
- made s few fatal error exits consistent
Change-Id: Ib7fa07416881df42db88db7d94542963e492ca9b
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/382911
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Moved the checking of additional args to within the switch
statement and replaced hardcoded index values with optind
to make their position relative to the switch as opposed
to the full command list. There are also some minor fixes
in here wrt the cmd_chosen value to fix issues with the
3 modes and how they handle the case when there are issues
with the cmd line.
Change-Id: Ic5d547298adec658fd572b9b35d72f588b843113
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/382910
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Change-Id: Ia7feebd39a023642b94bedbab4da8f3b2f09b245
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/382904
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: Iaeeff8216784e8f09dc172d6d258c057dc1db37d
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/382903
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
There are a few places where we check for a NULL * to make
decisions and in both shell and script modes, any command
sequence loads and unloads the bs (self contained) so when
multiple actions are taken and some value that was freed
isn't NULL we can end up with segfaults.
Change-Id: I595797266b4a25dd8bc83fdaf68cb50c11bc958b
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/382902
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
If a config file is specified an error message would incorrectly
print.
Change-Id: I532762f6e6ed26bd213255b0e67663035fc1620e
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/382876
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
The readme explains how this mode works and includes a sample
test script that was used to test this mode.
Change-Id: I501b08004cc68157fe767ce8db61bf05f2eee391
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/380891
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Always start bdev pollers on the calling core.
This removes the lcore concept from the bdev poller abstraction and
simplifies the job of spdk_bdev_initialize() callers providing their own
poller and event implementations.
All callers except the NVMe bdev hotplug poller already used the current
core as the parameter. The NVMe HotplugPollCore option was undocumented
and unused in any of the tests or example configuration files, so it
should be safe to remove.
Change-Id: I93b466e1e58901b8785c40cbe296fa46c157850f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/382857
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Patch 2b37c71 [1] introduced the
spdk_bdev_finish() call on the
fio_plugin shutdown. That happens
after all the fio threads have
stopped. Patch 19ddb10 [2] introduces
an extra poller that has to be
stopped during spdk_bdev_finish().
Prior to this patch fio_plugin
pollers couldn't be stopped if their
corresponding threads have been
already stopped - but that's a
behavior we want.
[1] 2b37c71 ("bdev/fio_plugin: add call spdk_bdev_finish")
[2] 19ddb10 ("bdev_virtio: implement controlq and RESETs")
Change-Id: I415d6f8a564ddd70a4e50f149e85f2765f036b4d
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/383018
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Some refactoring around functions that need to load the
blobstore as a first step was done as general cleanup. Function names
were also updated for consistency, some comments cleaned up
and #defines added for clarity.
Change-Id: I71550b6664a8ec78aca1b304891de3f6154b616d
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/380834
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
All of the same commands and options are available but by
starting with the -S option the user enters an interactive
shell mode to interact with blobstore significantly
improving response time by only having to init DPDK and NVMe
subsystems one time.
Change-Id: Ib927ba0848166dba1090484cecbbcf011122b714
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/380833
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Since we do not call spdk_app_start, so we do not
use SPDK's subsystem mechanism, so we need to
cal spdk_bdev_finish by ourselves in this fio plugin
Change-Id: Idd1063482ab1a99880c88c1b092961ff3419f60c
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/382613
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
If the spdk_dma_zmalloc() call for the task buffer fails, we should free
the task before returning an error.
Change-Id: Icf70826dfc7f921d2a18f340480ea7c2ac3df3f4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/382851
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Introducing bstype as a way to identify and verify
blobstore type.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I50267b5408625be10fe0c146ae329016d5509b4a
Reviewed-on: https://review.gerrithub.io/380476
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Now that we can connect directly to a discovery service via
spdk_nvme_connect(), it is useful to have the ability to dump its
discovery log page in the identify example.
Change-Id: Ie32f7ae2f0725874fed56258aa3c07d619fce0dd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/382208
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
In this identify example, added a call to the newly introduced
public spdk_nvme_connect() API so that other related change can
refer to this one as an example.
Change-Id: Iba97b6e52810a66d4c781bb563985e84ffb86708
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/382070
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Describe the phenoemon for peformance difference
between fio + spdk plugin and spdk nvme perf
on multiple NVMe SSDs while both using single
cpu core.
Change-Id: I80c2cfd51cd1d8ec28a11a1a8653469cfc3335eb
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/379573
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This is required for current virtio implementation,
as it supports only up to 8 hugepages.
Change-Id: I3e89a54188097987947de40f6dcdedc46285252f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/380984
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
For perf tests with large I/O size, the NVMe driver may split one
request to several entries based on stripe and maximum transfer size,
so take user's input of queue depth as default queue size of NVMe
queue pair is not accurate. Here the patch evaluate users' input
and report an error when queue entries more than hardware's limit.
Change-Id: I66922a3d673dc97796d7fbe6e86cf5037a45b37d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/379969
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
A random host ID is generated per SPDK application startup if the user
doesn't specify a host ID during controller startup.
This also changes the default host NQN for NVMe-oF connections to a
random UUID NQN based on the host ID.
Change-Id: Ib0f70dd63e53087716842b412a1f134a9991d4da
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/380528
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Change-Id: Ib6052a9239cac14fdefc74eada39067f2b042672
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/380680
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Commit 99ba2b25e6 ("lvol: hotremove support") added new parameters to
spdk_bdev_create_bs_dev(), but it was merged after the blob cli, which
didn't get updated to add the new parameters.
Just pass NULL as the hot remove callback for now (no hotplug support in
blobcli).
Change-Id: I1dea802062afb9fbd4f35f3c891357873570d58c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/380679
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This is in preparation for enabling hot remove of logical volumes when
their underlying blobstore device is hot-removed.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I310a3f64f0de5d628609c20a1a3b4d38df0755aa
Reviewed-on: https://review.gerrithub.io/377041
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The CLI is intended to serve as both example code and a tool for
developers learning/kicking the tires of blobstore. Initial
functionality includes:
- initialize a blobstore
- list available bdevs or blobs
- create a new blob of a specific size
- set the superblob ID
- show detailed info for a blob
- show detailed info for the blobstore
- set/delete an xattr pair for a blob
- fill a blob with a value
- import a local file to a blob
- dump a blob to a local file
The CLI requires an NVMe backend and uses both the SPDK app
framework and the bdev layer.
Change-Id: I0a3cccef1ce0d51ce84dde2211cb07551c6e8b3a
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/373383
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: Ie70236f6be40ad9598969da2a462af44763c4ac4
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/379437
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Change-Id: I5b0411484290bbdf9077e55674ae368312fb01ab
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378185
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Fully port the remaining uses of rte_ functions from DPDK to the SPDK
env library abstraction layer.
This also simplifies buffer allocation: each task only needs to be
allocated once during the initial submit_io() call, rather than using a
mempool to get/put the task on every I/O.
Change-Id: I39c8caff81bbb1467101ba3b24a389c437075c61
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378220
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
We don't need to allocate/free tasks on every I/O; we can just
allocate the tasks and buffers once in the initial submit_io() loop.
This also removes the remaining direct DPDK calls from the hotplug
example.
Change-Id: Ie8774b289e650b3fa64614f2da0efbefd013a610
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376864
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The reason is that we create duplicated qpair on same subsystem many times,
thus the performance is influenced. And this patch can fix this issue.
Change-Id: I075b028b15e0d34857a89510710642f2d9520235
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/375782
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
With this change, the polling qpairs can be in round-robin manner.
Change-Id: I1926468dc596de2a43f42451525650356f44fbbd
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/375707
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
In NVMe 1.3, the Identify Controller data SGLS field's definition was
changed; in NVMe 1.2, the first bit simply indicated whether SGLs were
supported, but in NVMe 1.3, the first two bits now indicate whether SGLs
are supported and whether they require Dword-aligned data.
Change-Id: I9181055a86f52ad939b65eca5af66a400594a696
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376027
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This moves the thread name setting code into the generic SPDK thread
setup code, so now all spdk_threads can be named, not just ones created
by the event framework.
Change-Id: I6c824cf4bcf12fe64a8e2fc7cdc2d6c949021e40
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/375220
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This is just a convenience and replaces the common practice
of passing -1.
Change-Id: Id96734307ebf52ef0ee7dba0e7ac89602b2b5b1a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/374520
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
For malloc backends without IOAT a message gets queued up
for every completion. This can quickly run the message
passing ring out of entries. Increase it's size
substantially.
Change-Id: Ib09a0887d3d843a768156c9221a4f43c6cb43a4d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/374353
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
hello_context is never NULL when hello_cleanup() is called, and
spdk_dma_free() does nothing if the parameter is NULL.
Change-Id: I7004d70a17e5dc237206b95c26df9b100952df65
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/374205
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4b046e63a669d52c875efffb5a91e99845fc623d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/370383
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Example hello world for blobstore that:
- uses the spdk app framework
- uses a malloc backend bdev
- shows the basic blobstore operations
Change-Id: I1662139e6b1fa33c6109006407a11c8c0936ac0c
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/370785
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: I5e0ebb8d452a41ad848b319af9bb978546807d5e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/366495
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This will cause the NVMe driver to use the default qpair size
as opposed to setting it up for the first job in what may end
being a series of jobs in the same fio config file. If we
don't do this and subsequent jobs are specifying a higher queue
depth than earlier jobs, the NVMe qpairs will be too small and
performance results can be way off.
Future fix logged on Trello to correctly size q pairs even when
multiple jobs are specified in a single file but this is a small
optimization.
Change-Id: I73a7b83b10418dd22b663a50ea8e33a6c3d7ecf7
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/371240
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Add a new struct spdk_nvme_io_qpair_opts to allow the user to override
controller options on a per-I/O qpair basis.
Existing callers with qprio == 0 can be updated to:
... = spdk_nvme_ctrlr_alloc_io_qpair(ctrlr, NULL, 0);
Callers that need to specify a non-default qprio should be updated to:
struct spdk_nvme_io_qpair_opts opts;
spdk_nvme_ctrlr_get_default_io_qpair_opts(ctrlr, &opts, sizeof(opts));
opts.qprio = SPDK_NVME_QPRIO_...;
... = spdk_nvme_ctrlr_alloc_io_qpair(ctrlr, &opts, sizeof(opts));
Change-Id: I8ac3ea369535cfde759abbe75e1d974b6450a800
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/369676
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
FIO backends are supposed to return a negative value on error.
Add special handling for -ENOMEM (out of requests) case to return
FIO_Q_BUSY, indicating that FIO should resubmit the request later.
This is part of the fix for issue #169, which is related to high queue
depths with large I/Os causing the NVMe library to run out of request
objects.
Change-Id: I4fa4001b078b07c42fcd4d1357434575b2c84023
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/369664
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The default print level used by the apps is SPDK_LOG_NOTICE, which will
prevent the tracelogs from being shown.
Change-Id: I5f136e8aa0be0aa7634c7dd72231f2c23b129e51
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/368803
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Support both SPDK_NVME_FW_COMMIT_REPLACE_IMG and SPDK_NVME_FW_COMMIT_REPLACE_AND_ENABLE_IMG.
Return code will specify if conventional reset is required.
For now, return error if subsystem reset is required.
Change-Id: I41a05675a210dd0bbf170517b32ee9e05da9a797
Signed-off-by: Isaac Otsiabah <iotsiabah@us.fujitsu.com>
Reviewed-on: https://review.gerrithub.io/367287
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Documentation update - the plugin just works with 2.21 with no
changes.
Change-Id: If1fb2367a00065bfb5627d0d2af9683e5c909dc1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/367734
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Checked the code and found that our nvme perf example
added 1 io_queue_depth. Since if you set queue_depth=n,
the real entry is n - 1.
Change-Id: Ie204fc061b98e853e9b810eff21f79565c2ad8d0
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/367931
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Any transport that is not PCIe is a NVMe over Fabrics transport and
requires a subsystem NQN.
Change-Id: I68bfe49086f7f633fea8589ac15069327c4a4aa9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/367290
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
While here, change the recently added mem_size_mb to
also use the automatic option parsing for integer values
provided by fio.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I889073b3b3b01c7003b21d8ace61e71b672ff2df
Reviewed-on: https://review.gerrithub.io/367284
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
We do not need quotes around the filename.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I31685409eb5d956cdfb2fc30896e9e43312b61a3
Reviewed-on: https://review.gerrithub.io/367280
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1aee7aba522cc816f69709cfc95d12c50a5d0f4b
Reviewed-on: https://review.gerrithub.io/367279
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
While doing performance testing for the SPDK NVMe driver using fio with
our fio_plugin, I saw the error (transport->ctrlr_create_io_qpair() failed)
when running 18 jobs on my system. The error was happening when trying
to allocate memory for the trackers at line 890 in the lib/nvme/nvme_pcie.c.
Root cause was the fio_plugin.c initializes the environment with only
512 MB of hugepage RAM. I changed opts.mem_size to 1024 and rebuild
the plugin the issue was resolved.
This patch enables setting the mem_size in the fio config file using
parameter named mem_size_mb. E.g. mem_size_mb=1024
Change-Id: I3541b2029a6b36c26f814101313f49c2dd98c9bc
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.gerrithub.io/365735
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This can be used by threads within SPDK to undo the
affinitization done either by DPDK (for DPDK lcores)
or by inheriting the parent's thread when using
pthread_create().
This will be used by the stub app to unaffinitize
the reactor core to allow the scheduler to flexibly
move it to an idle core.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7e550953cd9dcd7fd9d98bfbb70660994f2eefcd
Reviewed-on: https://review.gerrithub.io/366680
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ibbe601489d16a9585e56de1c95fe31e9a602a7e0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/366387
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
For now, just hardcode the shm_id to 0 for any test apps
that currently do not support command-line arguments.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic8de44d4badc4c9b8858596b7f55dcc04371371b
Reviewed-on: https://review.gerrithub.io/365732
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Remove dpdk_ prefix in spdk_app_opts and spdk_env_opts
Change-Id: I6f231f67072b808e84945d41b1fe31a180beb350
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/365787
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch will cut down the autotest time.
Change-Id: Ica23bbe39884f1f51f42f836e7c9fa9007c06693
Signed-off-by: cunyinch <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/365736
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I7ccff922465195c7fe9836633196cd7a8816c11c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365071
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
In this patch, we also update perf and identify
examples. If there is no local nvme device info
parsing, we will set dpdk initialization with no-pci
choice.
Change-Id: I58b2d291b7b53894aeb194a16798ff1c72cf25b4
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/365361
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6450afc1f2361afcf1e0ee0528a6940ce5f321f1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365525
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia0083365b2da63cb38aebb9f7bbc02f4dfd1ae94
Reviewed-on: https://review.gerrithub.io/365263
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: I394937f10d067ccb270c30b54549514da77cb952
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/364939
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
fio has a race between reap_threads() and free_ioengine(). free_ioengine()
will call the ioengine's cleanup routine and then dlclose it if it
is dynamically linked (like the spdk fio plugin). free_ioengine() does
not set td->io_ops = NULL though until after dlclose() is complete. If
reap_threads() tries to dereference td->io_ops after our plugin has been
closed but before io_ops was set to NULL, it will segfault.
Solution (until an upstream fio fix is available) is to use LD_PRELOAD
instead.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ide4eb3cb92a636513289107fc211fdf1f98b616f
Reviewed-on: https://review.gerrithub.io/365272
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
DPDK's use of getopt() needs special handling of the optind global
variable since we are passing it a separate array of arguments (not the
typical argv and argc). Set optind to 1 internally to env_dpdk so that
the apps don't need to know about it, and restore optind in case the
calling app is also using getopt().
Change-Id: Icbf07002c99fa9f94c866e8eff707124b0ef679b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365062
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Fixes firmware update trying to open the firmware file with a newline
appended to the path.
Change-Id: I82c37e304a8a85901a5c9d419143cf20af079c34
Signed-off-by: Isaac Otsiabah <iotsiabah@us.fujitsu.com>
Reviewed-on: https://review.gerrithub.io/364705
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The snprintf() calls could overflow the buffer if i is very large.
This is not possible in reality since there are only a few I/OAT
channels on real systems, but it fixes a GCC 7 warning.
Change-Id: Ia202872135cc538120e17be2c76e16b687f3ee37
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/364302
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Also provide an option in perf tool let users to
disable it.
Change-Id: If4952513d77cecaa4f9403fbea811d86916ee87c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/363311
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I13f4be0d4b41e1f8b6fe5dd10e988e111f596999
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/363606
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Meneghini <johnm@netapp.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Gracefully handle ns_count == 0 in print_performance() rather than
asserting.
Change-Id: If8f8d56a2dd4d21ddc61069555c2b90d027431f4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/363614
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Ben Walker <benjamin.walker@intel.com>
- rename spdk_malloc_socket to spdk_dma_malloc_socket
- rename spdk_malloc to spdk_dma_malloc
- rename spdk_zmalloc to spdk_dma_zmalloc
- rename spdk_realloc to spdk_dma_realloc
- rename spdk_free to spdk_dma_free
Change-Id: I52a11b7a4243281f9c56f503e826fd7c4a1fd883
Signed-off-by: John Meneghini <johnm@netapp.com>
Reviewed-on: https://review.gerrithub.io/362604
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Also update the example fio file
Change-Id: I2a9074d524072e95340cc0e87041e87e3bb7d4f8
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/362069
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9ee1c2ab49691f7e31bbec83a057faa718177c90
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/362260
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
A single -L can be used to get the latency summary.
Two -L's (or -LL) can be used to get both the latency
summary and the detailed histogram.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3fc0f4e2dfff7b041a665fe35aa33f11e4c3ebad
Reviewed-on: https://review.gerrithub.io/362270
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0c47f2086d4f895cd75f32efc7df30d7182adcb1
Reviewed-on: https://review.gerrithub.io/362269
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I90feac0377b4870c1552df3eb470e834ceae4f65
Reviewed-on: https://review.gerrithub.io/362265
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The latency tracking is done with ranges of bucket arrays.
The bucket for any given I/O is determined solely by TSC
deltas - any translation to microseconds is only done after
the test is finished and statistics are printed.
Each range has a number of buckets determined by a
NUM_BUCKETS_PER_RANGE value which is currently set to 128.
The buckets in ranges 0 and 1 each map to one specific TSC
delta. The buckets in subsequent ranges each map to twice
as many TSC deltas as buckets in the previous range:
Range 0: 1 TSC each - 128 buckets cover deltas 0 to 127
Range 1: 1 TSC each - 128 buckets cover deltas 128 to 255
Range 2: 2 TSC each - 128 buckets cover deltas 256 to 511
Range 3: 4 TSC each - 128 buckets cover deltas 512 to 1023
Range 4: 8 TSC each - 128 buckets cover deltas 1024 to 2047
Range 5: 16 TSC each - 128 buckets cover deltas 2048 to 4095
etc.
While here, change some variable names and usage
messages to differentiate between the existing latency
tracking via vendor-specific NVMe log pages on Intel
NVMe SSDs, and the newly added latency tracking done
in software.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I299f1c1f6dbfa7ea0e73085f7a685e71fc687a2b
These variables are not needed outside of this file.
Change-Id: I577db5140fb4156100e72e6219c8121304a9b137
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
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
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>
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>
This patch will be prepare to support multi threads.
Change-Id: I2234ae1d564c9cf17b92c85fd0a414adaa639bf2
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
If no channels are available, don't try to run the test.
Change-Id: I4c40635a3da598064da7c94b3c7960a83ba25f8f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
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>
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>
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>
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>
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>
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>
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>
They were very close to the same already, so finish the job.
Change-Id: Ifba9e3b2d11a3e70cbfbe46f57a67552db2757ed
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
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>
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>
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>
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>
Instead of repeating the fields, just embed a transport_id.
Change-Id: I282704c9d59784abd5f7c93be4e47c673fcf6dde
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
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>
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>
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>
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>
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>
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>
This enables some future Makefile simplifications.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I071b32fbb695b74880c9659558d9653d3a904c10
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>
- 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>
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>
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>
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>
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>
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>
Remove #includes for all DPDK headers that weren't
necessary.
Change-Id: Ib02522e0f04e64a1c98afceb7508cc0e8d931a9d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
The example won't run without specifying the number of memory channels.
Change-Id: I278c225ee82181677a6206f73a11df09fd045209
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
Also made a slight change in the Namespace Display output.
Change-Id: Ieee288f4ec8c91c11ed5006824a5c7c069e89b00
Signed-off-by: GangCao <gang.cao@intel.com>
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>
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>
fgets() will return NULL if it encounters EOF.
Change-Id: I35b1744514f2a90d6e95156c3916a18c1a4ecce2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
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>
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>
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>
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>
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>
This way, they are listed in a consistent order across runs.
Change-Id: Ie920f4e0c2763efb6c1d2856b5ed0f57ecbe48c8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>