Commit Graph

997 Commits

Author SHA1 Message Date
Jim Harris
f45c98dd29 blobcli: use spdk_thread_send_msg when dumping blob
For thin provisioned blobs, an IO read to an unallocated
cluster completes inline, meaning that if the read
completion function issues another read, we can quickly
blow the stack.  So use spdk_thread_send_msg() to
issue the next read operation.

Fixes #2405.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I10a40b83bfc25fa6bbd8bc93b6fea36ac8ee83c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11784
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-03-02 08:29:01 +00:00
Changpeng Liu
b0f02769f9 nvme/fio_plugin: call spdk_env_fini() when exiting the process
spdk_fio_cleanup() is called per-thread basis, and spdk_env_fini()
is called multiple times when running with `numjobs` greater than 1.

Fix issue #2366.

Change-Id: I39ec379d71eeba1ca14ba42a93b819220ee1f307
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11443
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
2022-02-23 10:05:25 +00:00
Evgeniy Kochetov
b3ca1c70ee nvme/perf: Add option to set NVMe IO queue size
Some targets advertise large Maximum Queue Entries Supported (MQES)
value but fail to create long queues due to some other limitations,
e.g. lack of some resource. New '--io-queue-size' option allows to
workaround such issues. It may also be useful when researching queue
size impact on performance.

Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: Ie13b966070fbe5d8bb75cee59ae171bd25eafa63
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9090
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-15 18:31:52 +00:00
Mike Gerdts
ab2aad8553 blobcli: include bdev name in error message
When multiple bdevs are accessible by blobcli, it may be helpful to know
which bdev is giving the "Unsupported bdev event" error message.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ic55eacad13336366de3d6eac8bde932decbb2732
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11255
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-03 20:07:58 +00:00
Mike Gerdts
3453391baf blobcli: support for deleting blobs
Add a new option, -w for "whack", to delete a blob.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ic7650d9cb6d2aa1cdfa020ad6389c497a481409c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11254
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
2022-02-03 20:07:58 +00:00
Mike Gerdts
ff4fd58b95 blobcli: add forced recovery via blobcli
In the event that the blobstore superblock is marked clean but there are
indications that it wasn't, `blobcli -R` may be used to force blobstore
recovery.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ibc631b6dc0576f81fa1e0b71bd0c18244823e4c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11353
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2022-02-03 20:07:58 +00:00
Mike Gerdts
d14c3bfb8b blobcli: list help options in consistent order
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I38375670125129d0b728077eb4f7a11b23a9f3bb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11250
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@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>
2022-02-01 20:05:13 +00:00
Mike Gerdts
643385ea0a blobcli: uuid xattrs should be printed as strings
At the time of commit d1d22046df, xattr UUIDs were stored as
strings, not as `struct spdk_uuid`. That continues to be true today.
As such, bs_dump_xattr should be treating UUID XATTR values as strings
rather than as `struct spdk_uuid`.

This fix does verify that the UUID string is a well-formed UUID before
printing it. If it is not well-formed, "? Invalid UUID" is printed
along with the raw bytes.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I5b574c1c2c4b4802aae3ba23d32ef58fb6fa7586
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11249
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
2022-02-01 20:05:13 +00:00
Mike Gerdts
8389b65ad4 blobcli: do not read from an zero-length blob
Not all blobs have data: an lvstore's super blob is a common
example. Perform a size check prior to trying to dump the blob's
contents.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ic5bc1b11cdda72a36c6a3f4b4de0fd6f1a2948c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11246
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-01 20:05:13 +00:00
Mike Gerdts
76a577b082 blob: blobcli should use hex for blob IDs
Blob IDs are sequentially assigned starting at 0x100000000.
When debugging with a small number of blob IDs, it is much
more intuitive to see blob ID 0x100000000 rather than blob
ID 4294967296. If blob IDs are displayed in hex, the things
that parse commands should also accept hex to facilitate
copy and paste.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ic71eaaf1987609b4f705d372ced4240650b12684
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11245
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2022-02-01 20:05:13 +00:00
Ben Walker
0267f8a977 examples/idxd: Deal with queued tasks during drain
If a task is on the resubmit list, make sure to clear it out during the
drain phase or the queue depth will never go to 0.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I859a03d76865d404ce43e38cfb34c27ca436e537
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11208
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-26 08:12:44 +00:00
Ben Walker
c1ec924166 examples/idxd: Correctly handle -EBUSY
Change-Id: I6e794c2355c845959fccc4f04ba588b8162be9bc
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11060
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-01-20 07:54:55 +00:00
Ben Walker
4b426c9745 examples/idxd: Remove support for batching
The batching API will be removed from idxd shortly.

