Also fix options that doesn't start with CONFIG_ prefix.
Change-Id: I32a24373328bab8f513d56c0c09b5a86589f690c
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/427767
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This patch adds struct for "Chunk Notification Log".
New log page is used to report the state of chunk, lblk or pu.
Implementation is consistent with Open-Channel
specification (rev. 2.0)
Change-Id: I8aaf01c14d2f0faf8b8f8a6a773b6cb9bf97b38d
Signed-off-by: Jakub Radtke <jakub.radtke@intel.com>
Reviewed-on: https://review.gerrithub.io/426233
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This allows us to better distinguish between external and internal libs.
This series is aimed at fixing github issue 434
Change-Id: I2ed141f909e7c4a800df02061007b0d23da25380
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/425434
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
block_size should be extended_sector_size in case of
metadata or PI is enabled.
Change-Id: I2cba61975b0541ef64839a8cd117eb42f19742b3
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/425061
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Format of namespace is not changed during running but namespace
information is collected by identify command for every IO.
This caused much degradation of performance.
Hence call spdk_nvme_ns_get_data() and hold the pointer to the
buffer in which namespace information is stored at registration
of namespace and use the pointer in both task_extended_lba_setup_pi()
and task_extended_lba_pi_verify().
Change-Id: I12461ccb763247bbb9ccbe34802805ace67d9400
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/424362
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
'-s' option is usually associated with the memory size,
but our ioat/perf and nvme/perf use it for io size.
To keep those consistent:
'-s' option (io size) was be changed to '-o'
'-d' option (mem size) was be changed to '-s'
Change-Id: I97cef4c0a4e6e902277dd50dfb43bde420a6427e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/422654
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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>
Transport addresses can now additional contain an "ns"
key whose value is a specific nsid to connect to. If
unspecified, all namespaces will be used, which is
the previous behavior.
Change-Id: Icbebe32d68a1f97acaa1197c7fec5f119f33ec4d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/421267
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3e27c98a9dd72dce4fb333f04f8026392d1fcad3
Reviewed-on: https://review.gerrithub.io/420794
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Get Log Page - Chunk Information could return info
of all chunks. In order to have a glance of them,
by default, get information of 8 chunks starting
from the first chunk.
Change-Id: I7c395f631a3e7f02d59ad6758b347e249baa9c3d
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/411593
Chandler-Test-Pool: 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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Change-Id: Id79793e375e0f1dc2690869c4c38f59209cf806b
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/411592
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: 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: Changpeng Liu <changpeng.liu@intel.com>
Cancel the thread polling admin completions only after
all of the individual fio threads have been cleaned up.
Change-Id: I6ddedf043664073631f2161d3969ae743323003b
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/420575
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Change-Id: Ida194ff6213a78e15d77e89542650439e8eab348
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/411591
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Following the PI operation inside nvme/perf, add 2 PI
options into fio engine option.
SPDK ioengine will check whether PI information should
be generated or verified.
Running with PI setting, following settings are required:
1. In fio configure file, add PRACT like "pi_act=0", and
set PRCHK by flags(GUARD|REFTAG|APPTAG), like "pi_chk=GUARD".
2. Format device namespace with proper PI setting
3. In fio configure file, blocksize should be set as the
sum of data and metadata.
Sequential Write and following Sequential Read can be used
to evaluate it quickly.
Change-Id: I54e202bb8510cd987772117dff241aec714c8fb9
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/414753
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Will change -t to -L
Change-Id: Ie04edf1fd3877b36fde1bae66a84de29f6617bbf
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/415947
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: Changpeng Liu <changpeng.liu@intel.com>
The user can now specify which host NQN to use for identification
purposes.
Change-Id: I50d1f868af82a72d57e4bc42d70ee74c6fb1147c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/415551
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 makes keep alive work correctly during long runs.
Change-Id: Idc7277373920b48177a037aefe809e056f83cf10
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/415538
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>
Fio commit d3b07186b1d4c7c1d9adc1306407458ce41ad048 changed return
type of the ioengine->queue method to a new enumeration type
fio_q_status. Add preprocessor checks to ensure SPDK fio_plugin builds
successfully with both current and earlier fio ioengine API version.
Change-Id: Ie9eb818473c6453624d6cfe51a19c6bf0d17e334
Signed-off-by: Andrey Kuzmin <andrey.v.kuzmin@gmail.com>
Reviewed-on: https://review.gerrithub.io/413749
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
As of NVMe 1.3b, there is only one command set. But pipe
this through the driver per-spec anyway.
Change-Id: I4faf8596f5ce638e5e2a500b424e00ceb6e89edc
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/412102
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Change-Id: I7d929e7520007f29511299442f791038f7a4ce1d
Signed-off-by: John Meneghini <johnm@netapp.com>
Reviewed-on: https://review.gerrithub.io/409539
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>
Defined in ratified NVMe 1.3 TP 4008 (2017-08-22).
Change-Id: I42479c8a0acbdc1a2df54061ffbc12a54385cd94
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/409059
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>
The original temperature values are all in (unsigned) Kelvin and cannot
be negative due to the laws of physics, but when we convert these
temperatures to Celsius, they can be negative. Fix the printf
specifiers and calculations to take this into account.
Change-Id: I0326b96bf71137a5c1cdaf068ab6bcd91d8411b9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408907
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@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>
Low level NVMe driver will set the hardware IO queue size
based on MQES and users' input, perf tool has requested
maximum IO queue size when started, but for the number
of IO requests, it uses the default value. While here,
set the number of IO requests to a higher value, so that
for high queue depth tests, the perf tool will not fail.
Fix the issue #256.
Change-Id: I6d11ec65e0f3b246b824875fa17d74a31fd2702b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/403256
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>
Add an new option to let users choose PRP or SGL for I/O commands,
for SGL, users can append `-enable_sgl=1` when starting fio tests.
PRP is used by default.
Change-Id: Ic28c85c95fdd92d4bbe8a02616686b57e91e7271
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/407251
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>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Change-Id: I28ba1485ff42491ffd141800edcf5d5d1c7c0e28
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/406490
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>
- Add support for multi page CNS 0x2
- Use CNS value 0x02 (SPDK_NVME_IDENTIFY_ACTIVE_NS_LIST)
to query active namespaces
- Add an API to iterate the active list
Change-Id: Iea524881fa6e3610a7d85ab02a2005a92fd633df
Signed-off-by: John Meneghini <johnm@netapp.com>
Reviewed-on: https://review.gerrithub.io/401957
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>
SN, MN, and FR are ASCII strings as defined by the NVMe spec; use the
new print_ascii_string() helper function to print them. This trims the
trailing spaces and prevents accidentally printing any control
characters to the screen if the device provides an invalid ASCII string.
Change-Id: Ifaf383a79e13be62625250e7e79a305ebaa3612b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405926
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I730fa785f91034e15881d4ca3b94a98e9381f89b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405825
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8c455ad6bb71fb2519ac741c78aa0ed5de643729
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405807
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>
The vendor:device ID is already printed out in attach_cb, so printing it
again in probe_cb isn't that useful.
This also lets us remove the last use of spdk_pci_get_device(), allowing
it to be deprecated and removed in future patches.
Change-Id: Ie65abf136cce4d413f06594f91533ab9f9d4aca7
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405708
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>
This allows us to remove most uses of spdk_pci_get_device(), which looks
up a PCI device structure from an arbitrary PCI address. This function
is problematic, since it uses internal DPDK data structures that aren't
meant to be part of the public API. There is still one use in the
codebase, which will be cleaned up in another patch.
Change-Id: Ia1fe1f799c240195f6871c1d92821074f884c4e6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/405707
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>
A few places were accidentally storing namespace IDs in uint16_t.
Change-Id: Iae9d709fb20bc1ac0a584ccd9683b721ce5de961
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403886
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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 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>
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>
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>
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>
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: 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 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>