There are 2 #include "spdk/env.h" and an extra "]".
Change-Id: I7003333a164ef38ed166fbecf9e6b9f2df350ad9
Signed-off-by: WangHaiLiang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/416373
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>
Add init_crc parameter as seed value to spdk_crc16_t10dif API to generate
a CRC value spanning multiple separate buffers.
This will be necessary for upcoming DIF/DIX patches.
Having init_crc parameter is general, and so change the existing API
without adding seed version of the existing API.
Change-Id: I0ac7919b18013967e41829dcedd3e4e73204d5d6
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/437204
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>
This ensures that these operations occur on an SPDK thread
Change-Id: I265c814a289bdb8c95421c2675b35bf8c0074cc3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/436554
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This ensures that it runs on an SPDK thread.
Change-Id: If57161ebafe97d592fe6ffec1a7aa135beebdc7a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/436553
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This ensures that it occurs on an SPDK thread
Change-Id: I62d15d6b0fd4fe56939c664e44eecd3199014292
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/436552
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This ensures that these calls are executed on an SPDK thread.
Change-Id: I8cb4ee48c2f8bf4604e478e71e97bda856b6f0d0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/436551
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This plugin now only needs to periodically call
spdk_thread_poll() on each thread to function.
Change-Id: Ib87fe314b71b8689510ff142d4ab6acb20660283
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/419030
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This removes a ton of duplicate from a lot of
Makefiles. Note that spdk.unittest.mk still keeps
its own app rules, and now just includes
spdk.app_vars.mk instead. Fixing Makefiles that
include this .mk file requires more work that is
deferred for now. We do need to add the
"install: all" rule explicitly to this .mk files.
Note that Makefiles need to include spdk.app.mk
now at the end of the file, so that things like
APP and SPDK_LIB_LIST are defined before including
it.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If6823cda135180c37690ffc96c91660b7f0718e3
Reviewed-on: https://review.gerrithub.io/434283
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Much of this was originally applied by Darek in
6f5840d22 but then had to be reverted due to NVMe-oF
MR issues in a817ccf5. Now that the NVMe-oF MR issues
have been resolved, we can reapply these changes.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: I58d603523901c78dbc81279078a09b2a24c091e6
Reviewed-on: https://review.gerrithub.io/436547
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
The nvme/identify cmd issued some cmds to a ctrlr irrespective
of its type, and when the target was a Discovery ctrlr which only
accepts a very limited cmd set, that would result in errors observable
both on the initiator side (from nvme/identify) and in the output on
the target (nvmf_tgt). Introduce new API, spdk_nvme_ctrlr_is_discovery(),
and alter identify to make use of that in determining which commands
to send to the target.
Change-Id: I974a569843f1d2b9e1ece7bd3bf9ceee1bfae872
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/436225
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Change-Id: Ia65e235a85207c128ba274e1bab38d6c35344239
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/435563
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>
Replaced CLOCK_REALTIME with CLOCK_MONOTONIC as a source of time for
condition variable. Added flag to protect against losing track of
pthread_cond_signal() calls when pthread_cond_timedwait() times out.
Change-Id: Icfc7fd75f28c29e0e41baf709bb87fbad74ed8af
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/436347
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Take pollers' periods into account when calculating timeout for
pthread_cond_timedwait.
Change-Id: I12e29dc6c7a4b4fccfd250f0e1ed645fb7776d59
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/434381
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I90e7d698cae7577736319e38f089e3b759c9beef
Reviewed-on: https://review.gerrithub.io/435343
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>
Introduces new macro INSTALL_EXAMPLE and two example apps,
examples/nvme/perf and example/nvme/identify that make
use of it to install them while at the same time
renaming them in the target directory based on the
source directory path relative to examples.
Change-Id: I2d850458bb2589f80e0af6fb7a9d00aa3bbc6907
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/429963
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Application Makefiles can now just add xx_MODULES_LIB_LIST
to SPDK_LIB_LIST. This is possible now since all
SPDK libraries are linked with --whole-archive, so there
is no need to differentiate between "modules" libraries
and other SPDK libraries.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iabf81a388b72d3b2a2f48287a8491ddc977722ac
Reviewed-on: https://review.gerrithub.io/434277
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This allows a lot of simplification to SPDK application
makefiles.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5fa463f6369834b84a8d92e79fa7768082209d7a
Reviewed-on: https://review.gerrithub.io/434274
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
There were several applications that were missing
either SOCK_MODULES_LINKER_ARGS or COPY_MODULES_LINKER_ARGS.
For the ones missing SOCK_MODULES_LINKER_ARGS (fuse and rocksdb),
the nvme inititator with TCP transport would not have worked
at all.
Adding COPY_MODULES_LINKER_ARGS to the bdev fio plugin enables
ioat which isn't critical, but adding it makes it consistent
with other apps and will allow its Makefile to be simplified in
some future patches.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0098350d75d27ad2b2d408221b727698f5e902e4
Reviewed-on: https://review.gerrithub.io/434260
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This allows us to remove $(ENV_LINKER_ARGS) from all of the
application Makefiles.
Modify spdk.unittest.mk to explicitly set ENV_LINKER_ARGS
to nothing, to avoid DPDK libraries from getting linked
into unit tests. This seems better than creating separate
LINK_C rules for unit tests. Provide a UNIT_TEST_LINK_ENV
flag to allow select unit tests to override this behavior -
it's needed for some of the env unit tests.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I647f2c848cf434023cf5a1f3a45869bbc4fc8102
Reviewed-on: https://review.gerrithub.io/434145
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
The various *_MODULES_LIST are intended for the modules
that implement the specific interface - not for the
associated core library itself.
For example, BLOCKDEV_MODULES_LIST doesn't contain bdev,
it contains all of the bdev modules. Similar for
COPY_MODULES_LIST and copy.
So make SOCK_MODULES_LIST consistent. This is a real
pain because we have to add sock explicitly to a bunch
of individual Makefiles, but I have plans to clean that
up in some future patches.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0d293372cfb38bfa46c8478a8d9ca9ce23924747
Reviewed-on: https://review.gerrithub.io/434125
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
It is the first patch to follow the NVMe over fabrics
spec and implmenent the NVMe/TCP transport. It can be
divided into work in the host and target sides:
Host side: Add the TCP/IP transport in nvme lib (lib/nvme).
Target side: Add the TCP/IP transport in nvmf lib (lib/nvmf).
Change-Id: Idc4f93750df676354f6c2ea8ecdb234e3638fd44
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/425191
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>
Change-Id: I3b3ca9ce1db609bda59e991f84f511747f49eb87
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/433825
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: Jim Harris <james.r.harris@intel.com>
blob and blob_bdev are already included via the lvol bdev module
dependencies in mk/spdk.modules.mk. This patch adds blobfs there
too.
These changes are needed for some upcoming patches which will
apply --whole-archive to all libraries linked into the application.
That patch will require that we never include the same library
twice.
Shared library builds *require* that blobfs be listed before
blob on the link line, hence adding blobfs here even though it's
not technically associated with a bdev module.
We can also simplify spdk.modules.mk while we're here - just
filter out bdev_lvol to disable lvol for applications like
blob_cli that need to disable it.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I01e5e6b91d947463749f942f54c12f48229bbe5a
Reviewed-on: https://review.gerrithub.io/432916
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Rename some fields to let the name is consistent with
specification.
Change-Id: Ie63fb69465f1448a8ffbb99eaa8f356371fa4af1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/432972
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Apparently this patch revealed an issue somewhere in SGL
handling in NVMf initiator which is causing our CI to fail.
Let's revert it while we work on a proper fix.
This reverts commit 6f5840d225.
This is not a full revert, some app.c changes to the usage text
were kept unchanged.
Change-Id: Iddea5c2b9df50bd12ef8f6226165883f6622ab33
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432576
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Ben Walker <benjamin.walker@intel.com>
Now that we utilize DPDK dynamic memory allocation, we
no longer need to set the default pre-reserved memory size.
It'll now be 0, which implies all memory will be allocated
at runtime.
The option to pre-reserve all hugepages on the system is
now only available on BSD, so also clarify that bit in the
app usage text.
Change-Id: I5a8a1d9bf14ad6d938532d7e6254a45e4a81bb92
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432204
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This is going to be moved to a separate thread later in
the patch series and it won't be able to return an error
code. The entire program must exit.
Change-Id: I718d2a82346f78596f805492392a843e7a79359e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/432088
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This is going to be used in another function later in this
patch series, so move it up to avoid forward declaring.
Change-Id: I05227ed38b0d98b95f6a7126e9db1e3c31dc21c5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/432087
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
We're going to use this in another function later in this
patch series, so move it up now so we don't have to
forward declare it later.
Change-Id: I95244f062c6e75904ec2458cbad7a18a0923a5b0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/432086
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: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
When the NVMe namespace is formatted with PI enabled, PRACT value
is set to the bit 0 unexpectedly and cause the following error.
nvme_ns_cmd.c: 447:_nvme_ns_cmd_rw: *ERROR*: io_flags 0x1 bottom 16 bits is not empty
Change-Id: Ib99c7a974c6a224d4e702b54b654136f10291b18
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/430874
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Purpose: We need to get the port info in other applications
(e.g., NVMe-oF TCP/IP transport)
Change-Id: I3a4636e764e44425436bb064cb0062c6f3e44035
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/428313
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
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>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I824735548d4aaadefd09c943889f885c35d326c0
Reviewed-on: https://review.gerrithub.io/425545
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>
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>
It used to be enough for ioatdma to be unloaded - but now
we require the channels to be bound to uio_pci_generic or
vfio-pci.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I790fd909a4aa92adead5d711cce093e18e9f9595
Reviewed-on: https://review.gerrithub.io/424725
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>
The thread API is the preferred abstraction for sending
messages now.
Change-Id: I51d6886815e2f20c4726538fc8640c270eeb4854
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/424269
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@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>
spdk_app_parse_args recently added a new argument, which
the recent hello_sock.c patch had not accounted for before
getting merged.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I80e42775d5461102bf7603051b34a959b8cdabd8
Reviewed-on: https://review.gerrithub.io/422310
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This patch introduces sample application to show how to use libsock
and net frameworks in the SPDK.
While SPDK doesn't use client path in any way, for now, it also can
help us to write functional tests for both - client as well as server
paths.
SERVER MODE
-----------
In the server mode this application works like echo server responding
to the connected client with received data.
CLIENT MODE
-----------
In the client mode this application works like a telnet client sending
data from stdin to the server and printing out respose.
Change-Id: Ie4400cde1099a2f6b7cc02fa1b52f1c2c66784cd
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/421161
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>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@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>
There's currently no way to issue only fills unless
the app is slightly modified. Nevertheless, this
patch makes the code more readable.
Change-Id: I15a6ed57ed06880d26970c4be7c2db3b7326d3d4
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/416660
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
We're usually lucky and either the buffer is physically-contiguous,
or the address is already 8-bit aligned, but intermittent failures
were still happening. Not anymore.
Change-Id: Iec226b42f66c7c273f181cda764b92164e24b0e3
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/416658
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>
void* arithmetics are gcc extension. We'll be doing
more complex arithmetics on those pointers soon and
gcc will explode on us. Let's just keep it all
compliant to the C standard.
Change-Id: I9a236fc4d91ff72af1b7ac69b0ccf6b4631a6775
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/416656
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This will be necessary when the NVMe/TCP transport is added, which will
use the sock abstraction library.
Change-Id: I6561ccdad1ff575db2afa418eab2f2cd24806cb9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/416477
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@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>
This allows NVMe-oF to process keep alive requests.
Change-Id: I8f090cf3de894e00e85121ac2fb207266979e08d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414481
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Several apps link against $(COPY_MODULES_LINKER_ARGS) without adding
$(COPY_MODULES_FILES) to the dependency list. This means that those
apps would not get rebuilt if the copy modules were modified without a
'make clean'.
The blobfs example apps were also missing other dependencies; add those
while we're here.
Change-Id: Iac6606b650d32bf21f7f31bd2727f9e92c0da748
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414888
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 spdk_bs_dump which dumps low level blobstore metadata
information to a specified FILE.
Also add a corresponding -D option to blobcli which
utilizes this new functionality.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iad018b70f8caa4f950d55dd308b9000d55d885ae
Reviewed-on: https://review.gerrithub.io/414479
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Change-Id: I6babd4cf990bf19b510db88bdfb0ca81e29d9252
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414700
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Madhu Pai <mpai@netapp.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This makes more sense as a first class library.
Change-Id: Ibd5c578f8708bd8c7d83fe1629e97c9a3316b56b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414698
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: Madhu Pai <mpai@netapp.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>
This will become the public interface for implementing
bdev modules. Right now the file exposes too much of
the guts of the bdev layer to modules, so it needs
to be stripped down.
Change-Id: Ie8b8c3271d51fdb8d0c24a80244b3f3e510c8790
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/412297
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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>
This commit adds a simple hello world example that writes the string
"Hello World!" to a bdev. The example can be used on a block device
such as Malloc or virtual bdev such as the passthru vbdev. The
sample bdev.conf configuration file includes a configuration for 2
malloc bdevs and one passthru bdev on top of Malloc0.
Change-Id: I1414183e3ddfac988ef61f24b8271653ac57e7c1
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.gerrithub.io/407220
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@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>
This driver was added to allow benchmarking of the SPDK user-mode I/OAT
driver vs. the Linux kernel I/OAT driver; however, this isn't a
particularly interesting test, since the kernel I/OAT driver is totally
inaccessible from user-mode code (it is only exposed to the in-kernel
dmaengine framework).
Maintaining an out-of-tree kernel driver for the sole purpose of
benchmarking is out of scope for the SPDK project, so remove the kperf
driver and test harness.
This can always be retrieved from git history if needed later.
Change-Id: I0ced6e8a88de2cf09a6c0970dfef0ae8f357f193
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/408900
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>
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>
At this time blobcli makes use of all the bdev modules
during compilation. Yet vbdev_lvol does examine,
that already creates bs_dev on a bdev and loads
blobstore for all devices where lvol store exists.
Since bs_dev cannot be created on device twice,
same as blobstore cannot be loaded twice.
It prevented blobcli from displaying information
for blobstore underlying lvol store.
This patch remove vbdev_lvol from list of bdev modules
for blobcli.
Change-Id: I144ba22ec28f7f315e768745f5dd0cbbe3bbad86
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/404832
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: 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>
Fix up the single instance in the tree (dmaperf.c example) and
disallow more string functions with no destination buffer size.
Change-Id: I2bd39d6e848cd8a13536e26c4f0ee6713cf6dff9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/406829
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>
To support resize operations during I/O, we will need
to send messages to each thread to quiesce I/O while
the resize operation is in progress to guard against
the cluster map memory changing while another thread
is accessing the cluster map.
Therefore, spdk_blob_resize needs to be asynchronous.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ida037334739b4b80a1dbc76e8f1c70bca8b73582
Reviewed-on: https://review.gerrithub.io/404616
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>
- 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>
There are two separate function pointer types declared in io_channel.h:
spdk_thread_fn for cross-thread messages, and spdk_poller_fn for
pollers. They currently have the same signature, but this will be
changing in an upcoming patch, so we need to fix the poller-related
functions to use the correct type (a few were using spdk_thread_fn by
mistake).
Change-Id: I0f0d8f1eea9905395125fc91e0355a49e65be99e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/403598
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
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>