Change-Id: I04cf61112f7831a9fb0fefc269706495761d0889
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11032
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2022-01-19 08:49:25 +00:00
Shuhei Matsumoto
1ac578d42c example/nvme_perf: Remove spdk_nvme_poll_group_remove() calls
spdk_nvme_ctrlr_free_io_qpair() calls spdk_nvme_poll_group_remove()
internally.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I0085eb74c1aa2e5a318a980b2916fa20693c8d12
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10662
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-01-19 08:44:09 +00:00
Evgeniy Kochetov
a69541fc31 examples/nvme_perf: Fix result calculation with warmup
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: I67868da84d61f82a77fc2350dbc530e73ace2d91
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11103
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2022-01-17 14:26:11 +00:00
Ben Walker
e2efeef080 idxd: Add support for vectored crc32c generation
This uses a batch with the fence flag for now. There are several other
implementation options that will be explored in the future.

Change-Id: I4f344d671400508de05f80b026d42f775c5b9588
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10289
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
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>
2022-01-12 08:20:39 +00:00
Ben Walker
fa6ac87778 idxd: Add support for vectored fill operations
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I0d58320a03ee82169e83be6449ba52c9d2ee3a55
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10288
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-01-12 08:20:39 +00:00
Ben Walker
f11869c44d idxd: Add support for vectored compare operations
Compare two scattered memory regions

Change-Id: I6ce5c9e7bc1ee1ef0e9173c00e86628d43a1e41f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10287
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-01-12 08:20:39 +00:00
Ben Walker
fe70548070 idxd: Add support for vectored copy operations
Change-Id: Icb650129488b3cea76cf9082c02667f5b13b5ab4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10286
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-01-12 08:20:39 +00:00
Monica Kenguva
e1c20e3755 examples/idxd: Add batch functionality to idxd perf tool
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Ib4e1c4d68092316b261cb84f0a1918a7e733dddf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9735
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-01-12 08:20:39 +00:00
Changpeng Liu
9ec9c8b33d examples/nvme: add missed spdk_env_fini() when exiting
Althrough `rte_eal_cleanup` will be called in the destructor
function when exiting the application, it's OK not to call
`spdk_env_fini`, we still add this function call in case
there are cleanup function need to call in future.

Change-Id: I0a3eca44c5ed1d62059796ea8f1977fb19356939
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10904
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-01-11 14:19:05 +00:00
Changpeng Liu
f2aa5435e9 examples/vmd: add missed spdk_env_fini() call when exiting
Change-Id: If80008cac2a291786984ba3ea06196ef7310271e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10909
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-01-10 18:36:14 +00:00
Changpeng Liu
abcc84acd8 examples/ioat: add missed spdk_env_fini() call when exiting
Change-Id: I993d41dbec264fef140c83dcd585231c8d958a97
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10908
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-01-10 18:36:14 +00:00
Changpeng Liu
569e2eeda1 examples/idxd: add missed spdk_env_fini() call when exiting
Change-Id: I8993fa796722d65e899218dc9bc4da95c1538e81
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10907
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-01-10 18:36:14 +00:00
Changpeng Liu
50ced20e1c examples/bdev: add missed spdk_env_fini() call when exiting
Change-Id: Icee84d574a9519f6746f899741b553100f357ab0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10906
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-01-10 18:36:14 +00:00
Changpeng Liu
974e069878 examples/nvmf: add missed spdk_env_fini() when exiting
Change-Id: Ia6d1b05602541e2884394a7cb242480fcc33eea9
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10905
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-01-10 18:36:14 +00:00
wwlliangliang
0f5a873e6e examples/accel/perf: fix partial-free error before _init_thread
We encountered a coredump in running accel_perf with only one
ioat/idxd device enabled:

accel_perf: accel_engine.c:973: accel_engine_create_cb:
Assertion `accel_ch->engine_ch != NULL' failed.
Aborted (core dumped)

In identify_accel_engine_usage, we try to get an accel channel,
read capabilities of it, and free it. However, the hw destory_cb
is not yet called before running _init_thread because the hw destroy_cb
is delayed by accel_engine_destroy_cb, which is already a delayed
event itself. So, we simply check the first available channel's
capabilities in _init_thread to avoid such partial-free error.

Signed-off-by: Wenliang Wang <wangwenliang.1995@bytedance.com>
Change-Id: I96ae0408568ed6cd2cb9b74fde406a821943616e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10426
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2022-01-05 09:23:12 +00:00
Konrad Sztyber
2e4466d0f1 examples/abort: fail when no controllers are found
Otherwise, the test using this application will succeed, even if no test
is actually executed.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ib2235795ea51985d418c2be6904a68db15aa593a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10772
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-12-23 08:41:41 +00:00
Jim Harris
7b284f6201 examples: add discovery_aer
This can be used to connect to a discovery controller
to get and print discovery logs whenever a discovery
AER completion is received.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ieeb8630633e1be3031074caff6196d4124c5fcee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10548
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-12-20 18:12:41 +00:00
Jim Harris
843c387a1f nvme: add spdk_nvme_ctrlr_get_discovery_log_page API
This API is a helper for getting the full discovery
log page from a discovery controller.  It will read the
log page header to get the total number of entries,
allocate a buffer for all of the entries, and then
issue a series of get_log_page commands to read each
4KiB worth of entries.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I02666ef5adcb9fc8825a221655811ace708f97b8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10564
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-20 18:12:41 +00:00
Jim Harris
d07dc4d361 nvme/fio: free io_qpairs in close callback
If user uses the 'loops' parameter, then it will
call the open+close callbacks for each loop, but only
cleanup at the end of the entire run. Since we alloc
the io_qpair in open, but don't free them until
cleanup, we end up running out of io qpairs at some
point if we run too many loops.

So solution is to free the io qpairs in the close
callback.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibac864836f94994cdd24a7886894778268b14f73
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10674
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-15 16:45:56 +00:00
Jacek Kalwas
43022da379 nvmf: remove accept poller from generic layer
Not every transport requires accept poller - transport specific
layer can have its own policy and way of handling new connection.
APIs to notify generic layer are already in place
 - spdk_nvmf_poll_group_add
 - spdk_nvmf_tgt_new_qpair

Having accept poller removed should simplify interrupt mode impl
in transport specific layer.

Fixes issue #1876

Change-Id: Ia6cac0c2da67a298e88956734c50fb6e6b7521f1
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7268
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-12-14 13:18:33 +00:00
Krzysztof Karas
bace05499a logs: create a log level flag in abort and hotplug applications
Bloated log files appear during some tests
(nvmf_phy_autotest, during nvmf_abort test fot example),
what makes parsing them inconvenient. This change aims
to disable logs that cause this issue by adding a new flag
for SPDK target and disabling notice level logging completely
(using --silence-noticelog proved insufficient).

Fixes: #2149

Change-Id: Ibbad92d87d90fe73c23d6027e0ff8ec49b0393c2
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10311
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-12-14 09:12:01 +00:00
Krzysztof Karas
eb48f76d61 hotplug.c: add a second switch to parse_args()
Add another level of option parsing to allow usage
of string values.
Currently all values are converted to long
(or have to be checked before the switch),
which results in errors upon adding a string as a value.

This is going to be used in the next patch in the series.

Change-Id: Ib874d74b015eee825b5135ef3d49b9cb1c72029b
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10471
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-12-14 09:12:01 +00:00
wanghailiangx
df5ad409c2 examples/blobcli: remove a redundant error prompt
The details are as follows:
./build/examples/blobcli -h
Error: -b option is required.
(When we input '-h', this is a redundant error prompt)
......
Commands include:
        -b bdev - name of the block device to use (example: Nvme0n1)
        -d <blobid> filename - dump contents of a blob to a file
        -D - dump metadata contents of an existing blobstore
        -f <blobid> value - fill a blob with a decimal value
        -h - this help screen
        -i - initialize a blobstore
......

Change-Id: Ieccbcc56b02b10504170fb2e60090c25dc0d4b53
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10581
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-12-14 09:09:31 +00:00
Jim Harris
e123181d71 lsvmd: use spdk_pci_for_each_device API
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1ff5bea00f4b08bf879a3c726689b74f616c1c70
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10658
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-12-14 09:08:59 +00:00
Jim Harris
63b41c7237 vmd_led: use spdk_pci_for_each_device API
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8046242f05e4ffb676570e65e2217cf593add2e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10657
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-12-14 09:08:59 +00:00
paul luse
998b5d664e examples/accel_perf: remove batching
It's being added to the low level library perf tool which makes
more sense as the accel_fw provides queueing thus allowing any
queue depth.  When using the low level lib you are limited to
a small number reported by HW unless you use batching then you
can get quite a bit more.

Future patches will remove batch from the accel_fw, this is just
the accel_perf tool.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I3775b9ecdf353f730c7f3e2c06bb45a8873e61f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9845
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-12-08 16:35:40 +00:00
Mao Jiang
1f085e8e23 example/nvme/hello_world: add support for vfio-user transport
Change-Id: I280fc2cd84f577a71dda00dbc0f72f01fead6fba
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10182
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-12-07 08:22:13 +00:00
Changpeng Liu
4518e4c34e examples/arbitration: fix wrong usage of arbitration for vfio-user transport
This fixes commit 74dcf4aa "example/nvme/arbitration: add vfio-user transport support".
For vfio-user transport, we should use static DPDK memory model for
sharing memory between client and target.  Also enable log option here.

Change-Id: Iea1b28cbf234f5fc935c54899023bdbf1733a671
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10510
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-12-03 00:46:52 +00:00
Mao Jiang
74dcf4aa58 example/nvme/arbitration: add vfio-user transport support
Change-Id: I4aff5ec209de46e4e5e279cd84ce4968df568a60
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10464
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-12-01 09:19:28 +00:00
Krzysztof Karas
ac1abb5be8 hotplug: add check for uio_pci_generic driver
Add a check for this driver and enable iova=pa mode when it is
detected.
Add an option for the hotplug application to force iova mode.

This is to avoid:

EAL:   Expecting 'PA' IOVA mode but current mode is 'VA', not initializing
EAL: Requested device 0000:86:00.0 cannot be used

while using hw_hotplug test.

Change-Id: I7ff819c04b1e567b5ef88fc8f551ecec901806c8
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9774
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-12-01 09:16:29 +00:00
Josh Soref
b7876f9a63 spelling: examples
Part of #2256

* asymmetric
* bookkeeping
* current
* errors
* execution
* initialize
* initing
* management
* occurred
* operations
* prepping
* purposes
* similar
* syncing
* terminate

Change-Id: I7336d98c1327020ab83c9e01e6bf1e4f5f7b5d7d
Signed-off-by: Josh Soref <jsoref@gmail.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10403
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-12-01 09:15:03 +00:00
Niklas Cassel
66f7c55ed5 bdev_fio: use the new bdev_get_zone_id() helper
Use the new bdev_get_zone_id() helper when calculating the zslba.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I370a9ea3f82368e7b1a764bf221378797defe6b0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10181
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
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>
2021-11-11 23:23:35 +00:00
Ben Walker
7ffc8833f6 examples/nvme/hello_world: Iterate only active namespaces
Avoid registering inactive namespaces in the example. They can't be used
for I/O.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I404ca48666b566fd3248a3f56b25ea6509fa8d38
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10099
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-10 19:36:27 +00:00
paul Luse
fa9e703f4f examples: update pollers to use the expected enum values
Some were still using 0, -1 and/or count values.

Signed-off-by: paul Luse <paul.e.luse@intel.com>
Change-Id: Ic161b5436c55f229f1f1a557d29e395bf8d4f660
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8584
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-03 23:12:25 +00:00
Alexey Marchuk
31a1b193a2 perf: Add check that io_size is a multiple of ns sector size
It is possible to specify io_size which is not a multiple
of sector size and in that case real IO will have size
of g_io_size_bytes/sector_size. It is integer division, so
IO will be less than requested by the user. At the same
time performance statistics are reported using io_size
specified by the user (which is bigger than real IO size)
so we have wrong statistics (e.g. we can see BW higher
than NIC line rate).
To avoid this confusing situation, add a check that
user's io_size can be evenly divided by ns sector size.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ie63b5b7b3d99b5c51c10ec09e084fd30d6cb33dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9733
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-28 11:33:14 +00:00
Changpeng Liu
9f7cb6aa2d examples/nvme/cmb_copy: exit the test tool if no controller found
fix issue #2200.

Change-Id: I9d0374e56f199d562c48581ec6630547175d8627
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9927
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-20 07:24:47 +00:00
Jim Harris
4963728855 nvme_fio: add log_flags
Allow user to add something like:

log_flags=nvme,nvme_vfio

to their fio config file to enable log flags.  On
DEBUG builds, setting at least one flag will also
set the print_level to DEBUG.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7a409445d23c96845bc7afa9641966a964b7f44f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9871
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-14 08:17:28 +00:00
Jim Harris
1b61d481cc bdev_fio: add log_flags
Allow user to add something like:

log_flags=app_config,nvme,bdev

to their fio config file to enable log flags.  On
DEBUG builds, setting at least one log flag will
also set the print_level to DEBUG.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I383512e47ad6ea86b8b2c71a212bdc88fadf2f65
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9870
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-14 08:17:28 +00:00