This package is no longer available in PyPI.
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8956 (master)
(cherry picked from commit 84867c8eaf)
Change-Id: I3e68b03eabeb4aff14453c90846fd03452c93ae2
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8980
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
93c4adda4d did not take
DPDK 21.05 release into consideration.
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8835 (master)
(cherry picked from commit 95a59652f9)
Change-Id: I9cc6a0fb7cb600d6ad08fc9eca1cbcd5e3c25d14
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8958
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
36b5a69bb0 "trace: fix the snprintf warning issue"
2ac1521581 "test/compress: fix Wstringop-overflow warnings"
These patches are needed to make sure SPDK's refs can be compiled
under GCC 11 (e.g. fedora34).
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8790 (master)
(cherry picked from commit d19ead1f76)
Change-Id: I7e3800351b02506c99ba8ac7f4d40312867e1ab9
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8948
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The data buffer isn't available at the beginning.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8932 (master)
(cherry picked from commit fb1ace6700)
Change-Id: Ieeb1a297ff52dfdc6cd999d04862a0cd96483650
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8947
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8931 (master)
(cherry picked from commit 1d6adfb09c)
Change-Id: I2803c806d623f345ce462b7fe1b7c02223008d9d
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8946
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
BUG FIX: call nbd_bdev_hot_remove will stuck if
it is called when nbd has in-flight IOs.
nbd_bdev_hot_remove is asynchronous. It will
guarantee the stop of this nbd.
nbd hot remove test will be added later
Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8039 (master)
(cherry picked from commit cc0d05b427)
Change-Id: I0a0dfab31fafd3d61212ade53c74ad05dbbff268
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8929
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This is done since previous version is not compiling anymore under
latest fedora33.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8916 (master)
(cherry picked from commit ea03551716)
Change-Id: I8f65d5e47af81f01221eb8699c3323c3f8099f38
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8928
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This reverts commit 585e808e06.
Signed-off-by: paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8908 (master)
(cherry picked from commit 74dd24851d)
Change-Id: I578d248d490c27a5806c5a77fb241a15ba85a530
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8927
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This parameter is still part of API spdk_sock_impl_opts
structure but it is not used. Keep it to support ABI
compatibility since it is located in the middle of the
structure and removing it may break socket opts initialization
or parsing.
Change-Id: Ib641ad7d965d68bc9ebb65dba531408d88cf6fa1
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8914
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Implemented nvmf code to allow transports to use ZCOPY. Note ZCOPY
has to be enabled within the individual transport layer
Signed-off-by: matthewb <matthew.burbridge@hpe.com>
Change-Id: I273b3d4ab44d882c916ac39e821505e1f4211ded
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6817
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Revise the if case to avoid the assert issue.
Change-Id: I095f3d111423e17abaa1f951fe22efb3d2e851b7
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8872
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Added new entries missing from CHANGELOG.
Net library was removed so deprecation.md was modified.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I062149129aaf854b3038d1ab5291eb5e56ff35b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8897
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: Aleksey Marchuk <alexeymar@mellanox.com>
Sorted current entries and typo/formatting errors in
preparation for SPDK 21.07.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I108ef6ffb65a4f3bc713696c5f2d4ef8903d192a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8896
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: Aleksey Marchuk <alexeymar@mellanox.com>
Modified get_pollers_data() function to use already sorted
poller array across spdk_top.
Modified related display functions and sort_pollers() to
accomodate the change.
Deleted prepare_poller_data() and copy_pollers().
Modified show_poller() to use a single entry from pollers
array instead of all of them.
Modified refresh_pollers_tab() to handle changing
number of entries in a different manner.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I26936fbc96e7cb598a33b2fe4354b03277d88061
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8638
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Create local structs to fill with RPC data, sort and then
copy into a global poller array inside get_pollers_data().
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I545392cbdc699e4d96f1d39611a6e694e209c25d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8234
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
get_last_run_counter() and get_last_busy_counter() upwards
Moves these functions above get_pollers_data() for use in next patch.
Moves enum sort_type to the section with struct definitions.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I795c02a660e987f5e9689dab07f14479d1026d99
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8057
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This patch aims to reduce number of core structures.
All related functions that use global core structures are reworked.
Part of code with poller and thread counter per core is moved to
data gathering function.
Additionally deletes double newline between functions.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I31034e5d889fe24b067a407ca348ba07c58ce6b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8565
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This batch_op field is not necessary because we can
use the comp_ctx->desc->opcode to judge whether it is related
a batched task or not.
Change-Id: Id329221ccf272c4c3bb8c1b5ec08433029a9a1f8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8865
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
This reverts commit 5e03beae70.
As it happens, Soft-RoCE is not capable of handling all the test cases
in the vhost suite.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Iccbbe3a7314cc68bb4feca700fa6d943c961bd2b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8894
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Implement bdev_nvme_reset_controller rpc, which allows the NVMe
controller to be reset over RPC. Implement bdev_nvme_reset_rpc()
which starts the reset of the controller and returns the result of
the controller reset via the callback function after it completes.
Signed-off-by: Jonathan Teh <jonathan.teh@mayadata.io>
Change-Id: Id98d5e56feb315b7e44e9bb5e5f495e9b1cd1de0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8456
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
In bdev_nvme_reset_ctrlr(), get a controller reset context and start
a poller that calls spdk_nvme_ctrlr_reset_poll_async() to perform the
controller reset asynchronously.
Signed-off-by: Jonathan Teh <jonathan.teh@mayadata.io>
Change-Id: I1e3ae42291c3b43b69c99ca56997dc1965c3ac59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8454
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Implement an async variant of spdk_nvme_ctrlr_reset(). This initial
implementation only allocates a context and returns it to the caller,
relying on the caller to poll the context to execute the existing
spdk_nvme_ctrlr_reset() implementation.
Wire up spdk_nvme_ctrlr_reset() to use this async variant to verify
that NVMe controller reset still works.
Signed-off-by: Jonathan Teh <jonathan.teh@mayadata.io>
Change-Id: I75d4b75dbf5897db452ee65286aef5a4eb839fca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8330
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Merge core_info into rpc_core_info to increase readability.
Delete g_cores_history to reduce number of cores structures in spdk_top.
Add temporary cores structure to get_cores_data() to fill with
data from RPC call. This is to allow fields last_busy and last_idle
in g_cores_stats.cores.core_info structure to retain their values
and assign new ones with each data_thread_routine() loop.
Change core display across spdk_top accordingly (change places
where g_cores_history was used to use g_cores_stats instead)
Delete get_core_last_stats(), because it is called only in one
place and can be replaced with direct assignment of two values.
Delete last_page variable from refresh_cores_tab.
That variable was used to decide which core entries to update,
and since we collect and update data for all entries elsewhere,
this is not needed anymore.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I4a5a4c90098401876b214068725a8fce29766a12
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6449
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This patch aims to reduce memory needed to run spdk_top by removing some
of thread data structures and also to rework thread RPC functions.
Related functions that use thread structures for data gathering and
display will be modfied to accomodate new changes.
free_rpc_threads_stats() will be removed, because we now allocate
memory on stack instead of heap and manually freeing is no longer
needed.
Deleted last_page variable in refresh_threads(), because it was
not used.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I73c30637b26434dad7ea55a9866887b1988166b1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8533
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Poller state does not change back from Busy to Idle after it
has finished its work and this patch aims to resolve that issue.
Added a field in poller history to store last busy_count of each
poller for later comparisons with current values.
Added a function to get last busy count of a poller.
Modified related display functions.
Fixes#2037
Change-Id: I214e41133eaf90b0f1d7995a53e577a7c1c5d33e
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8755
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
New pollers did not have a corresponding run_counter_history entry
when displaying data for the first time after they were created.
If user enabled g_interval_data and observed the creation of the poller,
application crashed due to get_last_run_counter() returning NULL pointer.
Fixes#1995
For new pollers there is no historical data and current last_run_counter,
matches the expected last_run_counter for displayed spdk_top interval.
get_last_run_counter() now returns 0 when matching run_counter_history is
missing. Avoiding dereference of a NULL pointer.
While here modified copy_pollers() to no longer get and store the last run counter
twice. When doing reset_last_counter only storing the new last run counter is needed.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I5218c9ac0f2f79da32840cf64b4083642893f5cc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8683
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This patch aims to reduce memory usage by deleting chain of poller structs
that depend on each other.
Reworked RPC related functions to use only one poller structure.
Reworked prepare_poller_data() and copy_pollers() to accomodate new change.
Changed display functions, which use poller data.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I0252f93e47fec6a3298f07463aebd495697274bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8519
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Deletes core num variable inside refresh_cores_tab,
because it is used only in one place.
Change-Id: Ie10a7b53487da507cb8d0babab6d00eb2f9412ca
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8715
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Currently spdk_top retains selected thread sorting for one application
loop only, because it is performed before all assignment operations are
done.
This is a problem when 'sort by core' is selected, because threads are
sorted before core assignment happens.
This patch aims to resolve that issue.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Ide6d025d5e4e31a8fda713703a822e976468f326
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8629
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Some packages include versioning in their name which is not very
friendly in case given package is upgraded - the name of the package
will always change in such a case. To avoid that, use globbing to
match on package names in a more robust way.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I3e23fc8a06f93471f47835e945c24c4a95f80795
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8741
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
For Test Case 2: SPDK NVMe BDEV I/O Cores Scaling
we need to specify DPDK main (primary) core.
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I53d706c4173e16035a3883c29547659a0c7a22fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8553
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
New job was added to the CI (nvme-cmb-pmr-vg-autotest) which brings
PMR|CMB functionality under qemu 6.0.0. Since these tests are now
being executed they should not be considered for skipping.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ib09336a85da2955d63e28834779042c672823cde
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8704
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
For now this function is not working very well in case it finds E810
cards (we do have some installed across CI pool) as we don't have
proper irdma driver in place.
Instead, and since it shouldn't be relevant for vhost tests, enable
soft-RoCE devices and use them (or any other rdma-capable NIC that
ip is going to be allocated on) during the vhost migration tests.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I4e8cc7b8eea3ce91684d8a68d0a0e11b8d1e4b9b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8750
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Trace details are written out only when test fails, but sometimes
it's hard to determine from which script and what particular line
given command is being executed during the actual runtime of the
test. This should make it a bit easier. The log lines would look
like this:
-- common/autotest_common.sh@1217 -- # uname -s
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Iac6973f986e6c553f39e5a9c909ccabf607251f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8756
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>
Add exceptions to results parsing and fio run functions
to better inform what's the cause of the failure.
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I94e51cb8f77515f7d26a75501011d6111820ae56
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8742
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Enable "kernel_engine" option for Kernel Initiator
class to enable ability to use io_uring engine on
initiator side.
For NVMe-oF this has limitations as apparently it's
not possible to enable polling on the initiator side,
which in turn makes fio "hipri" option also not
possible to use.
Adding #TODO sections with notes in case this is
later fixed in Kernel NVMe driver.
Signed-off-by: wawryk <maciejx.wawryk@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I31da52946692015237263abc77d8425b5eae5b98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8134
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
When the QP is set to INACTIVE state, we always unmap the QP's
address to NULL, we can just check the address is valid or
not before posting completion response, so there is no need
to do the special process for the aborted AERs.
Change-Id: I1dc9893e04810e9a15e1eeb4d9405b775eab38d7
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8803
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
We should use the diff bits to decide the action to CC.
Change-Id: I08cf6f65711f86328825dcd9e204ed79766c59fe
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8802
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Similar with Create IO SQ command, we should also defer the completion
of Delete IO CQ command until the IO QP is disconnected finally. However,
since the NVMf library will disconnect/free the queue pair finally, we
can't use the queue pair data structure to save the context, so define
a delete_cq context for Delete IO CQ command.
Change-Id: I005ad86c2af59540323205e9e928a2d573d5c448
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8796
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The NVMf library doesn't process Create IO SQ command, so for
this command we will use a fabric connection command instead,
however, the fabric connect command is called asynchronously,
so we need to defer the completion for Create IO SQ command after
fabric connect command is completed.
Fix issue #2043.
Change-Id: Id8c71ca69fb750a3ffb0fb26b54fa8b6d87e8ff4
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8786
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
We can set endpoint's controller pointer to NULL before free_ctrlr, as
controller is a session in vfio-user, while endpoint is related with
Unix Domain socket.
Change-Id: If6d26c7522804029f8c2425bc478df9e2d53d32a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7966
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
The VM may already delete all queue pairs and just leave the
socket when killing VM, so we can check number of connected
queue pairs here, if no connected queue pairs, free the
controller immediately.
It's an optimization so that we don't need to loop all
queue pairs below.
Change-Id: Ia1be868ce2c74ce6953b1f44a81b51d605e642f0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7625
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
This new connect_stress application connects to a
specified subsystem, creates some IO qpairs and
reads the CSTS register. It goes through this loop
over and over again until the specified time expires.
The connect_stress.sh test script runs this application,
and then while it is running does continuous add_ns and
remove_ns RPCs.
This stresses nvmf handling of connect (admin + I/O) as
well as get_property commands.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8ab5156045cf5614f74988e38a9d37db96d7d5b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8572
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
In rte_power all that enabling/disabling turbo does is allows
for additional entry in frequency array for particular core.
Instead of exposing this API through spdk governor,
just make sure that dpdk_governor enables turbo by default.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I994b326a57c01889bccea26635753c56637259d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8789
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Those calls went unused, in favor or much more useful
up/down/min/max variants.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I432896196a1a6edfc6799c8658df49567f73d457
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8788
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The spdk_governor_capabilities added lots of capabilities
which went unused, suposedly to mark which callbacks
a governor had implemented.
This made little sense, since capabilities are per core and
not implmenting this APIs made little sense.
With this patch spdk_governor_capabilities is brought in
line with rte_power_core_capabilities.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I85296fce2999cb41957162b63ee13d86a0be919f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8787
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Remove _spdk_scheduler_disable() to avoid confusion as there is
no spdk_scheduler_enable function. Since spdk_scheduler_disable
sets scheduler period to 0, use spdk_scheduler_period_set(0) instead.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4f1390a635f80e8b92775aa4be2e37f5b95467f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7448
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
The size of the core_info->threads will always be equal
to reactor thread_count, there is no need to count it
separately.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Icfa84606bd29d7766738eb2053362a20d78c23af
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8733
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@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
Replaced multiple functions calls to _reactors_scheduler_update_core_mode(),
with a for loop.
Since changing reactor to interrupt mode is rare operation, most of the
time we ended up with unnecessarily long callstack.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1c7858653be9e2256943c1da5a27001be41682b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8714
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
There is only one g_scheduling_reactor (main core), the is_scheduling
flag for it is used to block starting new gather_metrics before
previous one is finished.
Meanwhile is_scheduling flag on other reactors was used to block
destroying lw_threads while scheduling happens. It was only needed
because scheduler interacted with the same lw_thread pointers as
each reactor. Previous patch removed this dependency, instead
spdk_thread ids is used. If an spdk_thread is destroyed,
while scheduling _threads_reschedule_thread() handles it.
It is no longer required to block destruction of lw_threads
based on this flag.
Instead of using the main core reactor flag, a g_scheduling_in_progress
is introduced.
Removed _spdk_get_scheduling_reactor() and instead shared the value
of g_scheduling_in_progress between reactor.c and app.c.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ica57326a552477add522174cc3e96b3bab918350
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8732
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Removing dependency on schedulers to directly modify
lw_thread field structures will help making schedulers
truly plugable.
Instead of using lw_thread, new structure is created
that holds copy of stats and refer to the thread by
spdk_thread id.
As an added benefit of not changing lw_thread directly,
we won't run into issue of balancing function changing it
while other reactor removes and frees it.
In the future an API will be added for scheduler to call
in order to move the thread directly. Rather than for
event framework to rely on modified core_info/thread_info
structure.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8f85bb8dc080fd13b78b07ee9ef8e8be7051659b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8411
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@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>
Functions that set reactor interrupt mode were not tested
since _spdk_get_app_thread() always returned NULL and
implementation did not verify the RC.
This patch will return a thread from scheduling reactor
as the app thread. Which is not exact, but otherwise
a new app thread would have to be added to each UT.
spdk_reactor_set_interrupt_mode() requires the completion to
be executed on app_thread. Added the poll of that thread
to make sure it gets drained.
Since now the UT actually executes the code path,
additional 4 events will be processed.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0793e6dcc41c447dc11ed8ab28eb9041c5d82628
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8409
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Scheduler and governor tests polled events till completion,
but depended on exact number of events and repeated those
calls multiple times.
This patch adds _run_events_till_completion() which will
run all events scheduled, until there are no more to process.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iab3af2e031510b095ddfcc93d2320bbdc7d84aeb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8408
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The "threadX_name" variables are not used anywhere except
creating the thread. Instead use the names directly.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6bdb2eb1d1e96fe888a4d5d9765fc0b0dfa74272
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8794
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Limit of 50% to mark thread as active or idle
didn't allow for multiple active threads to be placed
on single core.
Lowering the limit to 20% will allow that and force
more threads to be actively balanced.
Removing the limit was considered, but that would
cause too much thread moves when a thread with load
in single digits increased briefly. Either
due to actually doing any operation or placement
of other threads on the same core.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5f8c9ff15461feb71a2d82853cfe048e412ba921
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8289
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Fixes#1933
When decoupling parent the updated parent_id was
not persisted to the blob if it was a snapshot.
Due to having md_ro set to true, blob_set_xattr()
failed.
Later on the incorrect parent_id could cause troubles
like in the github issue, when deleting that snapshot.
This patch adds return code check for blob_set_xattr
and forces md_ro to false during blob md sync.
Since some of code paths are shared between decouple,
inflate and clone operations, the final callback for them
is doing revert of the original md_ro.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If017455f72e4d809fe533d9f986e5ae6bb8e2035
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8420
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
It's not needed anymore since we pick up now last idle sample in
comparision to remaining states given cpu spent time in. This way
we get the faster view if in given moment cpu is busy or not.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I3677c03ee3c2e42662df35dd0a6e7b5b6b1f98ed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7565
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I72da312e0d7fe71ae40b582501b52be615de4b63
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7564
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>
This is done in order to detect cpu times in a more deterministic
fashion.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I005d6fececdc15500bcf637e96f2fbecbd4273f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7563
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>
This is just assert to assure the Klocwork
static analizer that ptr is not NULL.
Change-Id: I458af194991fb1874fb7d32db55513a1f66408c0
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8745
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
After this patch, nbd will no longer receive any requests if
NBD_CMD_DISC is received. But it will handle the requests
already received.
Previously we called spdk_bdev_abort() for NBD_CMD_DISC and
it will reply to the rest requests in the channel of this bdev.
But there should be no reply to NBD_CMD_DISC. Hence we silently
discards requests after NBD_CMD_DISC.
Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: I551dea1887cb2d108ed5e0d621309f62cfaabbb9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8038
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: 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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
The specification says:
"A host may replace its reservation key without regard to its registration
status or current reservation key value by setting the Ignore Existing Key
(IEKEY) bit to '1' in the Reservation Register command."
So for this case we treat it as a new registrant, also add UT to cover
the added cases.
Change-Id: I5990f15da36706063a35565d110ed4c6eb30a3f3
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8024
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Since we are using NVMf fabric library to emulate a PCIe based SSD via
vfio-user target, so there maybe some commands that are related with
PCIe SSD only, such as set/get features with interrupt coalescing
and Interrupt Mask Set/Interrupt Mask Clear registers. Even the
NVMf library doesn't support that, it is not a fatal error to Host
NVMe driver, so here we use the info log instead of error log for
this case so that to avoid noise logs.
Fix#2036.
Change-Id: I8283bcde5779080835d6ab827dbd852b3816176f
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8766
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
The NVMf library will not implement interrupt coalescing and ignore them, but we can
report this via get_features.
Some OS may check the result from get_features so that it will not send set_features
for interrupt coalescing.
Change-Id: I7466bcbc0ea5b3b067751cdf1979b2e0681c0043
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8765
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Use the macros for red black tree provided by Free BSD to speed up
io_channel lookup.
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: Icfd87a8a2f60c082a17b8c501a03faba83edb762
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7895
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: GangCao <gang.cao@intel.com>
In current implementation, io_channel list will be accessed by
spdk_for_each_channel() and spdk_get_io_channel(). We will try to
accelerate spdk_get_io_channel() in the following change "thread: speed
up io_channel lookup by using rbtree" by changing io_channel from list
into RB tree.
To make it cleaner, we prefer to use ch->dev as the key for the
io_channel RB tree instead of ch->dev->io_device. This patch makes
spdk_for_each_channel() use the i->dev to find the expected io_channel.
And the io_device in structure spdk_io_channel_iter is not needed in
spdk_for_each_channel_continue() but we keep it for the compatibility of
spdk_io_channel_iter_get_io_device().
After this patch, spdk_for_each_channel() has to access both io_device
list and io_channel list, and spdk_for_each_channel_continue() still has
to access only io_channel list.
Both io_device list and io_channel list will become RB tree. Hence
performance degradation will be negligible. spdk_for_each_channel() is
not so performance critical than spdk_get_io_channel().
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: Idd486b0aa1b63b57ede90527dcd1631cbb008a1a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8749
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: Jim Harris <james.r.harris@intel.com>
In test_spdk_nvmf_ns_event, when doing ns resize it will call
spdk_for_each_channel() to pause the subsystem. But it doesn't call
spdk_io_device_register() in advance. This is wrong and may run into
assertion with the coming change since the io_device is not found.
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: I077b41f812266248c39fdbdb8cdff352d3b4cb74
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8767
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Use the macros for red black tree provided by Free BSD to speed up
io_device lookup.
This change was reverted once but is re-submitted because the critical
issue was fixed by the preceding patches.
In addition to the fix, add unit tests to verify the fix explicitly.
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I97ed77f6e5ceacdf2593c9751b55a7d0b92c0b35
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8525
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: Jim Harris <james.r.harris@intel.com>
Patch f95e331be3a1f856b816948990dd2afc67ea4020 is no longer needed,
since it was solved at upstream level.
Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: Icf064b121351566988c26390f45286e7a456ca39
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8698
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Previously we used a counter of our own to make sure all batch
elements plus the batch itself were done before we freed the batch.
This was due to some observations early on that the batch desc
could complete before the individual elements and a lack of clarity
as to whether this was due to the simulator or the fact that
we poll on completions and could therefore "see" completions in
a different order at that time (we were using bit arrays to poll).
Now we use an ordered (in time) list to poll locations so if we
instead put the elements on the list first and then the batch desc
itself we are assured to always "see" them in order provided the
underlying device meets spec which there's no reason to assume it
does not.
This simplifies things a bit at the same time and still assures
that we call list calbacks in order and then the batch callback
without "special" handling.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4d9e3997786f2116ce6515682b8117799c645f51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8397
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>
Left over from when the field was a void *
Signed-off-by: paul Luse <paul.e.luse@intel.com>
Change-Id: If9dfe2878f6afd6137d6d8efec90e310baf417f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8280
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
For all CRC related functions. Does not need to be DMA'able memory
as DSA returns the CRC to it's completion record and the lib
copies it to this address. Done for consistency as this element
was added as part of adding the copy+CRC API.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iefedcbc0a1c4e211eeb8aaf5c52f2881e9173bad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8230
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
For clarity, this element was added when crc+copy API was
added so might as well have all the CRC related functions use
it instead of `dst` to avoid confusion.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic43adbd0df51c1a349847701ef318f452306d0b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8229
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
We've always used `dst` as the destination for CRC result, with
the recent addition of a copy_CRC API `dst` was needed for the
copy destination and `crc_dst` was used for the CRC. This
patch just makes all the CRC functions use `crc_dst` to avoid
confusion. The accel_task struct also has a `crc_dst1 field,
that will be used consistently in the next patch.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia84c4a9e7940c6ebd31410c12272bd22b0c6dd29
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8228
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
For COPY+CRC operations, we allocate a destination buffer for each
task that's big enough to hold the copied input data for all stages
of the chain. For example, if the operation is 4 stages of 4K input
buffers, the destination will be 16K in size.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id32a98c1dbada2881a8423c050e892d5c37bf6cc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8204
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Support in accel_perf is coming up in a later patch.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I63a1d3b9b1a3254fdca78e27c473b9b3468c93c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8202
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Allows for better performance by not hitting the same portal
address with every submission.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I1ec8eae6f3acec9e98161029cd5406ec08603aa6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8190
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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
We find a few files to get the size of a member of a struct. How to
do it is a little complex. So add a macro to do it will be helpful
to read the current code and develop new features.
lib/dif had used member_size() internally but Linux use sizeof_member()
as the macro. Besides, SPDK have used upper case letters for similar
macros, SPDK_CONTAINEROF() and SPDK_COUNTOF(). Hence spdk_member_size()
may be good but propose SPDK_SIZEOF_MEMBER() as the macro.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2179c845a3b75fb71aa039075cc4dfd30617b898
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8738
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
In this case, user could specify the core number like:
-m [0,1,10] besides the core mask like -m 0xF
Change-Id: I48621c5a84e5436deae07101591d0ef85b1e129e
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8746
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Now nbd stop will not be processed if this nbd is not fully started.
However, it will remember the stop command and do it asychronously
until nbd is fully started.
Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: Iea5ba143332c7d3fd85f816726788f05e7ae3c8d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8037
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
If there are completed asynchronous events that have not been notified
to the user, free them during controller shutdown to avoid memory leaks.
It can happen if an event completes before user has a chance to execute
`spdk_nvme_ctrlr_process_admin_completions()`.
Fixes#2032.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ie608bf9100342f8dfd709e070326f67335d27fed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8740
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Create a single nvme_bdev_channel for each nvme_bdev and each SPDK
thread. nvme_bdev_channel has a pair of nvme_ns and nvme_ctrlr_channel.
The pair of nvme_ns and nvme_ctrlr_channel will be aggregated by
nvme_ns_channel in the following patches.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I095a2d6afa4ea23a87e4452b2f9d4c7e0087abe0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6605
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
This is the same fix as done for lib/nvme.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9ca5e1ea9dbdba45b51b311e9a36f278b1b62770
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8437
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
NVMe bdev module manages ANA log page itself now. So NVMe driver
should disable managing ANA log page.
Add a new option disable_read_ana_log_page to struct spdk_nvme_ctrlr_opts.
Then NVMe bdev module enables it when calling spdk_nvme_connect_async().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id5249efe90a4d50763c3a7eaa1eb9572f60fbc8c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8313
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
This fix is as same as for NVMe bdev module.
If a ANA log page has two or more ANA group descriptors, the second
or later of ANA group descriptors will not be 8-bytes aligned.
Then runtime error would occur as follows:
runtime error: member access within misaligned address 0x612000000074
for type 'const struct spdk_nvme_ana_group_descriptor', which requires
8 byte alignment
nvmf_get_ana_log_page() in lib/nvmf/ctrlr.c creates a ANA log page
data and processes 8 bytes alignment correctly because we got the
same runtime error before. However, lib/nvme had been missed at that
time.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idaa610544dc5cb659c387fcd38a2b4b97cbd06e5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8398
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
The next patch will add an new controller option, disable_read_ana_log_page.
Initializing ns->ana_state to optimized before reading ANA log page
will simplify the next patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I34e56a2b454e4c02e1899f972e0ad675f2ebe2a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8312
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: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
When ANA change event is notified, increment reference count, read
ANA log page, and parse it to update ANA states of namespaces.
Then remove the spdk_nvme_ns_get_ana_state() call and its stub in
unit tests.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I254ae6cb993694bf0d7f4fa4b1039b5f9243b5cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8335
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
If ctrlr supports ANA log page, nvme_ctrlr allocates a buffer for ANA
log page and read ANA log page itself, and then each nvme_ns sets its
ANA state by parsing ANA log page.
Most code was brought from NVMe driver because NVMe driver already
supports ANA log page management. However it had a bug that assumed
each descriptor is 8-bytes aligned. Fix the bug together in this
patch. Besides, the implementation in NVMe driver was synchronous.
NVMe bdev module reads ANA log page asynchronously instead.
The next patch will support ANA log page update by AER handler.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib8eab887633b043b394a45702037859414b8e0a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8318
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I54093bef0fc34947dce161bacee7a75721ff937f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8712
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This patch is used to add the support for users to configure
use kernel or userspace idxd library.
Change-Id: Ie159b897bc9595894ad8f333168efaea6c2a3d78
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7332
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This patch is used to add the kernel idxd support.
Without this patch, we can use userspace idxd driver
under accel_engine library (module/accel/idxd/accel_engine).
With this patch, we can also kernel idxd driver under the
accel_engine library.
Our approach is implementing a wrapper library to use IDXD
device by leveraging the kernel DSA driver in SPDK idxd library
(lib/idxd).
Then users can leverage the RPC later to configure how to
use the DSA device by user space driver or kernel driver.
In this patch, our approach is to use the idxd-config library
to export the WQs (Working Queues) exported by the kernel.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I3a25a4fe0327bd626bf6883dfbe54437d3209e51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7331
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
There is no need to map the PRP/SGL list RW since this memory is never written
to. In fact, SeaBIOS might submit a request where the PRP list resides on
read-only memory, so attempting to map it RW can break things.
Change-Id: I7e4e90b1fa7e33e81b8d5cd8dcb9568c038938ec
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7288
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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Nvmf/vfio-user uses this API to map NVMe command sent from
VM from Guest Physical Address to Host Virtual Address, so
now we moved this API from the nvme library to nvmf/vfio-user
as an internal API.
UT code will be added back in coming patch.
Change-Id: I54817fc9811ccd9ddd97b3aa6762a2fce4bbdda6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8574
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
This patch is used to improve the performance when
we need to reorder the list.
PS: Bring the similar operations from posix implementation.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I7031b35ddb597730ee160690e8ab9caf9b2b64b7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8675
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Just remove this function pointer and add a new one,i.e.,
dump_sw_error.
Because this function pointer is only used to
read a sw err info. We can hide it in the detailed
idxd implemenation.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I42fe2220dae85df307b5af64e37acfd7f748915b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8707
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: Changpeng Liu <changpeng.liu@intel.com>
Latest nvme-cli (>= 1.13) fails to issue commands towards SPDK's cuse
ctrl device, e.g.:
$ nvme get-feature /dev/spdk/nvme0 -f 1 -s 1 -l 100
nvme_cuse.c: 654:cuse_ctrlr_ioctl: *ERROR*: Unsupported IOCTL 0x4E40.
get-namespace-id: Invalid argument
The reason is because nvme-cli now also sends NVME_IOCTL_ID to the
target device to determine if it's indeed a controller or a ns. In
case kernel returns ENOTTY then nvme-cli considers the device to be
a controller. Since cuse_ctrlr_ioctl() returns EINVAL in such a case
the nvme-cli fails.
To avoid this simply replace EINVAL with ENOTTY for the ioctls that
may be not supported by ctrl or ns device.
nvme-cli commit in question:
fa2b91da74
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I29003864bc2a5c1a8906d6d01beba3d6f4e31b0e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8531
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
gcc 11 started to complain about this condition. Ignore it.
Spotted under fedora34.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I472e5e88a30feaacc7ea96d5787544f49eaceb16
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8530
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
When the application is not set with the interrupt mode,
we should fail the rpc.
Fixes issue #2023
Change-Id: I4157f220948b7c96f474682c41ac9d78977b1c40
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8676
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a
portable way. Replace a reference to %lu to remove the assumption
about the size of a long.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I5696bcdb3add3d8b9d5ea91d9bc50b1dad1fbc95
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8685
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Undefined references to the ncurses library APIs
_nc_panelhook_sp, getmouse, ungetmouse, copywin etc. while
cross-compiling with aarch64-none-linux-gnu/10.2.1 compiler.
Hence putting the libraries in the right link order.
Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
Change-Id: If019744cf6b7bf79c072de57232bcf412d919a2b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8701
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The RPC method create_pmem_pool has been changed to bdev_pmem_create_pool.
Change-Id: I8ad1fb98d8e03240a4d982e04e9270cf90e198fc
Signed-off-by: wanghailiangx <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8708
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Now that we've deprecated the RPCs for a release, we can remove the whole
library.
Change-Id: I0f1a357fcfb3404efac39aa021928841c2f22ff1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4305
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
bdev_nvme_reset() will be used by JSON RPC and we will have to call
the callback to JSON RPC at bdev_nvme_reset_complete(). To do it
easily, register the current completion function for nvme_bdev_io
in bdev_nvme_reset_complete() into nvme_ctrlr as a generic callback.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie59551dc343215a95bfa5b22f234fc153c9db1b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8589
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>
nvme_ctrlr will be registered as io_device even when multipath is
supported. Hence while spdk_for_each_channel() is executed in reset
processing, we can get nvme_ctrlr both spdk_io_channel_iter_get_ctx()
and spdk_io_channel_iter_get_io_device(). This duplication is not
necessary. Use spdk_io_channel_iter_get_io_device() and pass NULL
to the context parameter of spdk_for_each_channel() for clarification.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifdbd0af4274081c4be7ab0735eb8bf9ae10e3493
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8588
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The current nvme_ctrlr will be registered as io_device even when
multipath is supported. Then we do not have to differentiate completion
processing between reset from bdev_io and internal reset. Hence
inline bdev_nvme_reset_io_complete() into bdev_nvme_reset_complete().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ife2c4c93d423da3953174ac860485a6e095a28bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8587
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
When we support multipath, reset_io will hold the controller currently
being reset to reset all underlying controllers sequentially.
bdev_nvme_submit_request() basically passes nvme_bdev_io to each I/O
type, and we have a convenient helper function bdev_nvme_io_complete()
which has nvme_bdev_io as a parametetr.
So revert the previous change to bring nvme_bdev_io as context
for reset processing.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I19697e8252505bab519a42889d1a88d967932f22
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8586
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reset requests from the upper layer will reset the underlying
ctrlrs of a bdev ctrlr but internal reset requests will reset only
the specified ctrlr.
To clarify such difference, rename bdev_nvme_reset() by
bdev_nvme_reset_io() and remove the underscore prefix from
_bdev_nvme_reset() and related functions.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9a2d124f6e2039bfecfdd6599827354d6c373f2e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8492
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This will reduce the size of the following patches and improve the
readability.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2ff5a10622141466d6a0352b2a6387b1412cfbf8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8641
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>
Create an nvme_bdev by adding namespace to an attached controller,
and use bdev_nvme_submit_request() in the test case test_pending_reset().
This will reduce the size of the following patches and will increase
the test coverage.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifb05952a53949e12562e9be3f6526b0f8ad57696
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8640
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>
nvme_bdev_first_ctrlr() and nvme_bdev_next_ctrlr() were not possible
to hold mutex correctly, and nvme_ctrlr_get() and nvme_ctrlr_get_by_name()
had not held mutex.
nvme_bdev_first_ctrlr() and nvme_bdev_next_ctrlr() were replaced by
nvme_ctrlr_for_each() in the last patch.
In this patch, add mutex to three helper functions, nvme_ctrlr_get(),
nvme_ctrlr_get_by_name(), and nvme_ctrlr_for_each().
Add mutex to nvme_ctrlr_create() but it will be removed in the
following patches because nvme_ctrlr will be added to not global
ctrlr list but ctrlr list per nvme_bdev_ctrlr.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ife27066d2dcac82db0616b0afeaf68e5705d7da1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8722
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>
Replace two helper functions, nvme_bdev_first_ctrlr() and
nvme_bdev_next_ctrlr() by an new helper function nvme_ctrlr_for_each().
This will make us easier to guard data structure correctly in the
following patches.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibd81286e454fd6127fd150a7d48d8381bd1b89d3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8721
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>
This object aggregates multiple I/O qpairs for their completion
operations and may be a higher layer object. However, the
aggregation is only to poll completions efficiently. Hence if we
follow the new naming rule, nvme_poll_group is better than
nvme_ctrlr_poll_group and nvme_bdev_poll_group, and rename
nvme_bdev_poll_group by nvme_poll_group.
Besides, many functions in NVMe bdev module have a naming rule,
bdev_nvme + verb + objective
Follow this rule for a few functions related with nvme_poll_group.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5e5cb6001d4a862c2121b7265cbbffe0c2109785
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8720
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>
This object is per I/O path and will be aggregated by an new upper
layer object.
Hence rename nvme_bdev_ctrlr by nvme_ctrlr. Then the following patches
will add nvme_bdev_ctrlr as a different upper layer object.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ieed634447785cc98140b3d49c52a2c753988ece7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8381
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This object is used for failover and per I/O path. A controller may
have multiple of this object. A controller is per path and may be
aggregated by an new object. Hence this object is a lower layer
object.
Based on the new naming rule, rename nvme_bdev_ctrlr_trid by
nvme_ctrlr_trid.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0d5e5812560a6947a0c25af05dea168e8745130e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8380
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This object will be aggregated by the upper layer object nvme_bdev.
Hence based on the new naming rule, rename nvme_bdev_ns by nvme_ns.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I96a70213b29fb53437acd080a0787ec9f5a6759a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8379
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
We will name the lower level objects starting with nvme_* and the
upper level objects starting with nvme_bdev_*.
This object is a channel per ctrlr and another new channel will be
added on top of this object.
Rename nvme_io_path by nvme_ctrlr_channel based on the new naming rule.
nvme_io_path will be used for a new object which is used to find an
optimal I/O path and to reset multiple ctrlrs sequentially when
multipath is supported.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1d4fa6d4625de3413d629a1ff412e00de12dfaf4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8378
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Bit 1 in the CMIC of the Identify Controller Data Structure specifies
if the NVM subsystem may have multiple controllers or not.
However, multi_host indicated a particular use case such that the NVM
subsystem is used by multiple hosts.
multi_ctrlr will be more appropriate.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0246096a5cc44721aeff3ff6f96473a2abe11964
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8719
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>
Related to #1950
In the issue, CPU idle time measured from /proc/stats make it
seem like no reactor goes idle.
If true, then it would help for debugging to check stats from reactors.
Their busy/idle time and number of threads on them.
This patch reorders the checks in interrupt test,
to first show reactor stats, then confirm with idle time from
/proc/stats.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia1770833828ef688110473e45ed5998d213059f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8223
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
For cases where cpumask for a thread was not set,
all bits were turned on for whole length of cpuset structure.
This resulted in JSON RPC reponses with way too long cpumask
for what is useful.
Now the response is limited to the applications core mask,
as that makes sense so long as number of cores cannot change.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib5cf271d3b219ba679f1abe498516796693a87dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8288
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
The round-robin logic is no longer necessary to spread
the threads around the cores. Starting from core other
than first is even counter-productive to bunching up
threads.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5fcee2bacc2d0b4af26336caf381ed954814d731
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8085
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Before this patch _find_optimal_core() returned
1) any core that could fit the thread
2) if current core was over the limit, the least busy core
3) current core if no better candidate was found
Combined with _get_next_target_core() round-robining
the first core to consider, resulted in threads being
unnecessarily spread over the cores.
This patch only places threads on lower lcore id,
or when current core is over limit then any core that can fit it.
Next patch will remove round-robin logic to always start with
lowest lcore id.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I54e373d3ca02a5633607d22978305baa1142f8bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8112
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Before this patch the idle time of a core was increased
by the amount of busy time of thread that was moved out.
No assumption was made as to how the remaining threads,
would behave during next scheduling period.
This approach is fine, as over multiple scheduling periods
we'd arrive at a point where threads could do no more work
or all cores would be busy.
Yet this requires multiple scheduling periods to sort out
the threads.
Later in the series core_load will be used to determine,
when to start moving threads out of the core. So changing
this assumption will allow for faster responses to thread load,
at cost of sometimes spreading threads too much briefly.
With this patch, we are assuming that threads remaining
on the core will do proportionally the same amount of work
during next scheduling period.
See an example illustrating the change:
Before moving Thread1
Thread1 Busy 80 Idle 20 Load 80%
Thread2 Busy 60 Idle 40 Load 60%
Core Busy 140 Idle 60 Load 70%
After moving Thread1 out (original code)
Core Busy 140-80=60 Idle 60+80=140 Load 30%
After moving Thread1 out (this patch)
Core Busy 140-80=60 Idle 60-20=40 Load 60%
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1f347983449b2fde476dab360c4df689965ca3ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8279
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: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
So far the test application was mostly used for cases with
single active thread on a core.
Setting activity as percentage of all poller operations worked
fine for those cases.
This patch changes the thread activity to mean percentage of
a set time period.
Which equals to the maximum load a thread will see when being
alone on the core.
Right now g_core_time_period is set to 100ms, and is the
maximum execution time for all threads on a core when
thread activity is set to 100%.
g_timeslice is set to 100us and is the execution time of
single thread poll.
Consider following scenario:
Before the patch
Thread1 Activity 70% Busy 70 Idle 30 Load 70%
Thread2 Activity 60% Busy 60 Idle 40 Load 60%
Core Busy 130 Idle 70 Load 65%
After the patch
Thread1 Activity 70% Busy 100 Idle 0 Load 100%
Thread2 Activity 60% Busy 100 Idle 0 Load 100%
Core Busy 200 Idle 0 Load 100%
Additionally increased period of sleeping from 1us to 100us,
to offset the time needed for additional operations
during thread poll.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I027432db1bea570dd58829eeccf7dd8bb06bf249
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7474
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
In cases when all cores are already doing too much work
to fit a thread, active threads should still be balanced
over all cores.
When current core is overloaded, place the thread
on another that is less busy.
The core limit is set to 95% to catch only ones that are
fully busy.
Decreasing that value would make spreading out the threads
move aggressive.
Changed thread load in one of the unit tests to reflect the
95% limit.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3b3bc5f7fbd22725441fa811d61446950000cc46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8113
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
We had not held mutex while removing bdev name or alias from bdev
name tree for most cases. Fix these in this patch.
spdk_bdev_unregister() already holds g_bdev_mgr.mutex when removing
name, and so we do not need to change it.
spdk_bdev_close() had not held g_bdev_mgr.mutex. What we want to lock
is only when removing name from name tree, that is, calling
bdev_name_del() in bdev_unregister_unsafe(). However, we need to
keep hierarchical lock ordering. Hence get and free g_bdev_mgr.mutex
outside of bdev->internal.mutex.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4e2c8604e27c8603725efa9bc0bee2013eccb2ac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8527
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: Jim Harris <james.r.harris@intel.com>
We had not held mutex when adding bdev name to global bdev name tree
in bdev_name_add(). Fix these in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I33813638f11da85263ec0c8849e566d247a45d43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8524
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
If the specified name already exists in the global bdev name tree,
RB_INSERT() returns a pointer to it. Hence we do not have to call
bdev_get_by_name() when using bdev_name_add().
Hence update bdev_name_add() to return -EEXIST if RB_INSERT() returns
a non-NULL pointer, and then remove the bdev_get_by_name() calls.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2d4554ef7e5286270417def64b638b803eecfca2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8573
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The complier complains:
/usr/include/bits/stdio2.h:71:10: note: ‘__builtin___snprintf_chk’
output between 4 and 19 bytes into a destination of size 7
71 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
So we change the array size from 7 to 20, so it is enough to put 19 bytes
in.
Fixes #issue 2014
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I97dfbf9707d0e275382324fa7352b7a212b2aeb5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8694
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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
This is done in order to detect if user wants to build spdk RPMs
against DPDK RPMs that might have been installed on the system.
This boils down to the following:
- if --with-dpdk, with no argument, is detected don't build
separate RPM holding DPDK libs since user in this case is
most likely interested only in packaging the SPDK so it
can coexist with separate DPDK packaging workflow
- define install and build requirements for the SPDK RPMs
to depend on dpdk-devel RPM
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I4dd587009da282a114524c74d833fd35ebc5b985
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8349
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This seems to be needed for devstack pieced together out of the
current master branch (wallaby seems to work fine as is).
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I5abf22a606c84c120e42819a5450ba82d1bc52b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8490
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
It's useful to determine what's being sent out to the server. This
may be relevant for e.g. openstack tests where currently it's hard
to see what tempest|cinder is actually doing, SPDK-wise, during the
tests.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ie32781621317dd65e3f6fbcfd5110e7dac337f04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8489
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
In the nightly test, the compiler complains:
trace.c: In function ‘_spdk_trace_record’:
00:07:12.523 trace.c:144:53: error: ‘argval’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
00:07:12.523 memcpy(&buffer->data[offset], (uint8_t *)argval + argoff,
00:07:12.523 ^
00:07:12.523 trace.c:145:36: error: ‘arglen’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
00:07:12.523 spdk_min(curlen, arglen - argoff));
And this patch is provided to fix such issue.
Fixes #issue 2034
Change-Id: I4c78d63bdc6a7d166990ae1d18a6abf183efdee1
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8709
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Chengqiang Meng <chengqiangx.meng@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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
There is no point in producing USDT probes in unit tests and it breaks
the build on some systems:
ctrlr_discovery_ut.o(.note.stapsdt+0x14): error: relocation refers to local symbol "" [102], which is defined in a discarded section
ctrlr_discovery_ut.o(.note.stapsdt+0x90): error: relocation refers to local symbol "" [108], which is defined in a discarded section
ctrlr_discovery_ut.o(.note.stapsdt+0xf8): error: relocation refers to local symbol "" [110], which is defined in a discarded section
ctrlr_discovery_ut.o(.note.stapsdt+0x15c): error: relocation refers to local symbol "" [112], which is defined in a discarded section
Fixes issue #2027.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ic6dad60df1f7dccb7f99777ebc4435c618cb505a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8699
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
If NGUID is not specified with nvmf_subsystem_add_ns json-rpc request
then it is possible to expose the same NGUID as bdev nvme module
attached.
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ie0ed7189e55a5abd6bc0904fc356d26f62b50549
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8628
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
NVMe specification defines namespace identification descriptors i.e.
EUI64, NGUID, UUID.
BDEV abstracts NVMe specific details that is why only UUID is exposed,
however if NGUID is supported it is prefered to identify namespace
with NGUID over UUID.
If NGUID is not supported by NVMe Controller then fallback to UUID.
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If51889a3664c0daa7cbe983048231793e3c502e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8627
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Now that multiple trace entries can be chained together to form a larger
argument buffer, we can reduce the size of a single entry back to 32
bytes, while still allowing the user to pass multiple parameters.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ic92a1413498df28a8561a13c0f06d895d0af2cc6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8407
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The trace app has been extended to parse chained entries when printing
arguments that exceed the size of a single trace entry.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ib9705fd08da998bea39f14eaa83305a8e9d0d5a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8406
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This patch adds the ability to chain multiple trace entries together to
extend the size of the argument buffer. This means that a tracepoint is
no longer limited to the size of a single entry, so it can have any
number of arguments, and their size is also not constrained to a single
entry.
Some limitations are still there: a tracepoint can have up to 5
arguments and strings are limited to 255 bytes. These constraints stem
from the definitions of tracepoint structures, which could be easily
modified to extend the limits if needed.
To record a tracepoint requiring larger buffer, aside from reserving
`spdk_trace_entry` structure, a series of `spdk_trace_entry_buffer`
structures are allocated too. Each of them acts as a buffer for the
arguments. To allow trace tools to treat the buffer structures
similarly to regular entries, they also have the `tpoint_id` and `tsc`
fields. The id is always assigned to `SPDK_TRACE_MAX_TPOINT_ID` to make
sure that a buffer is never mistaken for an entry, while the value of
`tsc` is always shared with the initial entry. This also provides a way
for the trace tools to verify if an entry is part of a chained buffer.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I51ceea6b6e57df95d4b8bd797f04edbc4936c180
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8405
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
It makes the code more readable. Additionally, to avoid partial updates
to an entry, the check for the number of arguments was moved before it's
filled in.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I9ba01b1bcdc29267571badaebd4a9b34ffd7f728
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8404
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
It allows us to get rid of the `next_circual_entry` variable and will
make it easier to retrieve multiple trace entries, which will be needed
in subsequent patches.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I4666c9da518c2ac0b376e10aa73d1c58cff91f13
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8403
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Since the trace files can get very large (several GBs), parsing them
using python's json module might require an unfeasible amount of memory,
as it needs to load the whole file first. The ijson [1] library
provides interfaces for parsing files iteratively, only loading a small
portion of a file at a time.
It requires the input JSON to have the tsc_rate and the definitions of
the tracepoints listed before the tracepoint entries. It's not a big
deal, as this is the way `spdk_trace` generates it, but it's worth
noting, as passing that file through something like `jq -S` might make
it unreadable to the trace script.
[1] https://pypi.org/project/ijson
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I03c0c3fb47091da615a3978b8d63edf4d876b811
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8275
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
This patch adds support for annotating qpairs. The raw pointer values
are replaced with a list of various properties of a qpair collected by
the bpftrace script.
A line like this:
`0 2856282624.000 RDMA_REQ_NEW id: r3256 qpair: 0x26ba550`
becomes (the line was only broken here):
`0 2856282502.669 RDMA_REQ_NEW id: r3256 qpair(ptr=0x26ba550, thread=2, qid=0, \
subnqn=nqn.2016-06.io.spdk:cnode1, \
hostnqn=nqn.2014-08.org.nvmexpress:uuid:729783b4ab38485d8d767b7741108a8)`
To annotate a trace, one first needs to enable and record the DTrace
probes:
```
$ scripts/bpf/trace.py --record `pidof spdk_tgt` > bpftraces
^C
```
Of course, the probe events are only recorded when the script is
executing, so in order to generate the annotations properly, it must be
started before the annotated objects are created. For instance, for
NVMeoF, it needs to be running before a connection is made.
After the BPF probes are recored, the traces can be annotated:
```
$ build/bin/spdk_trace -p `pidof spdk_tgt` -s spdk_tgt -j | \
scripts/bpf/trace.py -b bpftraces
```
For now, the script only annotates traces from the rdma module, as it's
the only one with tracpoints recording qpair pointers now, but it could
be extended to support more tracepoints.
Similarly, more objects could be annotated in the future by extending
the `SPDKObject` class and defining additional DTrace probe points.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I2225f4b1ab266b41af561b5e7d942411cd0c13c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8107
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This patch introduces definitions responsible for generating bpftrace
scripts and parsing its output. That output will be used in subsequent
patches to provide annotations for SPDK traces.
The script has a hardcoded set of probe points that are used to generate
the bpftrace script. They're also checked against the probes present in
code to sanitize them and make sure that they're in sync.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I1b8c95e1a035bd7affed2c44b056828a5da94abd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8106
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
spdk_nvme_ctrlr_free_io_qpair now always returns 0, so
update the code to account for that.
Fixes issue #2012.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I61c78459472573adbfeb28052ae3379d7880567c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8660
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Returning an error from this function is not useful - there
is nothing the caller can do with that information. So
change the return value to void. Also add ERRLOG and assert
if a transport actually returns a non-zero status, to
force the transport implementer (which must be an out-of-tree
transport) to make changes as necessary.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I402afec045265db178af821d25b99a6dbe066eab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8659
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
It is not uncommon for delete_io_qpair to fail, for
example when a controller is hot removed. So even
if SQ or CQ deletion fails, continue with freeing
resources and report success back up the stack.
There is really nothing the application can do to
account for this failing anyways.
Upcoming patches will add additional checks to
ensure failing delete_io_qpair status never gets
propagated to the caller.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iac007c1eba30f7a8c4936b3ffb6c837f28ee12ae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8658
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Fixed warnings produced by gcc-11:
compress_ut.c: In function ‘test_compress_operation’:
compress_ut.c:726:9: warning: ‘_get_mbuf_array’ accessing 32 bytes in a region of size 24 [-Wstringop-overflow=]
726 | _get_mbuf_array(exp_src_mbuf, &g_expected_src_mbufs[0], SPDK_COUNTOF(exp_src_mbuf), false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compress_ut.c:726:9: note: referencing argument 1 of type ‘struct rte_mbuf **’
compress_ut.c:430:1: note: in a call to function ‘_get_mbuf_array’
430 | _get_mbuf_array(struct rte_mbuf *mbuf_array[UT_MBUFS_PER_OP_BOUND_TEST],
| ^~~~~~~~~~~~~~~
Fixes issue #2013.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I04d0182169e61e87401f93f56993168d7aa42e43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8692
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>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Due to the recent changes for non block size multiples write I/O,
the data digest feature was degraded. If Linux iSCSI host enables
data digest and tries to detect LU from SPDK iSCSI target, data
mismatch error is detected and the connection is disconnected
unexpectedly.
The cause was that pdu->data_valid_bytes was not set for non-write
response PDUs which have a data segment.
iscsi_pdu_calc_data_digest() has been used only for non-write response
PDUs. Hence we did not need to change iscsi_pdu_calc_data_digest().
Restore the original implementation of iscsi_pdu_calc_data_digest().
Additionally, to avoid future degradation, rename the related
functions to iscsi_pdu_calc_partial_data_digest() and
iscsi_pdu_calc_partial_data_digest_done(), and add comments for
clarification.
This fix was verified by the reporter.
Fixes#2029.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6babcd1b56e79d3fa3cd26b2dfaad87a52788e63
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8635
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.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
Currently, crypto job also executes tests from the SPDK_TEST_BLOCKDEV
suite, including spdk_dd tests. The dd tests under a bare-metal system
can take up to 4 minutes alone and that brings the crypto job to the
very edge of timing out.
Since these tests are extensively covered under separate vg jobs we
won't lose any coverage by excluding them from crypto's - the basic
set of SPDK_TEST_BLOCKDEV tests would still remain as part of this
job.
Fixes: #2017
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I877e63de1e43aeb06c134fdacd6f5efbbe2a6317
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8545
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Fixes#2022
If queued aborts are present when trying to fail a ctrlr
using spdk_nvme_ctrlr_fail(), then the abort command completion
will attempt to retry one of the queued aborts.
This eventually leads to a segfault that can be avoided by not
retrying any queued aborts.
Change-Id: I897dcb8809e16af8bdd39d4381ab531e1cc29822
Signed-off-by: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8585
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The vfio-user target emulated NVMe device is treated as
PCIe NVMe SSD in the Guest VM, so when doing controller
reset or shutdown, we should abort the AERs which in the
NVMf library.
Users may switch kernel NVMe driver to SPDK NVMe driver
in the VM, without this fix, we will got "AERL exceeded"
response very frequently, because the AERs submitted by
previous driver will never be aborted in runtime.
Change-Id: I0222ed509629ccb0e98217414dd9043857105686
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8558
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>
When users remove kernel NVMe driver in the VM, after 120 seconds,
SPDK NVMf target will disconnect ADMIN queue pair due to association
timer timeout, and for vfio-user transport, the ADMIN queue pair
connection is associated with the socket connection, so when probing
the NVMe controller again, because there is no active ADMIN connection
for fabric register R/W commands, it will cause segment fault.
Here we set the association timeout value to 0 for vfio-user transport,
so that the ADMIN connection will not be disconnected when shutdown the
controller, the ADMIN queue pair will be disconnected when the socket
connection breaks.
Change-Id: I3613169229bae384405889653e50f581d30d7c07
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8557
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>
The NVMf library will set cdw0 based on specific command,
so we use it directly in vfio-user, otherwise, some NVMe
commands such as AER can't work.
Fix issue #2016.
Change-Id: Ie1a80a92c0856b61822ee51ce5d8faaaf1d463de
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8556
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Also fix one incorrect print log.
Change-Id: I3254baf4bbff4acfc0ef43f628d025931e8589ea
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8555
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: John Levon <levon@movementarian.org>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
These macros are only valid for Fabric transports.
Change-Id: Ia456eebdcdab28e81226c1b3a7211fcb41b5e481
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8554
Community-CI: Mellanox Build Bot
Reviewed-by: John Levon <levon@movementarian.org>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
spdk_bdev_register() and spdk_bdev_add_alias() had not held mutex when
adding bdev name or alias to global bdev name tree. This bug caused unexpected
error when traversing global bdev name tree.
The next patch will fix the bug. This patch is a preparation for the fix.
spdk_bdev_get_by_name() had not held mutex while traversing bdev
name tree. The major callers to spdk_bdev_get_by_name() had held mutex
when calling it. However, this was not clear.
Factor out the internal of spdk_bdev_get_by_name() into a helper
function bdev_get_by_name() and then change spdk_bdev_get_by_name()
to lock and unlock when calling bdev_get_by_name().
Then replace spdk_bdev_get_by_name() call in spdk_bdev_alias_add() and
bdev_register() by bdev_get_by_name() call.
spdk_bdev_get_by_name() call in spdk_bdev_examine() is not changed.
This is called only from JSON RPC and not related with the bug. So
we want to fix only unlocked access to global bdev name tree.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I25f07694e569eec10dba6c3c8543f6ce77412fe8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8523
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
It is better to not fail connect commands when a subsystem
is not ready. The host will not be expecting that and will
typically treat it as a catastrophic failure (i.e. it won't
retry the connect).
So instead when this situation occurs, start a poller for
the connect request. We will continue to retry processing
it until the subsystem is ready to handle it.
Fixes issue #1985.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id8835df8f0edf1e889fdd7e754e261c2a880cbb6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8571
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
It is possible for a controller to get added to the
subsystem before its admin_qpair has been assigned.
We need to account for that when traversing the subsystem's
ctrlr list when determining ns and ana_changes that need
to be reported for the ctrlr.
Found while doing stress testing with connects and
subsystem ns add/remove.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie54dc6ac202faeaeace054e6599f2dea2f30211e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8570
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
If perf is connecting to a subsystem with listeners
of different transport types (e.g. TCP and RDMA) and
the user request a specific trtype via CLI (e.g. TCP),
discovery process will call probe_cb for every transport
type. As result, probe_cb in perf will return `true`
and undesired controllers will be created and used in
IO path.
This patch adds a check for trtype and trstring to ignore
controllers that are not of a requested type.
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Id87afd03c7b38edfbbfecb5ad2239fe3e9ac9f83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8465
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
After correct trstring initialization, it is
overwritten with trstring value of the current
probe ctx. That leads to a problem when initiator
connects to a sbusystem with listeners of different
transport types (e.g. TCP and RDMA). If probe_ctx has
TCP type, than discovery probe initialized probe trid
with trtype=RDMA and trstring=TCP. As results, SPDK
creates TCP controller with trtype=RDMA and we hit
assert in nvme_tcp_qpair function.
Change-Id: I9355450c40c58fa55b016220703f6f7ae36b2571
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8464
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Pollers are supposed to return SPDK_POLLER_{BUSY,IDLE}.
Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I92bd184aaba9e3efb730b68a6024ebc9757ffd8b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8559
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
also remove out of support fedora31
Signed-off-by: wawryk <maciejx.wawryk@intel.com>
Change-Id: I2ec224a3fb3849eb62ba46a01aa74c62926174f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8461
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
If we continuous setup and teardown cuse session, It will teardown
uninitialized cuse session and cause segment fault, New function
cuse_session_create will do the session create operation and under
g_cuse_mtx to avoid this issue.
Signed-off-by: Weifeng Su <suweifeng1@huawei.com>
Change-Id: I2b32e81c0990ede00eea6d4ed3a7e44d534d4df3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8231
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Without hugepage allocation at runtime this is
no longer required. Additionally CI VMs now
have a lifespan of just 1 test run, so there's
no need to clear the cache anymore.
Saves us a few seconds on every run.
Change-Id: I12cb4095c37bd5d22d3b3fcbce4b5072118d3000
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2375
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: <tomasz.rochumski@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
check if the thread is moved to the main core after it becomes idle.
Change-Id: I3ee38ee16d755cc9dea5fa10d9f8ba42507408ff
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7853
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@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>
Use extended regexp to resolve any potential ambiguity with matching
on '('. This should fix the following failure as seen on the CI:
fatal: command line, '^SPDK_RPC_REGISTER\(': Unmatched ( or \(
Also, since errexit doesn't see failures inside the process
substitution make sure we return from the function with a proper $rc
in case git fails early on.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ia03095e9cc8cf11602dafb5bef28265abb485704
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8577
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
When entering the if case to order the list, there is bug should be
fixed. The original code does not address this.
The way this happens is when there is a connection left in the socks_with_data list
between polls and there are enough new events detected that it would exceed the
maximal number of events. A connection is left on this list between polls if it isn't
fully drained via reads by the upper layer on each poll loop.
Currently, the maximal socket event num is 32. Then we did not hit this issue
in our normal test cases. But when you use NVMe-oF tcp target to test which is
described in #2105, there are more than 32 active sockets, and it exceeeds
the maximal num of events of polling (32), so we will trigger this issue.
Fixes issue #2015
Change-Id: I9384476fdba8826f5fe55a5d2594e3f4ed3832ba
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8541
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Faced the following warnings during the compilation:
accel_perf.c:222:17: warning: ‘argval’ may be used uninitialized in this function [-Wmaybe-uninitialized]
222 | g_crc32c_seed = argval;
And this patch can be used to fix this issue.
Change-Id: I84ee542d629ff5d9e6a2873c0035bea81b376150
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8538
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Chengqiang Meng <chengqiangx.meng@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
when running spdk_tgt -m 0x33,
the core id showed from refresh_cores_tab() is:
core
0
0
4
5
The correct should be:
0
1
4
5
This patch aims to fix this display error.
Change-Id: I2ac49d73de6dcf5bf10891b2299565c19cfaa686
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7856
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
We can add one or more ctrlrs to the existing detach context even
after polling started as long as spdk_nvme_detach_poll_async()
returns -EBUSY.
By relying on this update, add a global variable g_detach_ctx and
use it to aggregate multiple detachments.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I28dcfa41daf1fe2bbe76fac80e1bc2abc24751f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8471
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This update will allow us to use spdk_nvme_detach_async() and
spdk_nvme_detach_poll_async() easier to aggregate multiple detachments.
Previously, we could do:
spdk_nvme_detach_async()
spdk_nvme_detach_async()
spdk_nvme_detach_async()
and then started doing spdk_nvme_detach_poll_async().
Hence aggregating multiple detachments is already supported.
After this patch, the following sequence is possible:
spdk_nvme_detach_async() = 0
spdk_nvme_detach_async() = 0
spdk_nvme_detach_async() = 0
spdk_nvme_detach_poll_async() = -EAGAIN
spdk_nvme_detach_async() = 0
spdk_nvme_detach_async() = 0
spdk_nvme_detach_poll_async() = -EAGAIN
spdk_nvme_detach_poll_async() = -EAGAIN
spdk_nvme_detach_poll_async() = -EAGAIN
spdk_nvme_detach_poll_async() = 0
The actual changes is to remove the variable polling_started from
struct spdk_nvme_detach_ctx because it is not necessary anymore.
Clarify this change via updating the header file and CHANGELOG.
Verify this change by unit test.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iebdf6c27c5304a2097b7084c315ccc99634ffa1e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8468
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Add a new function spdk_nvme_detach_poll() to simplify a common
use case to continue polling until all detachments complete.
Then use the function for the common use case throughout.
Besides, usage by simple_copy application was not correct, and
fix it in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic14711cd8478bf221c0fe375301e77b395b37f26
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8509
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The function comment was referring to a non-existent caller; instead, expand
with a little more detail on the path taken for new QPs.
Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I42478194f3cfc18a6ff6c434964630ac42866f1d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8534
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: Changpeng Liu <changpeng.liu@intel.com>
Updates docs for spdk_top to refrect changes made to the bottom menu
and adds a section to explain help window.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Iad3cf97ce0e06d9154b3b93e73c4c626f89a763e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6989
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Help window has proper explanations for each key used in spdk_top,
thus number of bottom menu entries can be reduced.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Id8356cbf25a63931e2499fee245547a5dec3b7a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6145
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Adds help pop-up window with descriptions for each menu entry.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Ic622d30e24ba0b071254577c31829be235cdb0fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6142
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
SC2268: Avoid x-prefix in comparisons as it no longer serves a purpose
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ica5ddfa8c39f34741c7344906abe802ff7451b1f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8505
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: <tomasz.rochumski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
SC2251: This ! is not on a condition and skips errexit.
Use && exit 1 instead, or make sure $? is checked.
This is critical since our test suites heavily depend on errexit
to catch all abnormal conditions. Replace ! foo ... with a call to
NOT() wherever possible. For the test/ocf pieces, use [[ ]] instead
to define the condition for the existance of the ocf bdev.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ied3f99b9f1dc0594e4aef64fc21e51498f19ac23
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8504
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
These are currently prone to false-positives especially in terms of
scoping. Consider the following:
foo() {
local bar=(42)
echo "${bar[*]}"
}
bar=43
foo
echo "$bar"
Some versions of shellcheck, including the latest, 0.7.2, complain
about $bar being reused as a plain string here. This is incorrect
since foo() holds its own copy of bar[@] hence the assignment which
takes place outside of it doesn't affect its content.
SC2178 can be mitigated be reversing the order of declaration:
bar=43
foo() { ... }
...
but the SC2128 still remains.
Currently, in our code majority of these warnings are coming from
false-positives due to initial source'ing which most of our test
scripts do (e.g. they fetch a function where local bar=() is used
and in the test itself $bar happens to be assigned a plain string.
This is still valid code).
To mitigate, disable these directives untill shellcheck is capable
of properly interpreting scoping when checking them.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ifbde973eae6e261d79e1c340eb28644bce5f4e45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8503
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
SC2269: This variable is assigned to itself, so the assignment does
nothing.
Since the --id check doesn't change the value of $id, remove it
completely. This simplifies the process_shm() so the --id type is
considered to a be default and $id changed only in case --pid was
explicitly requested.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: If8a4a43c6822fa1b32217a0b783cb96d0fee2644
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8502
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
SC2030: Modification of var is local (to subshell caused by pipeline)
This directive is raised since the for loop (or rather its contents)
is piped through to another process. In this context it's not harmful
since we are interested only in sending the stdout but since we operate
on variables that happen to be local to the process that handles the
loop shellcheck sees that as a potential issue. To make it happy
remove the pipe and sort pci addresses prior running the loop.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I835c5ac1da9012129c5d01d62880307f70caab1b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8501
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This is a first commit in the series addressing potential Bash issues
as discovered by the latest shellcheck release (0.7.2, shipped with
the very latest fedora33 and fedora34). The goal is to either fix,
locally or globally disable given directive(s).
SC2155: Declare and assign separately to avoid masking return values
Simplify the setting of the variable pointing at the root of the repo.
Also, keep it consistent with the rest of the scripts and declare it as
$rootdir.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I63e0b1a85ce16f7983e9ba6dd985046e8a39a650
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8500
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
On my system, the git grep for ^SPDK_RPC_REGISTER(
fails because the ( is unmatched. It seems we should
escape it, although clearly our CI systems don't seem
to require it.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6412e27e79488616743f76b2d9eac8f62b996078
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8393
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
When the property is 8 bytes but the host only requested
4, we need to mask and only return the bytes requested
by the host. Wait to do the DEBUGLOG until after
that has happened.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8f476a47e9fd07bf652fd64f3b1c17d650374167
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8506
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Interpret bare --with-dpdk opt as user's request to find installed
(provided by the distro) DPDK's libs|include files and use them during
the build.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I9da99671b95af0121194b3a6d53636b0ded71f1b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8348
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tom Nabarro <tom.nabarro@intel.com>
Reviewed-by: <tomasz.rochumski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This particular section must be defined in one place hence the
%{requirements_list} cannot be passed down later on. This requires
reordering of the .spec a bit. Most notably, all global macros are
now defined at the very beginning so then Requires section can be
build properly.
Also, use %() to expand the macro which holds the requirements as
bare "Requires: %{foo}" is not valid.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I69430f73d10204325fc825ecc392506f261ebaf1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8347
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Without it multiple threads can race and end up sharing a device
when the intention is sharing only after full round robin.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I29b854ff837d56078bc033802d3df244728a29aa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8187
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@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>
Was using "dst" in some cases and "crc_dst" in others for crc32c
related calls. Update them to always use crc_dst
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Icf200f1734c64c29881f23b02b8d12bad81b3ca0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8186
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Recent work identified race conditions having to do with the
dynamic flow control mechanism for the idxd engine. In order
to both address the issue and simplify the code a new scheme
is now in place. Essentially every DSA device will be allowed
to accomodate 8 channels and each channel will get a fixed 1/8
the number of work queue entries regardless of how many
channels there are. Assignment of channels to devices is round
robin and if/when no more channels can be accommodated the get
channel request will fail.
The performance tests also revealed another issue that was
masked before, it's a one-line so is in this patch for convenience.
In the idxd poller we limit the number of completions allowed
during one run to avoid the poller thread from starving other
threads since as operations complete on this thread they are
immediately replaced up to the limit for the channel.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I913e809a934b562feb495815a9b9c605d622285c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8171
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
In spdk_idxd_configure_chan(), if memory allocation fails in
TAILQ_FOREACH() {} code range, we will goto err_user_comp and
err_user_desc tag, in which we donot free chan->completions
and confused batch->user_completions with chan->completions.
Memleak problem and double free problem may occurs.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: I0e588a35184d97cab0ea6b6c013ca8b3342f940a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8432
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
The latest Linux NVMe host (e.g. Linux kernel 5.12) have improved
the quality of multipath but still has an issue such that ANA state
is observed to be invalid even after connection is successfully
created.
By code inspection and system test, initializing ANA state may be
delayed even after connection is successfully created.
We can insert a short sleep but it will be better to retry checking
with timeout. The created function check_ana_state() is applied to
the remaining cases.
This fixes the part of the issue #1819.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifc4eaef7c702d961caeee5bcdc9e6eab4704fc5d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8475
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
When a qpair is destroyed and the qpair is the last,
_nvmf_ctrlr_free_from_qpair() (in lib/nvmf/nvmf.c) sends two messages,
one is for _nvmf_ctrlr_destruct() and another is for
_nvmf_transport_qpair_fini().
We do not know which of two completes earlier.
_nvmf_ctrlr_destruct() frees the qpair->ctrlr in the end.
On the other hand, _nvmf_ctrlr_free_from_qpair() calls
spdk_nvmf_poll_group_remove() in the end, and spdk_nvmf_poll_group_remove()
accesses the qpair->ctrlr to free queued requests to the qpair.
Before one recent change, spdk_nvmf_poll_group_remove() had been called
before _nvmf_ctrlr_free_from_qpair() was called.
Hence extrace the operation to free queued requests from
spdk_nvmf_poll_group_remove() and inline it into _nvmf_qpair_destroy().
Fixes one showstopper error to investigate the issue reported in #1819.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I29c43ff7b289fc77a5de9c33e0266301c412e208
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8438
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
For benchmarking purposes, we may want to use a
relatively low queue depth but spread the operations
across a wider range of memory. A new -a option is
added where the user can specify an "allocate depth"
to do exactly that. In this case, more tasks (and
their associated buffers) can be allocated than we
have actual queue depth. Then when we pick a new
task for the next operation, it will use a different
memory range and avoid always using the same buffers
over and over again.
If not specified, we just allocate the same number
of tasks as the queue depth, which is the current
behavior.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I78042d905fd49d130c4a318e2c19eb11b84ff726
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8451
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
When a task completes, always put it back in the task
pool (using TAILQ_INSERT_TAIL) and then use _get_task
to get a task for the next submission. Currently this
will just allocate the task that was just put into
the TAILQ. But an upcoming patch will allocate
more tasks than we have queue depth, and this patch
will ensure all of those tasks get used evenly.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia6247a76ba60337fe6da3189e6c305f4dfb0a041
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8450
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Previously we would only assign the worker in _get_task().
But future patches will use _get_task() for each I/O,
not just during startup.
Also increment the current_queue_depth during startup
only, rather than every time _get_task() is called.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2713591d36b8353eaab8119ee230261f40857019
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8449
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Previously core load was only considered for main lcore.
Other cores were used based on cpumask only.
Once an active thread was placed on core it remained there
until idle. If _get_next_target_core() looped around,
the core might receive another active thread.
This patch makes the core load matter for placement of any thread.
As of this patch if no core can fit a thread it will remain there.
Later in the series least busy core will be used to balance
threads when every core is already busy.
Modified the functional test that depended on always selecting
consecutive core, even if 'current' one fit the bill.
Later in the series the round robin logic for core selection
is removed all together.
Fixed typo in test while here.
Note: _can_core_fit_thread() intentionally does not check
core->interrupt_mode and uses tsc. That flag is only updated
at the end of balancing right now. Meanwhile tsc is updated
one first thread moved to the core, so it is no longer
considered in interrupt mode.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I95f58c94e3f5ae8a468723d1dd6e53b0e417dcc3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8069
Reviewed-by: Maciej Szwed <maciej.szwed@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>
Community-CI: Mellanox Build Bot
Idle threads are always moved to main core, there are no
other considations. Doing it as separate first pass,
allows to have the core stats be up to date for second
pass for active threads.
Core load stats will be used later in the series to determine
optimal target core for an active thread.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6a9bc11b86e954e461f7badebf3a6e4d1718f63c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8067
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This will be needed when doing multiple passes over
all threads. See next patch.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4e9c749d69314fc268cbcb9334862392100b651e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8066
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
When picking a path to go down with a thread,
conditions unnecessarily piled up.
Instead do it either of two ways:
- move idle threads to main core
- find best core for active threads and move them there
There is no need to worry about cpumask of the thread,
since _find_optimal_core() will always return a core
within the cpumask.
If the found core is the same one as the current,
_move_thread() won't perform any action.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0f4782766c15c86b5db0c970cfc9547058845b2a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8065
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Refactors logic for finding the optimal core for a thread
to single function.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ifc2b09acb6f698640ce9602fec4f567eb32b79fa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6732
Tested-by: SPDK CI Jenkins <sys_sgci@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>
Intention was for the threads to contain a single
core in the cpu mask.
This patch fixes it.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8276cc906be53a7f8195d61c63bfa54bd2647b75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8068
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Refactor all thread moves and core stats updates to single function.
At this time in series only tsc of main core was modified and
only idle tsc of main core was used. Main core would be either
the destination core or the source core. In both cases, the idle
time for main core had to be updated.
This patch generalizes this logic to always move the execution
time from source core to destination core.
As a byproduct cores besides main core have the stats updated,
which will be useful later in the series. Once core load will
be the deciding factor for choosing a core.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I57564e8b2632f919869d74e8f10b01fb3dda3be9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6658
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
This script will use the output generated by the spdk_trace app (JSON) and
replace some of the raw pointers with the information gathered through
the DTrace probes.
For now, this only prints out the traces without doing any annotations,
so the output should be nearly identical to what's printed by
spdk_trace. The annotations will be added in subsequent patches.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I406e8d4fde9cb88b31c38aa96f11b88e607e9436
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8105
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>
Added an option, `-j`, which will cause the spdk_trace to print traces
in JSON format. The JSON output's structure is similar to the binary
SPDK trace format, i.e. tracepoint definitions are printed at the
beginning, followed by trace entries. This allows us to reduce the size
of the output a bit, as we don't need to print all tracepoint properties
for each entry.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I22fd4bee72c0d214a3444ce62d0651fabd489f5a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8104
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The application doesn't do anything useful when started with this
option, so there's no point in keeping it.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I2fca31fc7ccca11fc44a7f9a7a7b83d7634048d7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8103
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
It'll make it a bit easier to support printing traces in different
formats.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I33d454868fe7975ce81046823e3a3b9b6f587b0f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8102
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This will allow to match and compare the DTrace probes with SPDK traces
as they'll be using the same source for the timestamps.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I686c3351428c75f9b618a1a909836504fccad828
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8101
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Now that the trace library can handle multiple arguments, there's no
point in passing 0 for tracepoints that don't have any arguments. This
patch removes all such instances. It allows us to to verify that
`spdk_trace_record()` was issued with the exact number of arguments as
specified in the definition of the tracepoint.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Idbdb6f5111bd6175e145a12c1f0c095b62d744a9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8125
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Replaced calls to `spdk_trace_record_tsc(spdk_get_ticks(), ...)` with
`spdk_trace_record(...)`, which does the same thing but is more consise.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ib96e0bc0225490dadf857e1ddd2a3ecbf71e98c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8444
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Now that each tracepoint can have more than one argument, we cannot pad
the missing ones, as it would take too much space. Therefore, we put
them at the end of a line and simply skip the missing ones.
Additionally, since empty arguments are no longer padded, this patch
stops recording arguments with names consisting of an empty string
(containing just '\0').
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I5199a3219a31d6afd3178324a4f48563b84e6149
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7958
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Now that `spdk_trace_record` receives variadic arguments, we no longer
have to pass strings as uint64_t, but can pass them directly as
pointers. That also means that the recorded strings can be longer than
8B (up to 40B).
This patch changes the blobfs code to pass the filenames as strings and
gets rid of the code that converted them to uint64_t.
Additionally, the maximum length of string arguments printed by
`app/trace/trace` has been extended to 16 and they're also padded to 16
characters, to better align with other argument types.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ibe94452bf1b27eba2b15ca8608d0c3b55c2db360
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7957
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This patch allows tracepoint to record a variable number of arugments.
An additional function has been added,
`spdk_trace_register_description_ext()`, which allows the user to
register definitions for tracepoints specifying all the arugments that
they accept. Users can also call `spdk_trace_register_description()` to
register tpoints with a single argument (or none).
Currently, all of the tracepoint arguments need to be passed as
uint64_t.
The trace record functions use variable arguments and rely on tracepoint
description to know the order and the format of the arguments passed.
That means that the user needs to take care that they're always in sync.
Moreover, this patch extends the tracepoint entry size from 32B to 64B,
meaning that there are 40B that can be utilized for passing arguments,
which in turn means that there can be up to 5 arguments per tracepoint.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I9993eabb2663078052439320e6d2f6ae607a47ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7956
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: Mellanox Build Bot
Move the definition of structure spdk_io_channel into
lib/thread/thread_internal.h, so we don't have to update SO_VER for
other libraries in future when we need to change the internal details on
the structure.
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: I3d2ca7a8737972e0b33ce92e464da42c48f89dec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8189
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
If we're not a DEBUG build, vfu_setup_log() was effectively forcing a
libvfio-user logging level of LOG_ERR. Instead, let the log handler decide what
to report, so we can respect the SPDK levels.
Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Ib3ad62589f495a377885f7deabaf02b428e83d30
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8452
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This is relevant mostly for the VMs. Allocating that much memory puts
a lot of pressure on remaining pieces of the system as currently we
allocate total of 12GB memory per VM instance in the CI pool. Default of
4GB hp should be enough to cover majority of the tests hence if there's
any suite that requires more memory, setup.sh should be called there
directly with an optimal value.
This is done to make sure we can accomodate proper resources in the CI
by knowing what are the actual requirements rather than just blindly
allocating "as much as possible".
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ie958c518c7ed702b068c7fc9042183fdf41aa816
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8436
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Fix json config file using strip_size error, and
The strip_size parameter was changed to strip_size_kb in `bdev_raid_create`
rpc function in order to make it more meaningful to users.
Unify the coding style in rpc help file.
using --strip-size-kb --raid-level ... instead of --strip-size_kb.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I341af1034c7ea6716ff839bb524ee733c9e0cd34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8401
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Commit b7cc4dd added support multiple AERs, but didn't
remove the code that hardcodes aerl=0 for non-discovery
controllers. So even though the target now supports
multiple AERs, we never indicate that for non-discovery
controllers.
The spec also recommends that implementations support
a minimum of 4 AERs - so the current behavior is not
recommended.
It seems that at least on Windows (when testing with
vfio-user transport) we see the limit get exceeded
which results in ERRLOGs. Let's keep the ERRLOG there
for now, assuming that once we report we support 4
AERs that Windows won't try to send more than that.
Fixes issue #2000.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6a07a6f37aaa6e531ae2cf1e1c46da036b00785b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8488
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
We cannot control what the host may send to the target.
For example, we have empirical evidence that Windows
will send vendor-specific IDs for features and log pages
(when testing with the vfio-user target transport).
So let's change the ERRLOGs in these cases to DEBUGLOGs.
Fixes issues #2004, #2007, #2008.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8d5b92fc5e33d698af246f2f1c34f7cf51e6488a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8487
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Rename this function to better expalin what it does.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I7ab84a7cfbe488df8c1681d943f8af74458f5b32
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7389
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This patch changes how cores, threads and pollers data structures
are connected to each other. This is to ensure consistency and
avoid writes/reads from null pointers when application state
has been altered (e.g. by rescheduling thread to another core).
Fixes#1921.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: If517a7db41c512b27f86598a047df8ed27d3a274
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7769
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change type of core_num to be int instead of uin32_t
to allow assignment of -1 value for the "hanging" threads
that are not assigned to any core.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I708f9547ee4fa2cf49f6c38750e12380d76b1160
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8154
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5120baff8d2de3ef639d7b3c66d51002838c3f3c
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8439
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The RPM page was not referenced anywhere,
only accesible via list of files or direct link.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3a72add1cc2530a73f383ca0c144a551d94083e8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8015
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
1. Update with latest vfio-user specification changes.
2. The new libvfio-user will not expose dma_sg_t data structure
any more, SPDK should use pointer and allocate memory for it.
Change-Id: I619b0c0828cbe3b050c628bff4c4ce7ee840510f
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8377
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Community-CI: Mellanox Build Bot
When creating queue pairs, the original code uses a stack
queue variable and copy it to queue pair in insert_queue
function, the coming changes in libvfio-user doesn't expose
dma_sg_t data structure any more, we need to change it to
a pointer and allocate memory for it, so here we eliminate
insert_queue function as a preparation.
Change-Id: Iee94029d24bc8882ec169665e229e6cbc11564c0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8376
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
In uring_sock_create(), we loops through all the addresses available.
If something is wrong, we should close(fd) and set fd to -1, and
try the next address. Only, when one fd satisfies all conditions,
we will break the loop with the useful fd.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: I22eada5437776fe90a6b57ab42cbad6dc4b0585c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8311
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Thread is private data of spdk_io_channel, bdev should use
spdk_io_channel_get_thread() to access it. This prepares for the upcoming
change to make the definition of struct spdk_io_channel private.
Change-Id: I643c8d677e22f6d8dde2faf91bb2711d3f5d81b8
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8426
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Updates DPDK submodule to the 21.05 version.
Changes CHANGELOG to reflect this change.
Fixes#1998
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I9e65c680b9c0a6be23df22902ac1de938be60656
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8399
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
in-capsule data over 4KiB when using the Linux initiator.
This is fixed in the latest kernel. See
https://lists.infradead.org/pipermail/linux-nvme/2021-May/025641.htmlFixes#1823
Change-Id: Ie383ea774ee31ef8fe255119095b21603483c33f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8424
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The reference count of nvme_bdev_ctrlr will be used to update ANA log
page safely, and nvme_bdev_ctrlr_destruct() can be used to decrement
reference count after completing ANA log page update.
However, nvme_bdev_ctrlr_destruct() is not a good name for this case.
Furthermore, nvme_bdev_ctrlr_destruct() does not set the destruct flag
to true, and the next patch will need nvme_bdev_ctrlr_acquire().
Hence rename nvme_bdev_ctrlr_destruct() by nvme_bdev_ctrlr_release().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I285b7ab0963d0f4ea4a7a9fd29bd026d37ba8460
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8334
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Factor out registering nvme_bdev_ctrlr as io_device and populating
namespaces after creating nvme_bdev_ctrlr into a helper function.
We extract spdk_io_device_register() from nvme_bdev_ctrlr_create()
because free(NULL) is correct but spdk_io_device_unregister(NULL) is
not allowed, and hence it is very simple if we call spdk_io_device_register()
only after nvme_bdev_ctrlr is successfully created.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia4d85ccf96f3ef62e51db9d08ec606d4100c7ebd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8317
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>
Reorder a few operations and increment nvme_bdev_ctrlr->num_ns
after allocating nvme_bdev_ctrlr->namespaces[i] successfully.
Then unify the goto label for error cases to err and the err label
simply calls nvme_bdev_ctrlr_delete().
There is one noticeable change in this patch. Previously the
controller had not been detached when creating nvme_bdev_ctrlr failed.
However, after this patch, the controller will be detached when creating
nvme_bdev_ctrlr failed. This will be reasonable change.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifd8c4649036f1c5e5cd688f89727b2bd2e982735
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8316
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Consolidate populate_namespaces_cb() calls for error cases into
connect_attach_cb(). Then remove ctx parameter from
bdev_nvme_add_secondary_trid() because it is not necessary now.
The next patch will inline _nvme_bdev_ctrlr_create() into
nvme_bdev_ctrlr_create().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia94f456df160c1cc874acac4c70aad27102cb0b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8314
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
In posix_sock_create(), we loops through all the addresses available.
If something is wrong, we should close(fd) and set fd to -1, and
try the next address. Only, when one fd satisfies all conditions,
we will break the loop with the useful fd.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: Icbfc10246c92b95cacd6eb058e6e46cf8924fc4c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8310
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
In blob_load_cpl(), spdk_realloc() is called to realloc
memory of ctx->pages. If spdk_realloc() return NULL,
the ctx->pages is set to NULL without being freed,
and then a memleak problem occurs.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: Idf21b690e89beab0245ba57a5de66a4f506d54fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8308
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
If the transport returns error when polling for
completions, it gets to a uint32_t and we end up
trying to resubmit all of the requests that are
currently queued. But that's not correct - if
the transport returns an error we shouldn't be
trying to resubmit requests at all.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9198e3e2d71875cc1e46e0ac928338bb983487f3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8395
Community-CI: Mellanox Build Bot
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>
This helps ensure that not only is the bdev available,
but that it has been fully examined by any upper
layer bdev modules before returning from this
waitforbdev function.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7b69bb35199c08a4ccaa9c7ea9429d82b16ac46c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8394
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>
nvmf_ctrlr_get_log_page used req->data to store the log page result.
While the req->data only contains the first iov, if req->iovcnt is
larger than 1, the req->data may not hold the complete log page; and
even worse, the log page result may be written to invalid address and
cause memory corruption.
Change-Id: Ie6415a6bd2327419fe4b32f21ac814fd827c9e95
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7970
Community-CI: Mellanox Build Bot
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>
Currently, the SPDK "core_mask" environment option only supports setting either
"-l" or "-c". Allow applications to specify more complicated options by sniffing
for a leading "-", and passing that string through unchanged. This allows, for
example, --lcores to be used as described here:
https://doc.dpdk.org/guides/linux_gsg/linux_eal_parameters.html
Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I38cc54bfcd356f3176cde7848e592525f9231e3d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7933
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The common bdev layer will split large WRITE ZEROES ranges into
multiple children requests based on the backend device's setting,
it will try to split up to 8 children requests at a time to avoid
flood requests.
Also add UT to cover different cases.
Change-Id: Id9505fbe1c297412ef97b1f73587b22bc43f770e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7875
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Then we can enable the split for write zeroes request
in bdev layer.
Change-Id: I1341512994b061728cf8c94c0e4e7f86dbc53ce3
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7873
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This mutex is not used anywhere. After removing mutex from struct
spdk_scsi_globals, struct spdk_scsi_globals is empty. Hence then
remove struct spdk_scsi_globals. We can create struct spdk_scsi_globals
again if it becomes necessary.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I749ae43f7735a7c9383d090eae2093bb52607f17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8192
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@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>
Add three parameters, pdu_pool_size, immediate_data_pool_size, and
data_out_pool_size to the RPC iscsi_set_options to run iSCSI target
with little memory.
For some use cases, we want to keep the max number of connections,
but simultaneously we want to reduce the pool size and let I/Os wait
until resource is provided.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I74dc785310b1d985f3e338c1e13fba3a3840d113
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8191
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
In nvmf_vfio_user_listen(), fd should be closed before
set it to endpoint->fd, otherwise, the fd leakage probem
occurs.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: I3fabc65d2764926e5873475962e4362e46eb37e4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8309
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: sunshihao <sunshihao@huawei.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
In spdk_idxd_get_channel(), if chan->batch_base is allocated
faild, we should free chan before returning NULL.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: Ia652c334aead592429c1171da73d67160879686d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8301
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
In ioat_channel_start(), if spdk_vtophys(ioat->comp_update) returns
SPDK_VTOPHYS_ERROR, spdk_free is called to free ioat->comp_update,
and ioat->comp_update is not set to NULL. However, the caller
ioat_attach() will also call ioat_channel_destruct() to free
ioat->comp_update, then double-free problem occurs.
Here, we will not free ioat->comp_update in ioat_channel_start(),
ioat_channel_destruct() will do that.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: I3be19a3feec5c2188051ee67820bfd1e61de9b48
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8300
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
POSIX defines %z for printing size_t values in a portable way.
Replace a reference to %ld to remove the assumption about
the type of size_t.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I2186aa5e7072f565ea75de935e22c2c23acf1a1a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8341
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
POSIX defines PRId64/PRIu64/PRIx64 for printing 64-bit values in a
portable way. Replace a reference to %lu to remove the assumption
about the size of a long.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: Id5690eb2ad501eaacb4b266981b4dba128a7b174
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8340
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
In blob_serialize_add_page(), *pages is set to spdk_realloc(*pages).
If spdk_realloc() returns NULL, the *pages pointer will be
overridden, whose memory will leak.
Here, we introduce a new var (tmp_pages) for checking the return
value of spdk_realloc(*pages).
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: Ib2ead3f3b5d5e44688d1f0568816f483aa9e101f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8307
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
In store_last_run_counter(), history->poller_name is set to
strdup(), which may return NULL. We should deal with it.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: Ice5f27c4a7d2f9abd528b97a48ff5f92b48c8d7c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8306
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
In spdk_fs_create_file_async(), file->name is set to strdup(name).
We should check whether file->name is equal to NULL.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: I2219cc353eb4711290aee2599505f57af9088bb2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8302
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
In blobfs_fuse_start(), bfuse->bdev_name and bfuse->mountpoint
are allocated by calling strdup(), which may return NULL.
Here, we will go to err if strdup() returns NULL.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: I0599254b3436a310ddd26732312281f07a4972ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8303
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
If iscsi initialization fails (due to a memory allocation
failure for example), we may not even get to the point
where the g_iscsi global is registered as an io_device.
So then when we tear down the iscsi library using
spdk_iscsi_fini(), we need to make sure we don't
try to unregister g_iscsi if it wasn't registered.
For now, just use the g_init_thread global to make this
determination - it's set just after we register the
io_device.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic9443564ef67b9c0df0fce47a346f4608749c306
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8351
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Because we use spdk_dma_malloc, then it does not init
the the contents in the memory.
Fixes#1996
Change-Id: Ieef411f6ae5114de9f732df6096e0bb123efb7e0
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8374
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
In spdk_nvmf_subsystem_add_ns_ext(), ns->ptpl_file is set to strdup(),
which may return NULL. We should deal with it.
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Change-Id: If95102fe9d6d789b8ba9e846c4d7f4e22e48a93c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8305
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
We face the checksum error when using idxd hardware in vector mode because
we put fields of internal function in wrong union.
When use vector crc32c operation, seed and chained functions and cb's will
be used in the same time, so we should not put them in the same union.
With this patch, we can fix the crc32c computing while using
the vector mode with iov_count > 1.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I7097b47294ffd5dcac7d7a83d583321a73dc50d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8213
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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>
nbd will be closed in nbd poller function asychronously.
Unify the stop process of HARDDISC and SOFTDISC in same place.
Prepare for following patch.
Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: Ida33ff6d081e68290cfa393c0c47fe7af545958b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8036
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: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
For receving the pdu, we add the crc32c offloading by Accel framework.
Because the size of to caculate the header digest size is too small, so
we do not offload the header digest.
Change-Id: If2c827a3a4e9d19f0b6d5aa8d89b0823925bd860
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7734
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
The .get_zoned_model() callback is supposed to reject unsupported
file types. Right now, we do not reject unsupported file types.
For our specific ioengine, this isn't strictly needed, since our
ioengine unconditionally sets f->filetype to FIO_TYPE_BLOCK, and if
it fails to find a SPDK bdev that matches the --filename, it will
return an error that it couldn't find the bdev matching filename.
However, all .get_zoned_model() callbacks in the fio in-tree ioengines
have a check that a given file has a file type that is supported by
the ioengine itself. This is needed since they do not set f->filetype
themselves, but instead let fio generic code initialize f->filetype.
Since we reuse --filename to mean something in the SPDK namespace, we
are force to initialize filetype manually. So that is the only reason
why we know that the file type will be FIO_TYPE_BLOCK. Anyway, let's
try to keep our code as similar to the in-tree ioengines as possible.
The SPDK nvme ioengine already has this check, so adding it in the
SPDK bdev ioengine makes our ioengines more consistent as well.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ib5e19c738dea0f8d41641b63d0fabe055a930827
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8329
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
fio will do certain actions depending on the backing file
type of the target that it runs against.
(E.g. if the zbd code in fio detects that the backing file
is FIO_TYPE_FILE, it will emulate zones inside the regular
file.)
Both SPDK ioengines reuse the filename option to not point
to an actual path exposed by the OS, but to instead point to
a device in the SPDK namespace.
Because of this, the file type detection in fio will fail,
and will always initialize filetype to FIO_TYPE_FILE.
Therefore, the SPDK ioengines will need to initialize
f->filetype themselves.
The SPDK nvme ioengine already initializes f->filetype to
FIO_TYPE_BLOCK unconditionally. Do the same in the SPDK
bdev ioengine.
(Just like in the SPDK nvme ioengine, we also need to call
fio_file_set_size_known(), so that fio generic code does
not try to initialize f->real_file_size.)
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I37df185524ed262cb875105f989685b740b430a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8328
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The .get_zoned_model() callback is supposed to reject unsupported
file types. Right now, we only reject FIO_TYPE_PIPE.
However, in attach_cb() our ioengine unconditionally initializes
f->filetype to FIO_TYPE_BLOCK. This means that the only file type
that our ioengine supports is FIO_TYPE_BLOCK.
Therefore, fix spdk_get_zoned_model() to reject everything that
we do not support.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I115bb8ff9c8ea9f647baebc0196900681a36c410
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8327
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The define ZBD_IGNORE has been removed from upstream fio.
fio will now return an error if --zonemode=zbd is used with a
--filename that points to something that is unsupported by either
the zbd code in fio or by the ioengine itself.
ioengines are now supposed to return -EINVAL for unsupported files
(instead of returning 0 with ZBD_IGNORE for unsupported files).
This change does not need any special ifdef FIO_IOOPS_VERSION check.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I7bec0b1f5dc8f166ebf683f6f3937b2ef295a21e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8326
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
siginfo_t is a GNU extension. SPDK (and DPDK) have
direct dependencies on GNU extensions, but it's a bit
nicer if external modules don't also need to define
_GNU_SOURCE. Currently siginfo_t parameter in the
spdk_pci_error_handler is the only thing that violates
this.
Note that DPDK also supports registering sigbus handlers,
but they take the failing address as a parameter instead
of the full siginfo_t structure. Let's adopt the same
for SPDK.
While here, remove an extra semicolon that was just after
the virtio sigbus handler function signature that was
updated in this patch.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I07faf11a3ac3589c637cb2196581c102286b1e68
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8333
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
'typeof' is a GNU extension - let's use __typeof__
instead which is ISO C compliant.
Allows building SPDK header files with -std=c11 as
long as _GNU_SOURCE is also defined.
Next patch will enable omitting _GNU_SOURCE as well.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibd6c984627b553d6f87f302800abc52157fe9b1e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8332
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
The lcore id, idle time, busy time, thread count and poller count
mismatch in refresh_cores_tab() and show_core(). The index of
g_cores_history[] should be lcore id.
Change-Id: I0e95a49b2660f64c3601d5e520c6daab3aa9925b
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7855
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
At this time only main lcore frequency is changed,
depending on its load either up or down.
Exception is when at least a single busy thread is present
on non-g_main_lcore. Then the main lcore frequency is set
to the maximum possible.
This patch moves when that is determined, from 'moving'
logic to one that sets reactors to interrupt mode.
If at least one thread is present on non-g_main_lcore,
it has to be busy. Otherwise it would be placed on main lcore.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I2900598afe53fb609e1f06a60d5245f74511e1c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8050
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
This field was only used to keep track of number of threads
that will be present on a core after scheduler moves.
It was used only internally within scheduler_dynamic.
Event framework has no need to keep such field in core_info.
Instead added field in cores_stats internal to scheduler_dynamic.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3ce74d4a25eac81e58da8705a1c4553730fc1e57
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8049
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Added core_stats structure that will hold stats modified
during balancing.
Further patches will modify the values in this structure,
to for example judge how much execution time a core
has left.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib8e611e36642c4543b5cb43bc2695c613d38f0fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6657
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This patch expands spdk_scheduler_core_info with two new
fields that will contain core stats only from last scheduling
period.
This will make sure that schedulers do not have to keep track
and calculate this value on their own.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3aa7dfa6a60c1d14d95a0e684e84c2e83f0a4496
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8048
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
(a5ad0f80) lib/event: update reactor tsc_last going poll mode
Patch above updated the tsc_last at the very end of changing
interrupt mode of the reactor.
The flow for turning from interrupt mode to poll mode is
first to send an event to the target lcore, then to iterate
over all reactors updating notify_cpuset on each.
Previous patch updated the tsc_last after notify_cpuset was
updated, meanwhile the threads could already been put on it.
This patch moves it immidietly to the point of changing
the in_interrupt state.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6aea252016f4706369b8b597b765593bc6edca3b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8111
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Renamed core_busy_tsc and core_idle_tsc to better
describe that they contain particular core stats for
its whole lifetime.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6f16b2b0a162aad8fbaf18f549fc50a2372b920b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8047
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: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
There is no need to keep new_lcore field.
lcore value is enough to determine the target core.
Meanwhile _threads_reschedule() can see if the target
core matches the one from core_info.
Removed _spdk_lw_thread_set_core() since it did not
serve much purpose.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I82c7cfebf1107b4a55b2af9b891052084a788907
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8046
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: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
lw_thread->lcore was set during gather_metrics,
rather than just after the thread reschedule.
This patch just moves it to the right place.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0477830902f68102e4e4f0ffc9359bd004a8ad42
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7961
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
So far the schedulers had to calculate the diff of
current_stats - last_stats on their own to get tsc
from last scheduling period.
Renamed the current_stats to total_stats, but kept the meaning
as stats describing tsc for lifetime of a thread.
Instead change the meaning of the last_stats to describe
the tsc of only last scheduling period and change its name
to current_stats.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1a165ff7c1afe659b432c3127a351a96878d1f3d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7843
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
After reading the code in detail, I think that we should
not set pipe_has_data= true and socket_has_data at the same time.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I8f9f96b16f4f0e0c585877a0dd687a240252a7cf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8283
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>
As of latest qemu (>= 6.0.0) these can now be used together as
different BARs are used to accommodate for both.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Icf32f491fd33ef733f0d946f9b5caaeb87137d28
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8217
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Having pmr_cmdline set to nil was for some reason breaking cmb setup
as weirdly enough pmr_cmdline was ending up being set to "true".
Avoid this by having pmr_cmdline set to some value, empty string in
this case.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ib41da699dcc2f213f0b18d21be3fd32f398bae41
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8216
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This would make easier for the 3rd party tooling to adjust env for
the install_* routines.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ib5ea447bc67080f106cc43e005143bd52e91c768
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8122
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Using the CMB for SQs is not a standard use case.
Performance can vary widely when using CMB for SQs
and is typically not the configuration used for
benchmarking.
So let's change the default value here to 'false',
users can still opt-in by setting this option to
true in the spdk_nvme_ctrlr_opts structure prior
to attach.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iab746ba777b04152ffb92fea2a2bb923a0a0bf21
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8227
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Refactor data gathering functions to work per object type
and use more descriptive names.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Ie49f58b12e705615e9b92141e83306da102511c2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7388
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>
Delete free_data() function, because it is called only once
and contains only three lines of code. This is to make
spdk_top code cleaner.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I78e0edd941e8fb81ac58ea13bdc91148db0a2417
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7972
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This patch increases initial refresh rate for data gathering.
Initial refresh rate value was originally set to 1 microsecond,
which was too little for some values in tabs to refresh.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Ideeab28d3c2bbdd1133fa8706c8f2182948d7d5c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6445
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
threads_count inside show_core() function takes its value
from first core instead of the one selected by the user and
breaks core pop-up window.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I11710eaf061e7ead0fec46a0f9c47dd84d8d0209
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7588
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Changes number of allocated elements to RPC_MAX_THREADS in *thread_info[]
array inside refresh_threads_tab() to match other refresh functions.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: If62faed463f42f232693f5bdaea70a5bb248891f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7993
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
The goal of this patch is to set g_last_pollers_count
earlier than it was originally done to allocate less
memory for pollers array in refresh_pollers_tab(),
which is done in the next patch.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Id403af9b1c510abd7b6a1ac1742076590b1b37d7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7992
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Separates data gathering logic in tabs. Data is now being collected
on a separate thread.
Modified wait_init() and show_stats() to allow for thread creation
when starting spdk_top and thread join when closing.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I54a58522f31f938e2d1275c3a6f60fe8c17b0031
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6368
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
FIxes incorrect cores showing for each thread in THREADS tab.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I661eac0cd70cf6ecf308dafaa940fcae8fd513f9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8153
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
QEMU 6.0 by default uses a RedHat dev/vendor ID rather
than the Intel one that has always been used to date.
We need the NVME_QUIRK_MAXIMUM_PCI_ACCESS_WIDTH quirk
so that we do not use wide instructions to copy SQEs
to a virtualized CMB, since QEMU does not support
that.
The NVME_INTEL_QUIRK_NO_LOG_PAGES quirk is only needed
for devices with SPDK_PCI_VID_INTEL, so we do not need
to carry this one over to the new REDHAT entry.
Fixes issue #1986.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3d339b3525e7c6ceb792eb9d143e7a922c19344d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8226
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Set nvme bdev physical block size based value of NPWG and NAWUPF namespace
field.
The logic to set bdev phys_blocklen is based on how Linux nvme block driver
sets it. If the underlying nvme namespace supports NPWG/NAWUPF then bdev
phys_blocklen is set to min(npwg, nawupf)
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Change-Id: I6d254a9e730dccc230b9db4d1217bf7ab2f39b6c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8224
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The NVMe driver layer will clear this log, so we don't
need to send another one in the aer callback.
Here we change the logic to compare with previous NS
state, if the NS state is same it will fail the test.
Change-Id: I6d80cb6a5f6d5eab92b8ccac601a23c19cea4003
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8175
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
The arguments of a tracepoint are formatted when they're printed now, so
there's no need to append ":" or pad it with spaces.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I74f5568f1982dacc079e3b80bd19a9cd740b48ce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7955
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The traces record calls to spdk_(get|put)_io_channel() and saves the
reference count of the IO channel and its context. The context, instead
of an IO channel pointer, was selected because the same pointer is often
used in other traces (e.g. nvmf's poll group), so it makes it possible
to match these traces together.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I15fe982a89685d8f6e23d406d6d48f5c2d9d604b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7232
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Linking each unit test with spdk_trace allows for getting rid of lots of
stub definitions for the trace functions. The behavior stays the same,
as the trace calls result in no-op anyway because none of the unit test
apps enable tracing.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I904dac92205aadd644100af2c38989bb7979e47c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7231
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Both values should provide similar information, while the qpair can also
be matched to the traces from lib/nvmf allowing the user to track the
qpairs across these modules.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Iba9abdd3f41b93100c0403b1c90fc4549d39189e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7159
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
The traces are tracking the lifecycle of a poll group: creating it,
adding and disconnecting qpairs, and finally destroying the group.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I075b7f24d14b8fbb42bb18ddd70a668a8bace118
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7158
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Upcoming patches will add accel_fw support for batching this cmd
and then vectored versions later along with accel_perf to exercise
them.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I59f577f4365fbf063d7419cc6052e10c998b58bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8143
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Was using reserved field. Similar fix to what was done earlier
for direct submission of crc32c operation.
fixes#1972
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ie9867e72f60c7f38aa1af0273a036f34580ed4c6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8145
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
To match regular sumission prep function and allow caller to
modify both descriptor and completion structures. Also allows
for more accurate error reporting. Needed for upcoming patch to
fix batch CRC submissions.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I4b7b5b24e2f54149b513d4b23ba32f3802aff3e5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8144
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Upcoming patches will add support for accel_perf tool. Also
following will come vectored support and batch versions.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I43bd11b8efe40e6df0e2c8bd2995b9a9341f6457
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8142
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Upcoming patches will add support for the idxd engine and
the accel_perf tool. Also following will come vectored support and
batch versions.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I7223517a844525ad52ed49d65627b04c3cd9fe7c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8141
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: Aleksey Marchuk <alexeymar@mellanox.com>
Upcoming patches will add support to the accel fw, the idxd engine and
the accel_perf tool. Also following will come vectored support and
batch versions.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ie0fbd4b8da9f727426000898c0b511587adac65b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8139
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
_nbd_fini will make all NBDs into closing state.
remove _nbd_async, beasue it will call asynchronous error.
Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: Ifb873b7f079b735983bdf20c2df652be0a21919f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8035
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
And for some internal functions we need to pass controller
parameter so that we can do vtophys based on transport type.
Change-Id: I3ca4fa162ec9305f62b295ba21f7474c21edfe52
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8031
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
We need to wait to process this quirk until after we
have a valid CAP register value. Before this fix,
controllers with this quirk would get their io_queue_size
always capped at 2 (min io queue size) because CAP hadn't
actually been read yet.
Fixes: f5ba8a5e (nvme: add NVME_CTRLR_STATE_READ_CAP)
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4df87b5dfb0faa21db5b4cf6fc667d80621d1691
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8211
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
The inline function can also be used in the coming submit request
function.
Change-Id: If4a5511001e6586dbce0978298beddc537f54d8b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8173
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The PCIE and VFIOUSER both can use this function, the only difference
is VFIOUSER should use IOVA=VA to do the vtophys translation, so
here we will move the function to the common PCIe layer as the first
step.
Change-Id: I699edb67a00a2fa534072fc02ac2dd4a27aba8f4
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8030
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Each time the following file
"/sys/kernel/config/nvmet/subsystems/nqn_name/namespaces/ns_id/enable"
on the target side was changed, the SPDK initiator should receive an
async event (type: SPDK_NVME_ASYNC_EVENT_TYPE_NOTICE, info:
SPDK_NVME_ASYNC_EVENT_NS_ATTR_CHANGED).
But actually not.
Since for SPDK, when target sent the non-first event, the condition
"nvmet_aen_bit_disabled(ctrl, NVME_AEN_BIT_NS_ATTR)" that prevents
target from sending event was matched.
This commit fix this issue by issuing a get_log_page cmd for each async
event received, just as the kernel initiator does.
Fixes#1825.
Signed-off-by: tyler.sun <tyler.sun@dell.com>
Change-Id: I2973470a81893456ca12e86ac390ea1de0eed62c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7107
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
In order to avoid latency imbalances, the user can specify a cpu mask
on which the poll groups should run. This code update added data structures
to control set of CPU cores.
Change-Id: Iaf69d75da2fc6fed350d97d11027ce09e9432210
Signed-off-by: Yuri <yuriy.kirichok@hpe.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5610
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Also add scripts/bpf/nvmf.bt to enable and log these
probes.
This patch also adds a script that can generate
a bpftrace script snippet with string maps for
needed enumerations (currently nvmf_tgt_state and
spdk_nvmf_subsystem_state). This allows us to
dynamically generate this from the source code, and
can be extended for other enums we may want to
add in the future.
Thanks to Michal Berger for converting my original
gen_enums.py script into gen_enums.sh!
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Iff34a6218aef40055ac14932eea5fc00e1c8bcf5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7194
Community-CI: Mellanox Build Bot
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: Konrad Sztyber <konrad.sztyber@intel.com>
Source Windows specific definitions from common.sh. These adjust
uname to report the operating system as WSL, Msys or Cygwin and the
kernel name as Windows. They also define kill() to invoke the SIGTERM
handler before causing a hard stop with TerminateProcess.
Adjust the ordering of the 'source' commands in autotest_common.sh so
that the config definitions are available when common.sh is loaded.
Define MAKE, MAKEFLAGS and HUGEMEM for Windows.
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I130b892ee55c925a0b033bda271a29133993afb7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7101
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Alternative for the default of $HOME/rpmbuild.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Id1feb7207926b518deb87045fc17bb3d1d4c374e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8159
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This was added only for testing purposes. Right now it just
unnecessarily makes the build logs bigger and spams the stdout.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Id8ff3e1dfde955dc118e0a202897d6c6634c3995
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8194
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This reverts commit 2246a93718.
We are seeing a lot of failure on io_device lookup in the test
pool. These only showed up after this patch was merged and sees
the most likely culprit. Reverting this patch for now while we
continue debug.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2ab098319dfae3a5356eb4fe0dbf9f4af2d2eea5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8199
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
In case IFS was modified in the environment where print_backtrace()
was called, it could impact the cmd substitution used for seq'ing
the main FUNCNAME loop. Example:
========== Backtrace start: ==========
/home/vagrant/spdk_repo/spdk/test/common/autotest_common.sh: line 980: 1
2
3
4: syntax error in expression (error token is "2
3
4")
Avoid that by resetting the IFS to its default value, but also,
replace said $() with arithmetic evaluation to avoid it altogether.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I4ab098319dfae3a5356eb4fe0dbf9f4af2d2eea6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8013
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
This should be vfio-user-master now. vfio-user-v0.6
branch is obsolete.
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Iaa0b429c4de13c59e1f58fe59149367f941d42f2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8062
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
In examples/bdev/fio_plugin/fio_plugin, it will include fio.h which
defines the RB_ROOT macro. To workaround the RB_ROOT redefined error,
rename RB_ROOT to _RB_ROOT.
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: Ied4f835e4d1657ca5a0a80c13c72845c774618d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8044
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@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>
Use the macros for red black tree provided by Free BSD to speed up
io_device lookup.
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: Ib3bd382bbeb610503194e7d7bfd569f60a0d0121
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7894
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I696870dbdc9fa654e270d9fe76f12b7044455527
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7946
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The original function will disconnect queue pairs first and then free
controller memory finally, so rename it to vfio_user_destroy_ctrlr().
Change-Id: Idc235e4186bd4164be712fc9d4cda4991efc6248
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7624
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: <dongx.yi@intel.com>
The coming destroy_ctrlr() function will disconnect
queue pairs and free controller at last, so here
rename the original destroy_ctrlr() to free_ctrlr().
Change-Id: I527b2742142d60b0383be5a12391c77dd50d47a7
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7623
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
The original destroy_qp() only release the queue pair
related memory, and free_qp() will be called inside
destroy_ctrlr() function, so also remove one duplicated
line here.
Change-Id: I2a06a6704b514361685068acda4e65ed5d502f0d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7622
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>
Reviewed-by: <dongx.yi@intel.com>
The controller concept in NVMf is like a session, for any
new connection in nvmf_vfio_user_accept() with the endpoint,
we treat it as a new controller, we don't need the `ready`
field in controller to indicate the connection state, we
need the connection state in endpoint, so here just use
endpoint->ctrlr point to indicate the socket connection
is valid or not.
Change-Id: I588dbba7973cb61a1d79d81324a43e052f7dafb0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7621
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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>
Adding iov to the spdk_bdev_zcopy_start function enable spdk_bdev_zcopy_start to
be used by transport layers as the iov is owned by the transport command
Signed-off-by: matthewb <matthew.burbridge@hpe.com>
Change-Id: I6d2be7f49566048bf25b7711ada8d2fb49fea6ee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6816
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
ZCOPY emulation is not required. Modules can check if the bdev module
supports ZCOPY. If not supported the module uses the existing
READ and WRITE operations.
Signed-off-by: matthewb <matthew.burbridge@hpe.com>
Change-Id: Idac0a4d27a79a6c7e567c420e15637e826c347c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6815
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
If a reconnect fails, we restore the original
transport_failure_reason after we're done with
the failed reconnect. Save the original reason
in the qpair itself rather than a local variable,
to facilitate upcoming changes where connect will
be asynchronous.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I20ff43fc687a379aa5c930e17cf3ff8d730320be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8116
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Previously we were only checking trtype==PCIE to
determine whether a controller was fabrics. This
skipped the vfio-user case. So use the new
spdk_nvme_transport_id_is_fabrics() API instead.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I81f26853f44b1c47522ce6354e5aa4a905796bd0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8089
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Purpose: Use the new function in order to reduce duplicated code.
Change-Id: Ie848c7586575b3f0bb617d7e767cf459b43d4783
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8174
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Consider this:
foo() { echo bar >&2 ; }
set -x
foobar=$(foo 2>&1)
[[ $foobar == "bar" ]]
The above test will fail since $foobar will also include tracing
strings as stderr is where set -x redirects the output. Since in
some cases this may troublesome, replace stderr with a dedicated
fd allocated dynamically.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ia6609e4463b371c07fab42d2bd291c9e43742df5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8158
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This function was unintentionally including trace lines in its output
by playing with stderr (where -x is redirecting its output by default).
Avoid that by simply listing the devices and doing proper checks from
within the actual test.
Spotted in https://github.com/spdk/spdk/issues/1973
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: If15375aca152aaa49267c9cc51e70fd859685ea1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8156
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>
Nvme-cli submits a RESCAN IOCTL after a format command to
update any information that may have changed during the
format, such as LBA Format. This patch adds support
for RESCAN by executing nvme_ctrlr_update_namespaces to
update the controller information.
Fixes: #1964
Change-Id: I9f03e00a7f39339947ff02390f69ce806e1cfa0e
Signed-off-by: Curt Bruns <curt.e.bruns@gmail.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8146
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Rather than to rely on schedulers to access and modify
last_stats values over multiple scheduling periods, move that
operation to event framework.
Providing this to the schedulers in generic manner is better
than enforcing that each scheduler has to keep track of this
data on their own.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Icaf3b4af80d86fafaddf328fd230db9743d21ab5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7971
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This UT was not working as intended, and was covered by
scheduler implementation and direct modification
of the lw_thread stats in UT.
A single _reactor_run() iterates over all active pollers.
If at least one returns busy, so does the thread.
Thread load at the begining of UT is not 'low', but 100% busy.
To emulate loads outside of the 100% busy/idle, multiple
spdk_thread_polls need to be exectued.
As such to keep this case simple, the busy poller is removed.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I21b4c607977ed5926e0bb2743c33636cfc49f328
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8021
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
At no point in the UT thread and reactor stats
were verified. This patch makes sure that those are
checked and points out a glaring issue fixed in the
next patch.
Please note that spdk_get_ticks() and spdk_delay_us()
increase a single global value, which does not play
well with tests simulating multiple reactors.
As such each round through reactors resets the
global timer and verifies it at the end.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I27878fe35c1606ec20c548fe3bb5ede0102c8a63
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8020
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
A Security Receive command with the Security Protocol field cleared to
00h shall return information about the security protocols supported by
the controller, so we can check the TCG security protocol is supported
or not before sending it.
Fix issue #1961.
Change-Id: Id061defe45db981b276e2794fd0b59f8db70b7f4
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8083
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
We will print a notice log if the drive can support SECURITY
SEND/RECEIVE commands but not OPAL, so remove the error logs.
Change-Id: Ib26aa727ad1e703d53c387af8507b920606ea9c6
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8055
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Getting/putting the channel races with getting real IO channels
causing issues with an upcoming design. Avoid it entirely by using
the first worker channel to get the capabilties.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I750a8d59e294f4cda9f71f3327afc03e15342768
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8170
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>
Perf improvement, directs DSA to write to cache as opposed to
mem.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0d6ba157af8f1b54f8aae3b8e54a6f7754e4a9de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8169
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: Ben Walker <benjamin.walker@intel.com>
This results in a significant performance improvement when using
HW offload engines.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I54d3e39f186c9f878fcf8bed8e9242e29d1e1bf1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8162
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
We already keep a list of outstanding completion locations to
poll and were previously polling all of them. New ones are
added at the tail and we poll the oldest first from the head
so if we break when we find a slot that hasn't completed we
can get more work done while the HW finishes. This is a proven
performance improvement in limited testing.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Icc15041605586f9a31435d447d253c381c00b1f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8161
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
1. struct pxdcap.per is changed to struct pxdcap.rer
Which matches the name in the nvme spec.
2. use new API return value.
3. update specification changes.
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Change-Id: Ida421c4cffd1c65d550e83011ab123b321ea9dff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8088
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
After commit a31e319f "nvme: init discovery ctrlr using nvme_ctrlr_process_init"
SPDK will not initialize vfio-user subsystem if we didn't specify it
in the command line, so add this parameter as other transports already use it.
Change-Id: I5331459e9a88d8d94fa8b6ce693e086516b9f0bc
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8120
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
vfio-user transport `req_complete` callback will zero the internal
NVMe command and response fields, the common NVMf library should
not use them after the callback, so here we use stack variables
to save them before the `req_complete` callback.
Fix issue #1965.
Change-Id: Iff2342b6095d9496cdf112d657a0a99ce1fb5d12
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8129
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
By the next patch, nvme_io_channel will be used as an I/O channel
to a single nvme_bdev. This channel is created to a single
nvme_bdev_ctrlr and has a corresponding I/O qpair. nvme_io_path
will be a better name especially when we support multipath.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic34162f3c383676c5249396a09173329fc6febce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8095
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Previously only a single thread could submit abort commands for admin
commands and it was the thread of the corresponding controller.
When we support multipath, we need to traverse the list of controllers
to which the target admin command is submitted. Threads of controllers
may be different.
On the other hand, the previous implementation made the I/O flow very
clean, but the I/O flow will not be clean if there are many controllers
and the subsystem does not have its thread.
This patch changes the policy so that any SPDK thread can submit abort
commands for admin commands.
Then when multipath is supported, we will be able to traverse the
list of controllers simply on the current thread to abort either I/O
command or admin command.
We already are able to submit any admin command on any thread anytime
including abort command. Hence this will not cause any issue.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib69de33f2e84b03861c7d95ce060035bdb589e4b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8121
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: Mellanox Build Bot
Initialize ANA state of each namespace to optimized regardless of
whether ANA is supported or not. This will simplify the code to get
the optimal I/O path because we do not have to care if the namespace
supports ANA.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I24dfe08674af398671de6528b884e9d82409eeae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7890
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
It is unlikely that managing namespaces by nvme_bdev is complicated.
Hence we do not need the helper function nvme_bdev_to_bdev_ns().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I77b4dcd12b2f2a219f58e5bc7b7e51dd10635da4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8118
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
We can hold bdev_io directly in nvme_bdev_ctrlr as an outstanding reset.
We can put spdk_bdev_io_from_ctx(bio) into a parameter for a few
functions because it is used only once in a function.
Passing not spdk_bdev_io but nvme_bdev_io to bdev_nvme_verify_pi_error()
remove unnecessary substitution.
This is a little more efficient and simplifies the implementation.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If49ad9fa42abf27decf3afcd8c994f55faa3bc70
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8094
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The purpose is to reduce the duplicated code in nvmf and iscsi
layer.
Change-Id: I7e96f0d5bb1ba4b81378addca3cdd929056384e9
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8132
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
We map the SPDK_NVME_TRANSPORT_* values directly to
the NVMe-oF trtype values. Since PCIe isn't
Fabrics, we choose 256 which is outside of the
8-bit trtype range of values.
So we can just check if trtype >= 256 to determine
if the trid is for fabrics or not. This is
preferable to checking PCIE || VFIOUSER in case
additional non-fabrics transport types are added
in the future.
I considered taking a trid as the parameter instead,
but went this route since it is consistent with
the existing spdk_nvme_ctrlr_is_discovery().
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib62ff4d30549b2324486c81f2dce67f0f1741e9b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8077
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Connect the adminq as part of controller initialization
instead of controller construction.
We never actually 'connected' the adminq for
PCIe or vfio-user transports, since its a nop.
But their connect_qpair transport ops function
is also a nop for the adminq, so it's fine to
generically connect the adminq across all transports.
Note that we cannot read registers (cc or csts)
during controller initialization now until after
the adminq has been connected since reading fabrics
registers depends on a connected adminq. This gets
special cased for now, but eventually reading
cc and csts will need to be part of the state machine
itself to make it asynchronous.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia5566d7c549d78d24b94ea253df51e697da6237f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8079
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
According to NVMe-oF 1.1 spec, it is not a fatal error.
So according to Figure 126 in NVMe Base specification,
we should return "Transient Transport Error".
Change-Id: I601304ae2bb24508882fb1ec8c7e53ec587ab515
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7795
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
EXTERNAL_MAKE_HUGEMEM can be currently used from the external_code
suite.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I4359edc62ebdee91b261133877523c52175cb248
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8059
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Also, move ocf build outside the autobuild suite to make sure
scanbuild also picks up all the pieces.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I5f0de407cc55b1dc153cc856f68e053a54fc0682
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6841
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Change-Id: Ie46df6e4f52b59941a90eeb786954fe7d5f1d089
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8040
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This ensures the discovery ctrlr initialization is
done the same as normal ctrlrs. This will be
critical as we make the driver fully asynchronous.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I33c4fd7c82d241c30e7adb89abe79b8088c8776a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8090
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Read CAP (Capabilities) register as part of controller
initialization instead of controller construction.
For now, still read CAP in the pcie and vfio-user
controller construction, since they need the
drstd (doorbell stride) to construct the admin
queue.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I000fe880f2ec0d6de1d565c883d7ea0ae1ac2c81
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8078
Reviewed-by: Ziye Yang <ziye.yang@intel.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>
Community-CI: Mellanox Build Bot
Read VS (Version) register as part of controller
initialization instead of controller construction.
This prepares for upcoming changes to make
controller attach fully asynchronous. Since reading
fabrics registers is an asynchronous operation, it
will be easier to read the VS register as part of
controller initialization which operates as an
asynchronous state machine.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I771386dbdf5902633e0d9f91b3b20be98f26fdc3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8076
Reviewed-by: Ziye Yang <ziye.yang@intel.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>
Community-CI: Mellanox Build Bot
We're going to be adding some new states (READ_CAP
and READ_VS) in future patches, that we want to
come before the current "INIT" state.
So we will simply make "INIT" have the same
value as this new NVME_CTRLR_STATE_CHECK_EN state
for now. That means existing code won't have to
change later once we add new states that come
before CHECK_EN.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I07ca92e28ab1cd8d838cdef5c3ff36ba80a224bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8075
Reviewed-by: Ziye Yang <ziye.yang@intel.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>
Community-CI: Mellanox Build Bot
_reactor_schedule_thread() zeroes out the lw_thread on move.
To properly calculate thread stats since the move,
save them right after reschedule.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I44cc3b5907adda35b3117c2dd7268dc813d59853
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7919
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
spdk_thread keeps track of tsc from its whole lifetime,
those can be requested with spdk_thread_get_stats() at any time.
spdk_lw_thread uses stats from above and keeps track of two points in time:
- current_stats reflecting stats at the time of gather_metrics stage
- last_stats reflecting stats from previous gather_metrics stage
1)
Before this patch current_stats were duplicated in snapshot_stats.
There is no need for that so now they are removed.
2)
Removed _spdk_lw_thread_get_current_stats() since it would be copying
current_stats to current_stats, thus not perform any action.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5e5d4039cd0f7cc10ba150a3d915b90ec96589d7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7842
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Whenever an event executes, it might change the currently
set thread or reset it to NULL.
To prevent it from affecting other events, set the current
thread each time an event executes.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6f1e7f8b7acab25353b4782058e87a9e01aab2c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8045
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>
_get_thread_load() is function used to determine
the load of a thread based on relation of busy/idle tsc
from previous scheduling period.
In order to avoid division by 0 calculating the percentage,
we can simply exit early determining that thread was not
doing any work.
Having this check here will make sure that no matter
the changes in event framework, scheduler dynamic will work.
Removed the place that updated last_stats if they weren't
yet updated at least once (first scheduling period iteration).
In this case after change to _get_thread_load() will be the same,
as only the latest iteration will be used to calculate thread load.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I75f0f12f024675f2473a26e30596d6eb28093d46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7917
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
I used the nasm with unstable version while compiling SPDK with ISA-L.
And when running nasm -v, it shows:
NASM version 2.16rc0 compiled on May 27 2021
So the version checking in the script is not correct,
it will get "2.16rc0", but not "2.16". Then the version comparison
will fail.
This patch will fix such issue when users use an unstable nasm and it
also works for the stable version.
Change-Id: I950458f681642d7e1f5fc69acf2ced2e1342c9cf
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8082
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
If the -Z option has been specified bdevperf checks that the bdev
module supports ZCOPY.
Signed-off-by: matthewb <matthew.burbridge@hpe.com>
Change-Id: I0bebad68090f48a1b1250afe4bc4c752c2061bfb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7352
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
In struct spdk_nvmf_poll_group_stat, there are statistics of cumulative IO and
admin queue pair counts. But current qpair counts are not reflected. Use
this patch to add current admin and io qpair counts for a poll group.
Signed-off-by: Rui Chang <rui.chang@arm.com>
Change-Id: I7d40aed8b3fb09f9d34e5b5232380d162b97882b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7969
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Eugene Kochetov <evgeniik@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Block device product name is same among same type
of the block devices, while Guest VM may use this
value to generate UUID, so here we change it to
block device name instead.
Change-Id: I58c5fb271a6a436c15520616c2065eee9c37300a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7996
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This is to make sure we sync devices for both nvmf and iscsi
protocols.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ifec6cc2d240a5b22b73e9f4087ae328568e4fe4a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8042
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: Ziye Yang <ziye.yang@intel.com>
Now, vfu_setup_region() must specify the region fd offset (which is always zero
in our case).
Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I10795d848a4c73ee9e1e78ea63776074401c4b17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8022
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Following Linux NVMe host, add UUID and EUI64 comparison to
bdev_nvme_compare_ns().
Besides, previously the return value of memcmp() had been used as
the return value of bdev_nvme_compare_ns() and this was wrong.
Fix it in this patch together.
Add unit test cases for bdev_nvme_compare_ns().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I069ab53e77741d6348b847d51e84a9338e2f3787
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7755
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Use the macros for red black tree provided by Free BSD to speed up bdev
name lookup in spdk_bdev_get_by_name().
In the bdev_multi_allocation test, we can get 3x ~ 5x speed up when
creating multiple bdevs for various bdev nums.
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: I49a2fbcccf06d4c36cbd445ce59e0b0dd4ada31d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7837
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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>
Community-CI: Mellanox Build Bot
Clean up spdk_bdev_register() to facilitate the upcoming patch which
uses RB tree to speed up bdev name lookup.
* move TAILQ_INSERT from bdev_start() into bdev_init();
* rename bdev_init() to bdev_register() and rename bdev_start_finished()
to bdev_register_finished();
* inline bdev_start() into spdk_bdev_register().
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: Idbfc800472bc8c6f9b615046e082772e9f6026e3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8043
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Purpose: Let the users know the current available registered Rados
cluster and the related info.
Change-Id: I115c129ae6e4b0372579aad168fd88f8be136357
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7990
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
When doing debug build on ARM Neoverse-N1 platform, if gcc version is
lower than 8.4.0, we may met following errors:
/tmp/cc24qua1.s: Assembler messages:
/tmp/cc24qua1.s:53: Error: selected processor does not support `casp x0,x1,x2,x3,[x4]'
/tmp/cc24qua1.s:85: Error: selected processor does not support `caspa x0,x1,x2,x3,[x4]'
/tmp/cc24qua1.s:117: Error: selected processor does not support `caspl x0,x1,x2,x3,[x4]'
/tmp/cc24qua1.s:149: Error: selected processor does not support `caspal x0,x1,x2,x3,[x4]'
The change also fix the problem by pass armv8.2-a+crypto as target architecture.
Signed-off-by: Rui Chang <rui.chang@arm.com>
Change-Id: I2053b9440e06873066480d63e471802df2e69d4e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7949
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
512 and 1024 number of hugpages is not a sensible value in case 1G
hugepages are in use. Instead of setting fixed number of hugepages,
determine it safely based on the default size and allocate 1GB for
node0, 2GB for node1 (if present).
Fixes: #1954
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I850ba877332527a68ec4ddf7408fcc183835cda6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8012
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>
nvmf_get_ana_log_page used req->data to store the log page result.
While the req->data only contains the first iov, if req->iovcnt is
larger than 1, the req->data may not hold the complete log page; and
even worse, the log page result may be written to invalid address and
cause memory corruption.
The following patch will fix the same issue for other commands in
nvmf_ctrlr_get_log_page.
Fix#1946
Signed-off-by: Jiewei Ke <jiewei@smartx.com>
Change-Id: I495f3be05c82be5cd53609772c655c8924b9179f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7923
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Since we will reuse send_pdu for other purpose in the next
patch.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Iee5166131b70a25bc13aaa847bfc9066231f31a9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8028
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
For nvme/tcp connection, we use the synced manner
if the qpair is not fully connected. Thus without
the check, we will stuck here. And this patch
fixes this issue.
Change-Id: I72815bf5b4c0b31c4866bc1b9034b0e42b81d3f1
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8025
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
Loading subsystems and restoring state from a JSON config file is useful
outside of the SPDK application framework, so move it to lib/init.
Change-Id: I7dd3ceace2e7b1b28eef83c91ce6a4eedc85740e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6645
Reviewed-by: Tom Nabarro <tom.nabarro@outlook.com>
Reviewed-by: Jim Harris <james.r.harris@intel.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>
Community-CI: Mellanox Build Bot
I'm not sure whether this should go into lib/init or to lib/rpc
directly, but I've chosen lib/init for now.
This is to support applications that want to run the SPDK JSON
RPC server, but aren't using the SPDK application framework.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I79ca39aa0ca6e1a3a6905b0bf73e6cc99b086e55
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6644
Reviewed-by: Tom Nabarro <tom.nabarro@outlook.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
The functions to initialize the SPDK subsystems or tear them down
was previously an internal-only API. Make it public for use by
applications that aren't leverage SPDK's application framework.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I2ebfd020e6fa4c1947fa1c1a2ac509ce9b0242f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6643
Reviewed-by: Tom Nabarro <tom.nabarro@outlook.com>
Reviewed-by: Jim Harris <james.r.harris@intel.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>
Community-CI: Mellanox Build Bot
There were some functions in the internal header that can be entirely
private to the init library. Move them over.
Also, remove the support for including the header from a C++ file
because these headers are internal to SPDK which is pure C.
Change-Id: Ic4323b2b8664e70106a57b3ca8acbc7c2efe621d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6642
Reviewed-by: Tom Nabarro <tom.nabarro@outlook.com>
Reviewed-by: Jim Harris <james.r.harris@intel.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>
Community-CI: Mellanox Build Bot
The header size is very small, which does not have too much value to
offload such calculation by hardware.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Iaa82f39312df7eef3282325a33677ea41ab735ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8011
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The P5800X drive will report the following error when getting Error Recovery
feature, according to the specification we should pass valid nsid.
nvme_qpair.c: 238:nvme_admin_qpair_print_command: *NOTICE*: GET FEATURES ERROR_RECOVERY cid:23 cdw10:00000005 PRP1 0x0 PRP2 0x0
nvme_qpair.c: 452:spdk_nvme_print_completion: *NOTICE*: INVALID NAMESPACE OR FORMAT (00/0b) qid:0 cid:23 cdw0:0 sqhd:000f p:1 m:0 dnr:1
get_feature(0x05) failed
Fix issue #1955
Change-Id: I30ce60cddcddbf78e57a8c172a2056a82ac72802
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8009
Reviewed-by: Chengqiang Meng <chengqiangx.meng@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
This will help us to add get namespace features later.
Change-Id: I7e809cd9e3bcb3874ce141183b9c4ee82543616c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8008
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
open_blobids holds bit array of currently open blobs,
this is a way for quicker determination than iterating
over all blobs. See patch introducing it:
(30ee8137)blob: Add a bitmask for quickly checking which blobs are open
That patch added resizes of this bit array to bs init
and bs recovery path (not shut down cleanly).
But that patch skipped over bs load from a clean shutdown.
This resulted in blob open having multiple blob pointers that
target the same blob id.
Fixes#1937
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3c42a63d168d1f5b013b449f010c5b207936045b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7998
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: Ziye Yang <ziye.yang@intel.com>
Community-CI: Mellanox Build Bot
Before this patch idle_tsc was sum of all idle tsc of all
threads running on a reactor.
There are cases when no threads are present on the reactor,
and _reactor_run() spins doing nothing.
To give more accurate representation of the reactors state,
the idle_tsc now adds time spent doing idle spinning.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If797b2a03507d17b07367d56d5f6c40cefbbbd49
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7900
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Disabling interrupt mode on reactor now updates the tsc_last
to current time. So any further tsc caulations will not account
for the time when reactor was in interrupt mode.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I56fb8a738eea60ee5de3b49d586f7cb228b54510
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7901
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
tsc_last value is used to update thread stats
during _reactor_run(). See:
spdk_thread_poll(thread, 0, reactor->tsc_last);
If no threads were present on the reactor,
this value got outdated and resulted in
adding time reactor spent with no threads to
stats of the first thread placed on that reactor.
This patch fixes thread stats by making sure
that argument to spdk_thread_poll() is up to date.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0c35fdba1b63b6ee19a5a2b34751090839cb2438
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7845
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This patch does not change the UT in functional way.
Added accounting of last_tsc and spdk_get_ticks() similar
to the real application.
First the reactor_run() [not _reactor_run()] starts
reactor->tsc_last to current time. UT now set it at the start
and never touch it again directly.
Second the spdk_get_ticks() is updated to the elapsed time
to simulate flow of time, and make sure that its further
usage is up to date to the current time.
Fixed typo in test case description for test_reactor_stats.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iaa2eb00fa3bffc2f21f1692da0259f1d023086b8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7904
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Mellanox Build Bot
This is useful for applications even if they elect not to use the SPDK
event framework.
This doesn't shift everything in one go - just the subsystem
initialization logic. Configuration file loading also needs to move
in a separate patch later.
Change-Id: Id419df1045442d416650ed90e5ee78adfdd623d7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6641
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Upon running abidiff to get the list of impacted interfaces it seems
to exit with != 0 status. This triggers errexit causing the script
to exit in the middle of processing the lib files so we don't get
the full picture of all potentially impacted files. Ignore the
exit status in this case and allow the loop to go through all the
.sos.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I7edc5122161b0927fdd9a918571419f32fd46dac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7815
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
In case the addr argument was not an existing unix socket file the rpc
client would consider it to be an actual ip address. As a result
connect() would be called with improper set of arguments. This could
cause the rpc.py to block for undesired amount of time until connect()
finally decided to return (seen on some fedora33 builds).
This was affecting sh wrapper functions like waitforlisten() which
use rpc.py to determine if given app is ready to be talk to blocking
execution of the tests for way too long then intendent.
To avoid such a scenario determine the format of the address and use
routines proper for given address family.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Iaac701d72c772629fa7c6478ff4781b0c5d485d5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7777
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
There's already a new LTS release in place, hence these workarounds
are not needed anymore.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Idf597a5cf8da18d75f2630d59a277d4545fadc0f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7987
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
In latest 13.0 release of freebsd sed is not accepting \s anymore,
hence it needs to be replaced. Note that only parts of the repo
which are touched by freebsd during the tests are updated.
Details https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253893
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I217208511af8f98e7033f8f24a343b5ca9c48825
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7986
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This package is not available under latest 13.0 release, however,
the /etc/os-release we are looking for is already installed there.
For older versions, and in case this package is missing, we still
can determine that we are running under freebsd as part of the
fallback check to uname().
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I6a04eb66392d91899a4b55d4eb508bef140e924a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7985
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Get all of the hot stuff to the first cache line.
* Shrink the xfer enum to one byte (it only has 3 values).
* Pull out the dif enabled flag form the dif structure so it
can be access separately
* Rearrange the members
Change-Id: Id4a2fe90a49c055a4672642faac0028671ebfae9
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7827
Community-CI: Broadcom CI
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: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Checked the definition of strncmp. If substring s1
is found in strnmp(s1, s2, len), then it will return 0.
For the len value, it is better to use strcmp. Otherwise,
if s1=cluster1, s2=cluster & len=strlen(s2),
strncmp will return 0. But they are two different strings. For
cluster names, they are different.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I15a06184d834cd1567b329d0322cd6bdea6fee4b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7991
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
(cd83ea4a)thread: Add SPDK internal APIs spdk_thread_get_first/next_active/timed/paused_poller()
Patch above by mistake iterates over active_pollers list
for function that lists paused pollers.
Fixes#1947
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1b69d942675f34f5f046ec46feacc8d81d89f015
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7952
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: <dongx.yi@intel.com>
When blob persist starts, there can already be multiple
of such requests pending. It is possible to complete
a set of persists at once, if blob state after their
execution would be the same. This is the case when
persists are already pending when a particular persist
request is started.
This patch implements such mechanism by introducing
persists_to_complete queue, containing entries that
were previously queued up before starting the current
persist request. If there are any entries in this queue,
further requests are put into pending_persists.
When first request from persists_to_complete is persisted,
completions are issued for all requests on that queue at once.
If at that point there are any new entries on pending_persists,
all of them are put into persists_to_complete. Persist process is started
again with the first request from that queue.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I10063e55d6f821b1863de016d3148da6a719a422
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7643
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>
Together with options to disable examples, tests and unit-tests
this will enable us to build SPDK without linking any executables.
This is useful for packaging SPDK in applications - especially
those using own ENV.
Fixes#1877
Signed-off-by: Rajarshi Chowdhury <rajarshi.chowdhury@oracle.com>
Change-Id: I0467ec497d2abe2fad40cdb4ba723a240bee46d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7462
Community-CI: Broadcom CI
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The openstack tests require to have one interface available under
specific ip, 10.0.2.15. This ip is a first lease VM receives from
the user network which is preconfigured in libvirt environment.
Use this instead of defining completely separate network which
by the very default will serve its own DHCP service as well. This
may result in a cosmetic issues (e.g. two ips, static one and
dynamic one on the interface) of having inconsistent config on the
VM depending on how the net device is configured by the underlying
distribution.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ie3da26eebcfb0de668166c4a0120c65aec104540
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7441
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>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
This is done as part of the work to fix currently existing CI job
using this particular test suite.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Id5e9e8a814fb3025f192871650b8aa317f2de910
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7440
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Moves "mvwhline(core_win, 6, 1, ACS_HLINE, CORE_WIN_WIDTH - 2);"
upwards to increase readability by placing this call in order
(to print the line in 6th row after data in 5th row is done printing)
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: Icec340231090aeb57c600f52b3c687dbc78cc4b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7959
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Changes where store_last_run_function() is called. Before this patch
this function was used inside refresh_pollers_tab() and it overwrote
last run counters of each poller before show_poller() function had a
chance to use them. As a result poller details window was always
showing zeroes instead of actual difference in run count between each
application loop.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I96219698f7f0b51b94ffe8c0d6bf40f73cbf8a82
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7951
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Moves store_last_run_counter() function to allow next patch to
call it earlier in the code, inside get_data() function.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I1e37080ec86309bbf33442fa12cbe9dc575cc864
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7950
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Deletes g_pollers_history and store_pollers_last_stats() function
to simplify spdk_top code.
Adds last_run_counter to show_poller() function to get last state
of poller's run counter for comparision with current value and
display in pop-up window.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I236fbcac31e67a617d37ba15888aeb30e3763e01
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7925
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Deletes g_thread_history and g_thread_info to use g_threads_stats
across the whole application to simplify spdk_top code.
Now instead of separate struct, fields last_busy and last_idle are
being used.
get_data() function now uses local structure to get RPC data instead
of filling global one. This has been changed so that g_threads_stats
keeps its last_busy and last_idle fields unchanged.
free_rpc_threads_stats has been moved down so that in future patches,
when multithreading is implemented, there is no need to lock
g_threads_stats during RPC call.
Changes places of allocation/deallocation of g_threads_stats, since
we want to save last_idle and last_busy fields instead of zeroing them
out each application loop.
Changes show_thread() function to use local copy of threads array
instead of pointers to global struct. This is for the convenience
in the future patches implementing multithreading to avoid the need
to lock the global struct for details display.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I0dc87eac4c1b89fa16f14f5387d94ee176dfdf43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7587
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Move part of code with get_data(), refresh_tab() and free_data()
inside show_stats() upwards to make sure data structures are
up to date for pop-up details windows.
Delete get_data(), free_data() calls from show_thread(), show_poller()
and show_core functions.
Add data freeing right before rpc calls inside get_data() to let
pop-up details windows to use updated data before freeing it.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I0d78eb7a48b0cdff4284815afc1a214b0effd7fc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7953
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
This function is going to be needed in get_data() in the next patch.
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I9368b4567a92ca20d830c3475e3120ee691b84c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7947
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Was using reserved field in CRC to store the final address of where
to put the result, this not legal. Move to the completion record
and slightly re-arrange the struct to keep it at 96 bytes.
Refacorted the IO prep function so the caller can udpate both the
descriptor and completion records instead of continuing to add
parameters to the prep function for opcodes that need something
unique in the completion record. This also allowed for a minor
fix where the prep function was returning NULL when vtophys failed
which would have indicated busy as opposed to failire. Now we can
proprely fail that path.
fixes#1929
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic23bc7b68bdd5757c30b7963880677f423368e20
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7735
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>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: If6ce4d3f7bc58855ba61b352be71dff404c87720
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6819
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Patches stopped applying cleanly because of dpdk/dpdk changes:
7d5cfaa7508de0fd248b05effbf421a98317006a
4ad4b20a79052d9c8062b64eaf0170c16a333ff8
Needed to rebase custom patches.
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I1006f7f6ba21a3cee5b607cfc44adedb4c1d5830
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7903
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
nvmf_subsystem_add_listener() in rpc/nvmf was modified
by 64debe0453 and the
change was not reflected in performance scripts.
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I7bb8c39ab225421964e37883aa7b0f824e8df683
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7978
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
SYS_LIBS var is used to generate Lib.private section of
spdk_syslibs.pc
lack of pthread can result in linking issue when spdk's *.pc are used
please note that usage of -lpthread and -pthread is not consisent
within system wide pc files
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I2dd327371d5621ea12f1e2f7abdfe6b7aa6602eb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7253
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Szulik <maciej.szulik@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
This script counts how many times each syscall
is called by the SPDK application.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ife5efccee73e407e1d819293786f2acdfa317f78
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7713
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This script captures a histogram of the returned values
from the readv syscall. It can be useful for analyzing
the efficiency of our sock/posix implementation.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I910eb2e81e3416855cda7a3854982cd02476850e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7712
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This script tracks spdk_thread_send_msg and
spdk_for_each_channel calls. It also uses usym
to get the name of the function pointer passed to
these calls.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia0cf5b50538bd26a3e15e35cbab765fe3c327c73
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7711
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This script simplifies execution of bpftrace scripts
for SPDK application analysis. The script should be
invoked as:
scripts/bpftrace.sh `pidof spdk_tgt` script.bt
where 'script.bt' is the name of the bpftrace script
you wish to execute.
The script helps simplify the following:
1) replace __EXE__ markers in the bpftrace script with
the full path of the spdk executable (required for
usdt probes); it uses /proc/<pid>/exe to get the
full path
2) replace __PID__ markers in the bpftrace script with
the PID of the spdk process under analysis - this
allows for doing things like filtering system call
counts for just the SPDK process
3) invoke bpftrace with the -p <pid> option
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib271f26efe4ba326d951a7b30f61b22be755dda7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7710
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
For now, we will keep this disabled by default,
enable with --with-usdt option to the configure
script. Long-term we will want to enable this by
default, and only disable via configure.
Modules can include spdk_internal/usdt.h and add
probes such as:
SPDK_DTRACE_PROBE2(probe_name, ptr, val);
When USDT is enabled, these will translate to
DTRACE_PROBE2(spdk, probe_name, ptr, val). When
USDT is disabled, these will translate to nothing.
Later patches will add some probe points to the
nvmf target, some bpftrace scripts, and instructions
for how to successfully capture data with these
probe points and scripts.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id168e2c800fa5522815a175026386319014cfdaa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7173
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
bdev_nvme_compare_ns() will be used to check if all namespaces of
one nvme_bdev are identical, and this is the convenient location.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3fa6072c1cceec53268e53bf398fa1e8f069035e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7169
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This will be helpful to simplify the following patches.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I66939f2953c66582bfcb79cfe187814280e89680
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7324
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
When multipath is supported, a subsystem has multiple controllers and
bdev_nvme_create_cb() will create a channel per nvme_bdev_ctrlr by
iterating the list of nvme_bdev_ctrlrs, and will hold lock while
doing it.
If the code to access nvme_bdev_ctrlr is put in a place, the
following patches will be easier and smaller.
Hence reorder the code of bdev_nvme_create_cb() as a preparation.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2f2e66758c3374c678cc44bbb0116f4611c6753a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7754
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Factor out spdk_bdev_io_complete() calls into a helper function
bdev_nvme_io_complete().
This simplifies the code a little and will be helpful for the following
patches to retry I/Os. These are not performance critical but we
specify inline explicitly by following bdev_nvme_io_complete_nvme_status().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9fafacfd8571c037c3bc34382c251317309da334
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7497
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Factor out spdk_bdev_io_complete_nvme_status() calls into a helper
function bdev_nvme_io_complete_nvme_status().
This simplifies the code a little and will be helpful for the following
patches to retry I/Os. Specify inline explicitly to avoid performance
regression.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1ac451486e1c6a4401842490411e986fac191d59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7484
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
bdev_nvme_submit_request() calls spdk_bdev_io_complete() with failed
if bdev_nvme_reset() returns negated rc other than -ENOMEM.
So let bdev_nvme_submit_request() process it.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2569634ff0f18fb433cb685de1366e43abf5a9fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7524
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This is called only in a place. Inlining this into bdev_nvme_submit_request()
will simplify the following patches by removing unnecessary cast.
Besides, use -ENXIO if I/O path is not found. This will be better than -1.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib6c38f89db1c1e651941aad18d31dd0891f380de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7871
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
I/Os will be retried if spdk_bdev_io_complete() is called with
SPDK_BDEV_IO_STATUS_FAILED. To do it easier, consolidate exit paths
of bdev_nvme_get_buf_cb().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0a67b88a107d616c5a5b0fc5ff963ad1402f5651
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7487
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
Update libvfio-user to the current version, updating the client for the relevant
changes.
Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Ic64ace08ac0c7e9676f04f8d1f47a9c0388a2652
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7983
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
Support ACRE (Advanced Command Retry Enable) feature. Currently set
all crdt to 0 and only select crdt[0] (crd=1) when the IO has any
error.
Signed-off-by: Peng Yu <yupeng0921@gmail.com>
Change-Id: If7bc30f91f5b2d0839002dead17188a4b3a52d5d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7885
Community-CI: Broadcom CI
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: Ben Walker <benjamin.walker@intel.com>
That prevents nvmf target from starting to destroy poll
groups prematurely
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I833f6198ef0e3083fdadf70dd3b62844c905aceb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7881
Community-CI: Broadcom CI
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>
This patch changes the order of IDENTIFY_ACTIVE_NS and CONSTRUCT_NS
controller states. It is required to further improve memory management
for namespaces by allocating memory only for active ones.
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: Ie540442b1bd9e897afcbaa4319c139109dd0c515
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6503
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Previous implementation allocated memory just once at the beginning of
active NS list retrieval procedure. It allocated memory for maximum
possible number of active namespaces, i.e. 'cdata.nn'.
This patch changes allocation logic. One page is allocated at the
beginning. If more is needed, reallocation is done with one more
page.
This patch also removes SPDK_MALLOC_DMA flag from allocation since we
don't do RDMA directly into this buffer.
Signed-off-by: Evgeniy Kochetov <evgeniik@nvidia.com>
Change-Id: Iaa80c4d70c54daaf71dcbf755c63a01a1d83b772
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6502
Community-CI: Broadcom CI
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>
Declare single trap from nvmftestinit() instead overriding main trap
depending on the use-case (veth vs phy).
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I23c66fc5728510d06eee9837843f0734b2d03dcf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7850
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Additionally, include the first resolved alias of the module.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I71c7c15398ea36f3dea3340f5c98568ff6b6a68a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7848
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
As these tests were limited to SPDK_TEST_BLOCKBDEV the spdk_dd was
not being tested against liburing. Make sure it is the case now.
Also, fail the test if spdk_dd is not linked to liburing in case
where such tests were requested.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I5704577530048ed4775ea15a6cdacf23380b5072
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7653
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Added 'rate_iops' FIO option to the performance scripts.
This will be used during tests where limiting factor
has to be artifically imposed, rather than come from
the target/initiator system or enviroment.
One case for this are scheduler tests, to limit
each connection and balance the threads accordingly.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I10bb09be9205a8b7ba90b36cd4e0bf922b0ecbc3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7840
Community-CI: Broadcom CI
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>
Move from a single flag indicating that the socket is on the
pending_events list to two flags - pipe_has_data and socket_has_data. If
either flag is true, the socket is on the socks_with_data list.
This is necessary to track enough state to avoid doing extra recv()
system calls.
Change-Id: I65e5701dccb0a5bade19f266f164f26706b110d4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7595
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Use the macros for red black tree provided by Free BSD to manage
timed pollers efficiently.
Allow RB_INSERT() to insert elements with duplicated keys by changing
the compare function to return 1 if two keys are equal.
Check the return code of RB_INSERT() because this is the first use case
for RB tree macros in SPDK. We did the same for RB_REMOVE() by
adding another temporary variable but we remove it from this patch
because it is not so important compared with RB_INSERT().
When a timed poller is inserted, update the cache for the closest (leftmost)
timed poller only if the tree was empty before or the closest (leftmost)
timed poller was actually changed. We do not have to use RB_MIN()
because all duplicated entries are inserted on the right side.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibe253ca8eecc10116548b5eedbcdba8fb961b88d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7722
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
We already hold thehe next closest timed poller in tmp. Inlining
poller_remove_timer() into thread_poll() makes the cache update
more efficient.
After this patch, poller_remove_timer() is called only in a single case
and the case is compiled only on Linux. So add it inside of a temporary
block is much clearner. However it will be used by spdk_poller_reschedule()
in the end of this patch series. So keep
the current position.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2e6858223713eed84f5d70b160da6122edae6d03
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7910
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This enable us to optimize the cache update when RB tree is supported.
Call poller_remove_timer() after getting the next element because
as TAILQ_FOREACH_SAFE() and RB_FOREACH_SAFE() do, TAILQ_NEXT() may
not be valid after the current element is removed.
Previously, the patch had called poller_remove_timer() before getting
the next element. However, thanks to the nice testing, this bug was
found.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I18afb4412115dc1696cc568610cbe3dc618c2357
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7909
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This change is a preparation to first dequeue the closest timed poller
always when it is expired. Previously the poller_remove_timer() calls
were not consistent and difficult to follow.
spdk_poller_pause() sets poller to PAUSING even when it in RUNNING
and move it to PAUSED after returning from its context.
If spdk_poller_pause() and spdk_poller_resume() are called while poller
runs, it is moved to WAITING. Hence thread_execute_poller() and
thread_execute_timed_poller() ignore such cases.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I29340613a2ec0c3529d0886f4d81c0a0fdf8745d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7908
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Add a little complex test cases to avoid regression by the following
patches.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1c94edd913f0a582868e355be085a1faf9bd1a94
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7913
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
libvfio-user now uses cmake3 if available, so check for that as well as cmake.
Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Idf7a496d0d3fec21140afeede56337e53ad475fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7954
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This API was removed previously, so remove remaining
references in map file and unit tests.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iba2f6a5f5ba590d3996dc133c8181083a33d7405
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7963
Community-CI: Mellanox Build Bot
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>
There are logs like below in existing CI tests:
"nvmf_subsystem_create is deprecated, use nvmf_create_subsystem instead."
Change-Id: Id257ab13120a71ad3d0ae7ed22ed6e0a4f005cf0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7670
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Revise bdev_rbd_create rpc call to add an optional
parameter "--cluster-name", e.g., "--cluster-name Rados".
Then users can create a rbd bdev with registered
Rados Cluster. This shared strategy can be used to
remove the thread creation overhead if multiple rbds
are connected to the same Ceph cluster.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ide5800f8fc6b2074805272a59731c666fe279b9a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7584
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This eliminates the thread-local seed variable. But
we're also adding zipf distributions in an upcoming
patch, and we'll want to store that context in the
ns_entry rather than making it thread local.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Icc4a8b7bdbc9cd35525f2d35c9ada8e3ec0ba76c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7791
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>
Community-CI: Mellanox Build Bot
Currently this will only support a global setting
that must be set on the command line. We can make
it per-job later, but will require adding float
support to the conf library.
Tested by running bdevperf with some malloc
bdevs. Performance with low theta values (i.e. 0.2)
are almost identical to random w/o zipf. But
higher zipf values start to show better performance,
because we get more hits on data that is already
in the CPU cache.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I55b1587cdec2919973b488786d361042ca210606
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7790
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>
Community-CI: Mellanox Build Bot
This eliminates the thread-local seed variable. But
we're also adding zipf distributions in an upcoming
patch, and we'll want to store that context in the
job rather than making it thread local.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If8079682e7d3da8f989ee6b880edc8d3fcb4fdd8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7789
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>
Community-CI: Mellanox Build Bot
This app shows how to use the SPDK zipf functionality,
and uses spdk_histogram to show the cumulative
distributions.
Usage:
build/examples/zipf 1.2 100000000 10000
This will generate 10000 random numbers from a range
[0, 100000000) using zipf theta parameter = 1.2.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I36486399b54f57e771cbc5530ae4905afca60b64
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7780
Community-CI: Broadcom CI
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>
__builtin_clzll(0) is technically undefined, but
returns 64 on all currently tested architectures,
which is the desired value. So remove the
assert(datapoint != 0) and instead just set clz=64
for that case so that we aren't depending on
undefined behavior.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibb05f756e07f20a250d24f0c5adecc4dfbc5a056
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7939
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>
Community-CI: Mellanox Build Bot
Some Linux distributions reports kernel panic using the same
command line as we suggested in this document, that's because
number of IO queues is bigger than number of CPUs, so here
just fix it and added a comment on the number of IO queues
parameter.
See issues #1295 and #1737.
Change-Id: Ie1e18d5e83a80523f71d98b8761d13a8d57cc9ab
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7852
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
In json_config test, when there are multiple nvme disks, we see errors like:
ERROR: expected event 'bdev_register:Nvme0n1p1' but got 'bdev_register:Nvme1n1' (whole event line: bdev_register:Nvme1n1:1)
The reason is when there are multiple nvme disks in the system, when
start nvmf_tgt, it will register all the disks in bdev, so there would
be multiple bdev_register events for these disks before we run
create_bdev_subsystem_config. So in create_bdev_subsystem_config we need
add these events to expected events list first.
Signed-off-by: Rui Chang <rui.chang@arm.com>
Change-Id: Ice8f5464975e68ae63fec891ef18dbc7590a9ab5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7858
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Currently we allocate buffers perf each SGL descriptor.
That can lead to a problem when we use NVME bdev with
PRP controller and length of the 1st SGL descriptor is
not multiple of block size, i.e. the initiator may send
PRP1 (which is SGL[0]) which end address is page aligned
while start address is not aligned. This is allowed by
the spec. But when we read such a data to a local buffer,
start of the buffer is page aligned when its end is not.
That violates PRP requirements and we can't handle such
request. However if we use contig buffer to write both
PRP1 and PRP2 (SGL[0] and SGL[1]) then we won't meet
this problem.
Some existing unit tests were updated, 1 new was added.
Fixes github issue #1853
Change-Id: Ib2d56112b7b25e235d17bbc6df8dce4dc556e12d
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7259
Community-CI: Broadcom CI
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>
The definition is that:
max active zones >= max open zones.
The REAME.md incorrectly writes max active twice.
Fix this typo in the README.md.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I4b7d24d7bd1efcbe1608d3ee04d8900f83857f5e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7912
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Implement support for the recently added fio .get_max_open_zones callback.
If our ioengine does not implement this callback, fio will always result
in an error when using --zonemode=zbd, on platforms which does not have a
fio oslib implementation for this callback, e.g. FreeBSD.
On Linux, fio will by default try to parse sysfs, which will of course not
work on SPDK.
Implement this callback so that our ioengine will be able to provide fio
with the proper max open zones limit.
This will ensure that fio will be able to fetch the proper max open zones
limit, regardless of OS.
While our SPDK nvme ioengine did overwrite the max_open_zones option if it
was set to zero, this is a bit of a hack. The new fio callback is the
proper way to inform fio about the max open zones limit, so that fio itself
can have access to the actual device limit.
(Just overwriting the requested max_open_zones option will not allow fio
to know if the requested max_open_zones option exceeds the device limit.)
Remove the SPDK specific hack and update our README.md accordingly.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I532a0fa065b9e215ee6229b9100135e5403f198e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7898
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Move get_fio_qpair() out of ifdef and reuse it in spdk_fio_queue(),
since the code is next to identical.
The only difference is that get_fio_qpair() returns NULL if qpair->ns
is not set.
Since we know that get_fio_qpair() returns NULL if qpair>ns is not set,
we can also remove the equivalent check in spdk_fio_queue().
Also use ns pointer instead of qpair->ns pointer in two other places
in spdk_fio_queue().
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ie647a814ff0b7a6f2bb81cbc9d7e95537fbe5256
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7897
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Implement support for the recently added fio .get_max_open_zones callback.
If our ioengine does not implement this callback, fio will always result
in an error when using --zonemode=zbd, on platforms which does not have a
fio oslib implementation for this callback, e.g. FreeBSD.
On Linux, fio will by default try to parse sysfs, which will of course not
work on SPDK.
Implement this callback so that our ioengine will be able to provide fio
with the proper max open zones limit.
This will ensure that fio will be able to fetch the proper max open zones
limit, regardless of OS.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ia9c281290e11e4204d270ba4090edb73212ce20f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7896
Community-CI: Broadcom CI
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: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
zipf is a power law probability distribution. When
applied to performance testing of block devices, it
will select blocks over the full range of LBAs, but
will more frequently select lower-numbered LBAs.
The theta parameter governs the distribution - higher
values of theta will concentrate the distribution on
a smaller number of LBAs.
Note that fio supports zipf, so adding it to SPDK
will enable our perf tools (bdevperf, nvme-perf) to
provide similar functionality.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7df129c9d61996a2070188c6cd9f1fde631ac208
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7779
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
We cannot solely rely on the qpair_ctx->count reaching
0, because qpairs that are in process of being
disconnected will immediately invoke the qpair
disconnect cb.
Instead, we need to wait until the poll group
no longer has any qpairs remaining on the subsystem.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I977747d367d14a4bf60f66a1147b3d75679e5179
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7870
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
When running scheduler/interrupt.sh, the core_freq displayed from
refresh_cores_tab() and show_core() mismatch for lcore 1. We should
get core_freq from cores[] array which has been qsort.
Change-Id: I4eba9b023cfa00700ab82c679d42fff22b85be46
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7854
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This patch is used to add two rpc calls:
bdev_rbd_register_cluster
bdev_rbd_unregister_cluster
Then in the next patch, rbd bdev constructed on the same cluster object
can share the common Rados_t structure in order to remove the thread creation
overhead and improve the scalability.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I898cc4ffabb8e6721ba5bef099cbf948c64d2c98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7551
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
Copy Free BSD's sys/sys/tree.h to SPDK's include/spdk/tree.h by
changing as little as possible.
A few changes are as follows:
- Remove a few lines located at the head of the file.
- Change the name of ifdef from _SYS_TREE_H_ to SPDK_TREE_H.
- Change the type __uintptr_t to uintptr_t.
- Change the attribute __unused to __attribute__((unused))
- Insert a space to the front and the end of CONSTCOND.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I26488d8fd61f80508cf7d96fbeb6007f12080a01
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7721
Tested-by: SPDK CI Jenkins <sys_sgci@intel.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>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
When we introduce RB tree, getting the closest timed poller is not
O(1) but O(log N). To mitigate such delay, cache the closest timed
poller into thread, and update the cache when its content is changed.
Add unit test cases for this change. They will also clarify the current
behavior of spdk_poller_unregister() and spdk_poller_pause() for
timed pollers.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibb98a54c261859a3210034038d3953e5c93ef8aa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7720
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
Current `test -f` never succeeds, because `/dev/cpu/0/msr` is a
character device file.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Iaa28f04866ab24140668ad43351a37f0ccccef65
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7166
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Requests that still reside on retry queue should be
submitted to disk before shutdown.
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Change-Id: Id2d020fcaef6443d01cfd8628686e9b0f34a1cfa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6771
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This patch reduces admount of changes in the next patch,
no functional changes added.
The next patch will add usage of contig IO buffers for
multi SGL payload. To support it we need to pass an
offset to fill_wr_sgl function. Also in the current
version we assume that for 1 iteration we fill 1 IO
buffer, the next patch will change it and we'll need
to swtich to the next IO buffer in special case. That
can't be done easily if we use fill_wr_sge function
Change-Id: Iee8209634637697f700f8fa9fe61ead156b6d622
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7258
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The header is small enough that it likely won't ever make sense
to offload the digest computation.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ib6baa201a76d769d978f498f5c65985d5ab06ffd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7766
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The bdev layer can do the unmap split now based on the backend
device. For now we only use 1 unmap descriptor, the bdev layer
can help us to do the split.
Fix issue #1888
Change-Id: Iaf740bafd4f2bb4b108133fee2aafd2f53da9b2b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7519
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Also free scsi_task data structure for the asynchronous
libiscsi APIs.
Change-Id: I0bff706bfb795e51a4b10c357913ae66493dca5d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7513
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
There is an error when collecting the cpu usage data in perf.c.
The cpu busy data exceeds 100% when running perf tool with mutli-cores.
Signed-off-by: Jaylyn Ren <jaylyn.ren@arm.com>
Change-Id: I9a00f86a51fb52e115c37199aee6f849b235d868
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7431
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
process_core() indicates error where any core files are found. If
that happens to be the case when the trap is called, the remaining
pieces won't be executed due to errexit being enabled. With that
in mind, simply ignore process_core's exit status.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I83527468bd1b41bf92b9ee8189a4c425be914552
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6990
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
If no ioat devices are registered, we should return.
Change-Id: I03435946716ef653b230515da32e8ccbdf5a188a
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7834
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>
The coredump info can be viewed in
https://github.com/spdk/spdk/issues/1935
We face this issue because no idxd device is attached, but we
still register the hw engine by spdk_accel_hw_engine_register
in accel_engine_idxd_init.
Fixes#1935
Change-Id: I537f06e2b2923faac7f2cd6a28903e77f1f6aaa5
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7832
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>
We should use `ns->registrants` to count the number of registered
controllers(REGCTL) for Reservation Report command, as `subsystem->ctrlrs`
only list current active sessions(controllers).
Also use the output data buffer directly so that we don't need to calloc/free
during the process of Reservation Report command.
Fix#1928
Change-Id: I650224b751a08416208b8a504b82debff31e92fd
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7822
Community-CI: Broadcom CI
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: wanghailiang <hailiangx.e.wang@intel.com>
Some systems may have page size other than 4096 bytes
Change-Id: Id56bb1566fff480edbe1a293121fc7a68c74252a
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7820
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
This is needed before we can start looking up attributes
of the block subsystem under sysfs. In some occasions they
may simply not exist yet at a given time.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I4261d17e92e02acec31b8affaccd0aa11c2b851e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7863
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This makes use of newly added spdk_bdev_wait_for_examine(),
to only respond to RPC when bdev was fully examined.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If82cd913ab6653e8cc0da38c639b384b6c0303ba
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5482
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Runtime RPCs such as bdev creation has no chance to wait for
bdev examination to finish. To handle this case commit below
introduced bdev_wait_for_examine RPC, and built it into all newly
saved JSON configurations:
(e57bb1af)lib/bdev: build bdev_wait_for_examine into subsystem
Some tests generate the configuration by hand, rather than
saving it from an existing application.
This patch embeds this RPC into the test configs.
Fixes#1760
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I79f998d722a2d19aa98b78333c64dbd2c1151444
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7861
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Function initiator_json_config is never called with
additional arguments that would fill up the subsystem
JSON.
Handling for the comma is removed.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6ce5648a0eac29cb0f45d210696edf7977dfe89d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7860
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This makes use of newly added spdk_bdev_wait_for_examine(),
to only respond to RPC when bdev was fully examined.
Fixes#1760
Issue above was triggered in DD tests where application
finished before the examine had a chance to fully finish.
This patch addresses it by making sure that nvme attach
RPC waits for completion of the examine.
Later patch in series adds the bdev_wait_for_examine RPC
to multiple static configuration files. Making sure similar
issues do no occur for bdev modules which do not have changes
in their RPC as here.
The issue does not occur for JSON configs generated from apps,
see patch:
(e57bb1af)lib/bdev: build bdev_wait_for_examine into subsystem
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie3ca2933af97a40ae01ecc3eefe2161d2d34c602
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5483
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Use spdk_thread_get_last_tsc() and spdk_thread_get_stats() in
unit tests for reactor. As a result, we can change one inclusion
from spdk_internal/thread.h to spdk/thread.h.
This is the same effort as spdk_poller.
The following patches will move the definition of struct spdk_thread and
enum spdk_thread_state from include/spdk_internal/thread.h to
lib/thread/thread.c.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I24d4a52ecf885b6e7db749616ee1f95b82574dc5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7801
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This is the same effort as spdk_poller.
The following patches will move the definition of struct spdk_thread and
enum spdk_thread_state from include/spdk_internal/thread.h to
lib/thread/thread.c.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7f7bdfdd7a7b1b834d16d79638a4fd2d63e9daf6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7800
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Most accesses to the struct spdk_poller outside lib/thread have been
done via functions but a few direct accesses remain.
Change these to indirect accesses by addinng a few helper functions
as SPDK internal APIs.
Add spdk_poller_get_name() to get the name of the poller.
Remove spdk_poller_state_str() and add spdk_poller_get_state_str().
Exposing enum spdk_poller_state outside lib/thread is not really
necessary.
This removal requires us to update major SO version.
Add spdk_poller_get_period_ticks() to get the period ticks of the
poller.
Add struct spdk_poller_stats and spdk_poller_get_stats() to get
the stats of the poller.
The next patch will move the definition of struct spdk_poller and
enum spdk_poller_state from include/spdk_internal/thread.h to
lib/thread/thread.c.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id597dae074a15fcd8af09fd9d416a22ce2f403c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7798
Community-CI: Broadcom CI
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
It is better if the internal of poller or thread is not accessed
outside lib/thread.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I80d488a111fd9a67a0da32d1e63695ce5a6bcb4c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7776
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The following patches will update the cache to the closest timed
poller when removing it from the list. To do it easier, factor out
the operation to remove a timed poller from timed_pollers list into
a helper function.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I25016d86117b240a2651d1f06e23bea0342211f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7719
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
When we introduce red black tree for timed pollers, we will not use
RB_FOREACH_SAFE() but cache the leftmost (smallest) node and iterate
from it via RB_NEXT() instead.
As another preparation, separate TAILQ_FOREACH_SAFE() into TAILQ_FIRST()
and TAILQ_NEXT().
The next patch will cache the first element to thread and refer it
first.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie03c387b5b3a055c668e7b439a5eb05ed77eaa81
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7718
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
It will be sufficiently reasonable to check if the caller thread is valid
even if spdk_poller_pause() or spdk_poller_resume() does nothing.
Besides, let's write all possibles states explicitly in switch - cases.
This refactoring clarifies the logic and makes the following patches easier.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1163eff388fe741d6b6924f474a82b1aa7d18acb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7665
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Change if - else if - else blocks of thread_execute_poller() and
thread_execute_timed_poller() to switch - cases blocks and specify
possible states explicitly in these switch - cases blocks.
The code will be simpler and clarified, and then the following patches
will be easier.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2e283894f5d69e1bd67466ae070c5b8bb9014616
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7664
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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
There will be no issue even if time poller is unregistered or paused
after it is expired. The iteration is stopped anyway after the head poller
is found not to be expired.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2b394b8b517930a6630dd31f59fcaea12eb80572
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7662
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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The following patches will introduce red black tree to manage
timed pollers efficiently but it will be based on macros available only
in lib/thread/thread.c. Hence then it will be difficult to expose the
internal of timed pollers tree outside the file. On the other hand,
we do not want to include JSON into the file.
Hence add a few SPDK internal APIs to iterate pollers list transparently.
For spdk_thread_get_next_active/timed/pause_poller(), we omit the parameter
thread and get it internally from poller->thread even if the names include
the term "thread". This will be slightly cleaner.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I000801a2e4dc42fa79801a2fd6f2b06e1b769c88
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7717
Community-CI: Broadcom CI
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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Add {min,max}_cntlid to spdk_nvmf_subsystem, defaulting to 1 and
0xFFEF, respectively, and add nvmf_subsystem_set_cntlid_range() to
allow the controller range to be configured in the range [min_cntlid,
max_cntlid].
Also add {min,max}_cntlid to the nvmf_create_subsystem RPC to allow
the controller ID range to be specified when creating an nvmf
subsystem.
Signed-off-by: Jonathan Teh <jonathan.teh@mayadata.io>
Change-Id: I936db3bb0c9a38569063a6fd3c11df262dfad776
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7322
Community-CI: Broadcom CI
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: Aleksey Marchuk <alexeymar@mellanox.com>
Change zone append print to SPDK_DEBUGLOG() instead of an unconditional
print. Since we already print a warning when zone append isn't supported,
there is no need to unconditionally print something for the success case.
This also matches the behavior of the SPDK fio bdev plugin.
Also improve the zone append help text to match the SPDK fio bdev plugin.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ic7604ea4bdf17e0cddfe2638f3db7944ee652474
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7804
Community-CI: Broadcom CI
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>
Update README.md with information specific to zoned block devices.
Additionally, add an example config that can be used to test the
--zonemode=zbd fio option using the virtual zoned block device
SPDK module on top of a Malloc bdev.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I68bbc07ab70ad1ce8e38abc91dd8c15c49f90656
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7758
Community-CI: Broadcom CI
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: Jim Harris <james.r.harris@intel.com>
Add support for using zone append commands instead of write command,
for bdevs that support it.
In the SPDK NVMe plugin, the target struct (called spdk_fio_qpair) is
allocated in .setup(), but the qpair is first created in .open_file.
In the SPDK bdev plugin, the target struct (called spdk_fio_target)
is allocated in spdk_fio_bdev_open(). This function also creates the
I/O channel. (spdk_fio_bdev_open() is called by .init().)
Since certain options has to be saved in the struct spdk_fio_target,
which is allocated quite late, we cannot reuse spdk_fio_handle_options(),
which has to be called before threads are created.
Therefore, we unfortunately need another option parsing function in the
SPDK bdev plugin.
If we fail to handle any of the per target options, the target is never
added to the list of targets, and is freed immediately.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Iacd1924c8f0d3d324f2a6f1b0a54f86459f39d31
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7727
Community-CI: Broadcom CI
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>
This patch is design to use the single Rados Cluster
object in the same RBD if there are multiple I/O channels created.
And this patch will be prepared for the next patch to share
the same cluster among different RBD bdevs.
Change-Id: I1509f29a9c1088da308a3f88980f0c7fed26476f
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7601
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
When testing vfio-user target with QEMU, there is following error log:
ctrlr.c:2143:31: runtime error: member access within misaligned address 0x7fe526a73d98 for type 'struct spdk_nvme_ctrlr_data', which requires 16 byte alignment
For vfio-user transport, the memory buffer is allocated by clients, so
we can't assume the memory is always aligned, just remove the
aligned attribute.
Change-Id: Ie80530415013ebd7bcb8cdabca97d7d0e34857f9
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7797
Community-CI: Broadcom CI
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
It's only for tcp now, but the transport here is rdma. So there is no need to assert.
Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: Ieffaac9d31a8f9c79a0d9fd226d74268986b7a77
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7823
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
With https://review.spdk.io/gerrit/c/spdk/spdk/+/7684 there are no
more active uses of it in the test suites.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: If6f8227b68f1fe1a4038cec2b6107eac82ad44de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7698
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
fio.py simply wraps itself around fio and doesn't do anything that
would require python to be in use. Having it in a simple bash form
makes it easier to integrate it with autotest's common sh tooling
and to debug any potential issues with the underlying tests.
This also fixes#1919 by making sure only proper nvme devices are
selected for the nvmf targets.
Fixes: #1919.
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I111d00df3c7b2517f431cae865e258a665c2ecb3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7684
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This update will stop using `struct vfio_device_info` from
<linux/vfio.h>.
Fix issue #1922.
Change-Id: Ia7ad745db8d7ed8f5248ca13e3188ebd540b0e40
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7831
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Look for 'vfio_user' in SPDK_LIB_FILES to determine
whether the target application actually needs to be
rebuilt.
Fixes issue #1930.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If3f699c91972e20dc4520e25c655ed11f6843be0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7826
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
At least on some Ubuntu distributions, default
vfio-user install puts libs in usr/local/lib instead
of usr/local/lib64.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib312d8ca9b4ce9e858a9a9e76525fc8afd48ced5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7825
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: <dongx.yi@intel.com>
This helps in next patch in series where multiple
completions will be executing.
UT is adjusted since one additional poll is required.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id72377ddef91e40cdbc2bdea6f33c23309b0ca3d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7642
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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>
During snapshot creation the original blob becomes
a thin provisioned blob that will only the diff of data after
snapshot creation.
Despite the comment in the UT the number of polls before issuing
blob write was hitting blob BEFORE it swapped with new one.
Issuing I/O during this period shall check for io freeze
before checking cluster allocation.
Otherwise bs_io_unit_is_allocated() hits assert for thin
provisioned blob. This is because cluster map of blob is
empty, but properties have not been updated yet.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I742e1a50b14d456ae1e6de13b5111caec3e8322c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7641
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Also for the purpose to avoid a burst of children unmap request,
we will submit at most up to 8 children request at a time for
a big UNMAP command.
Change-Id: Iaf0f18b07517e0a8f84dc04e8c93b95691a1a43c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7518
Community-CI: Broadcom CI
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>
Both UNMAP and R/W will share the some logic to process the submission,
so combine them to a helper function first.
Change-Id: Ia4f234c6a58f078d3e9f88cacaf1510a17f07acc
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7606
Community-CI: Broadcom CI
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>
The changes in the nvmf_create_transport show
how this command parser work. And there have
two benefit for this changed.
1. Simplify the definition of rpc method. no need add
so many args anymore. Also it retains its original
functions, so we can also check the input args.
2. Make the rpc call more versatile, for example.
when user extend the subparsers(add new args
into subparsers), they can pass some private args
into the rpc method by command parser.
Signed-off-by: jiaqizho <jiaqi.zhou@intel.com>
Change-Id: Iaf916e3454f23715cf9216794bb80c65b2b4603f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6652
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Addressing review comment from 6cebe9d0.
Minor optimisation to cache result of spdk_u32log2() into local variable
instead of calling it multiple times.
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Change-Id: I2fd6afd1e3ee461662de3f9d278958664224e106
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7806
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: sunshihao <sunshihao@huawei.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
ctrlr_discovery.c doesn't need this #include.
Including it causes bdev_module.h types to be
emitted to the debug symbols at least with some
compilers, which can result in unwanted abidiff
errors.
The unit tests do need it, so just include it
there instead.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iad28f9778ce08b11b52325658583ae9032295f3a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7813
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
The library itself doesn't need it. The unit tests
do need it, so just include it there.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9aefd303ae12928d45141029436509f185105bd3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7812
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This module only requires the spdk_bdev_module
APIs, so use this #define to avoid having to
bump so version when spdk_bdev is modified.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I292c38e60cbf21d0d5a6583cb2a2b097c524f3d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7811
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
- Use consistent cache line size units in KiB across RPC calls
and config files. The KiB units are much easier to use then
the bytes units and are more human readable.
- Properly handle cache start when cache line size is incorrect.
- Add test to check if cache line size value is reported correctly.
- Add cache line size info to JSON RPC documentation.
Fixes#1858
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: Iec9ede85f6884b64605d2d112947b3f175cbd938
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7614
Community-CI: Broadcom CI
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>
Older version wasn't providing full support for PMR setup, this one
does.
Rewrite get-pmr such that it supports CMB/PMR sizes greater than 4GB.
Also, since CMB and PMR can coexist in newer versions of qemu try to
detect both under single device.
E.g.:
nvme0:0000:00:04.0:64-bit:prefetchable:0x700000000:0x707ffffff:0x08000000:cmb
nvme0:0000:00:04.0:64-bit:prefetchable:0x400000000:0x5ffffffff:0x200000000:pmr
nvme1:0000:00:05.0:64-bit:prefetchable:0x708000000:0x70fffffff:0x08000000:cmb
nvme2:0000:00:06.0:64-bit:prefetchable:0x600000000:0x6ffffffff:0x100000000:cmb
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ic159f5c12d3ef39db77617f7d64f825356c255a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7539
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Recently, checked the spdk_io_device_unregister function,
it will have deferred free behaviour, and the io_device
will possibly be freed in put_io_channel function.
And this means that it is not safe to directly call:
spdk_io_device_unregister (io_device, NULL);
Then free io_device relately resource.
Because there will be channel to use the resources associated
with io_device. Then we will possibly cause a NULL pointer access.
I found this issue in bdev rbd module, and I think that the
same issue could happen in other modules. So it is better to put the
resource free function as the call back function.
Change-Id: Icc1f86d72b672faefb3b7f416030b818a8cf45ce
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7646
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Passing cpu_mask hints that match only single core were
usefull to prevent any accidents when doing round-robin
in case of 'static' scheduler.
In practice this is not required in case of 'static' scheduler,
the threads will be spread out over all reactors anyway.
This hinders other schedulers which try to respect the cpu_mask
hints, as they would not move the thread to any reactor.
Preventing bunching up less used threads on single reactor.
Drawback of this patch is that poll group names will not match
the cores they are on.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5fb308362dd045228ea9fcca24f988388854c054
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7028
Community-CI: Broadcom CI
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: <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Normally, unless RTE_MALLOC_DEBUG is set, DPDK zeroes memory in rte_free().
If RTE_MALLOC_DEBUG rte_free() fills memory with poison pattern, but then
(and only then) the memory is zeroed in rte_zmalloc_socket(). Relying on
this behavior allows to avoid unnecessary memset() in spdk_zmalloc() path.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
Change-Id: If3efa4dd22f1568949c3fb529b604bd597ceb32f
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6975
Community-CI: Broadcom CI
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
We did not find this issue, because we always use seed = 0 to test.
Definitely, we need to assign the seed value.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I6bec1b6d61480cdd7c9e27578dcaf5de2f65cf44
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7716
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This patch fixes missing free of qpair_mask when a listener error
occurs in ctrlr_create.
Signed-off-by: Jonas Pfefferle <pepperjo@japf.ch>
Change-Id: I09162b86d8ac73bf9fc2006a08dcc0a955f222b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7818
Community-CI: Broadcom CI
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>
Not just one with extra available info. Also remove the extra
read of the error register, not required.
fixes: #1927
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I28badb45d8cc8d16b72f7019bd2a2044998fc402
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7729
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Nvme-cli uses NVME_IOCTL_IO_CMDs for "io-passthru"
commands to cuse devices. This patch adds support
for that IOCTL.
Signed-off-by: Curt Bruns <curt.e.bruns@gmail.com>
Change-Id: I20e0ac91ba08fce91bc5da1f4a1e454058cdd1e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7741
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The nvme cuse IOCTLs are actually creating passthru commands
that can be either IO passthru commands or admin commands.
Renaming the routines to correctly reflect that should limit
the confusion when reading the code. Passthru commands that
are admin commands will go to the spdk_nvme_ctrlr_cmd_admin_raw
interface and passthru commands that are IO will be sent to the
spdk_nvme_ctrlr_cmd_io_raw interface.
Signed-off-by: Curt Bruns <curt.e.bruns@gmail.com>
Change-Id: I8d427fe8b5f503fdb2d193236c77d410d5b13886
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7740
Community-CI: Broadcom CI
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Nvme-cli uses BLKSSZGET so support needs to be added for
nvme cuse devices.
Signed-off-by: Curt Bruns <curt.e.bruns@gmail.com>
Change-Id: Ic8316713b2d017c8ff32a225efff6bcb95842799
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7708
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
It is useful to have debug log information in the nvme_cuse
path when debugging IOCTls and flows.
Signed-off-by: Curt Bruns <curt.e.bruns@gmail.com>
Change-Id: Ifef1bb82c96438e2fcbb9ad2fafe3f3eb66bed51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7707
Community-CI: Broadcom CI
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
The purpose is to prepared for implement the async crc32 caculation
in the future patch.
Change-Id: Ia75f28154c49f08b527d48c63b9da79a6bdfede8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7794
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The purpose is to prepared for implement the async crc32 caculation
in the future patch.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I49f84ea1966f0acdd6f5aeb7192896f91fd16dee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7793
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Purpose: We will also support the kernel idxd driver, so we do not
need export this feature in the module file.
Change-Id: I965e031497920f527962ba187bccd81de6977b8f
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7336
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
There's no good reason to reduce the capacity by aligning it to the
number of optimal open zones. If such alignment is required by the
users of the zone block bdev, it should be done on their own layer.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ic8614a82715e9f064619aa8fdb75d1a0b851490c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7656
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6ad71a65244526e99a36920c630096cc9739d94d
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7809
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
--initial_zone_reset has to be done before fio creates its threads.
Since --zonemode=zbd only supports --create_serialize=1 (default),
this is possible.
Since this requires an I/O channel, and is called before threads
are created, follow the same pattern as spdk_fio_report_zones()
and simply initialize the thread early if this option is used.
Just like spdk_fio_report_zones(), thread cleanup has to be
called explicitly in case of error. (Since fio will only call
.cleanup() on threads that it has called .init() on.)
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I7d4dedce88309e4c6e5800ed3d56cd5ccb297551
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7726
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Implement callbacks needed for fio --zonemode=zbd, so that we can use fio
to exercise the bdev-zone layer in SPDK.
spdk_fio_report_zones() will be called before SPDK normally initializes
the threads.
spdk_fio_report_zones() simply initializes its spdk thread when called.
Threads not running against a zoned block device are not affected.
Each spdk thread is still destroyed after the fio run has completed,
as normal. If spdk_fio_report_zones() encounters an error, we have
to call spdk_fio_cleanup() so that the thread is added to the global
list of spdk threads that are cleaned up after main loop exit.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: Ia094eae8c9e44d8cfc66a5d9b7100f09f9db456a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7725
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
spdk_fio_init_thread() assigns td->io_ops_data.
spdk_fio_init_thread() can return an error, but currently lacks error
handling code.
Add error handling code, and add an assertion that fio_thread
(td->io_ops_data) is assigned when spdk_fio_init_thread() didn't return
an error.
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I8de7d59db0373599c90aa57fffa476c6707b6104
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7732
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This is prepared for using the hardware offloading
engine in accel framework. And some fields in nvme_tcp_pdu
needs to be DMA addressable.
Change-Id: I75325e2cd7ff25fe938bea0ac9489a5027e3e0e9
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7770
Community-CI: Mellanox Build Bot
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This is used to prepare using the accel framework to calculate
the crc32 because some fields in this structure needs to be allocated
in DMA addressable memory.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ib8def5596e60f4702709da647145c4e2b6d6848f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7767
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Also add a macro to test a given log page ID.
Signed-off-by: Scott Peterson <scott.d.peterson@intel.com>
Change-Id: Id4d00f5c3d8af76b24ce010d6f922025a31312b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4115
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Note: a lot of the TCP and FC trace registers were
specifying '1' which means the arg type is a pointer,
but in reality it is always passing 0 for arg1. So
this patch just changes them to SPDK_TRACE_ARG_TYPE_INT.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I18d3cedd21e516f16cb2cd0a7f8c16670b1895d7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7763
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
We already pass the PDU as arg1, so by changing the
trace register descriptions, we can map the PDUs to
more readable IDs when running the spdk_trace app.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iad7106eeb0f5fe738f81da5ee174515d1cf4b6ce
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7757
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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>
This was accidentally moved to the wrong place as
part of some earlier iSCSI refactoring. This trace
record should be executed when we have finished
reading all of the data for any PDU, not just those
with immediate data.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib1d17e5e79ff220e9e9b3dd55e247e745bd58019
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7756
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
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>
We cannot rely on DSM/DEALLOCATE as a write zeroes
alternative, even if DLFEAT reports that deallocated
blocks will be read as all zeroes. DEALLOCATE is
advisory, meaning that blocks may not actually be
deallocated. In cases where they are not deallocated,
they will not be read back later as zeroes.
QEMU 6.0 started reporting DLFEAT as returning zeroes
for deallocated blocks but for some of our write
zeroes tests, blocks aren't actually deallocated.
We may be able to add quirks in the future if we know
that a controller reliably deallocates blocks, but
for now we need to revert this completely.
Note that since bdev/nvme module now does not support
write zeroes in any cases, we need to disable the
write zeroes call in the unit tests.
Fixes issue #1932.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I79f0673774b621a9ffcc46891728cc7719e34cdb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7723
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
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>
It can be useful for testing or development purposes to force clients to write
to doorbells using vfio-user messages instead of directly into shared memory;
add a transport-specific option to disable the shared mapping.
Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I7ed062fbe211ba27c85d00b12d81a0f84a8322ed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7554
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This will help us to add unmap split function, also
remove bdev_io_type_can_split() because we changed
to use swith(io_type) ... case now.
Change-Id: I449d6a9f5bf2d0b43dd124bbfc9e1ca2afddc15a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7516
Community-CI: Broadcom CI
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>
Reviewed-by: <dongx.yi@intel.com>
The backend device module can report such capabilities
to the bdev layer, and we can split unmap request into
multiple children requests in the bdev layer.
Change-Id: I81daf7e58b797a2673ef102f2a037de20771092e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7515
Community-CI: Broadcom CI
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Only the last bdev_io can be freed without this fix.
Change-Id: I0d05b5d89e38ef60872ebc0f23aaed0c622593c4
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7571
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Purpose: This patch is used to prepare to add the kernel
idxd support later.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: If89665f95d622c7342ab75050664158ec6fc615a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7330
Community-CI: Broadcom CI
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
(Note: this patch was previously applied as b32cfc46 and then reverted
as 63642bef.)
Today the in-guest nvme device shows physical_block_size=512 even though
the backend iSCSI bdev supports physical_block_size=4K
iSCSI targets exposes physical block size using
logical_block_per_physical_block_exponent in READ_CAPACITY_16
NPWG is one of the way to let Linux nvme driver set
physical_block_size of the nvme block device.
This patch adds spdk_bdev.phys_blocklen which is updated if the iSCSI
backend exposes physical_block_size.
Later phys_blocklen is used in nvmf to set NPWG and NAWUPF to report
back during NS identity.
Linux driver uses min(nawupf, npwg) to set physical_block_size.
Similarly in scsi_bdev fill lbppbe in READ_CAP16 response
based on spdk_bdev.phys_blocklen.
Fixes#1884
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Change-Id: I0b6c81f1937e346d448f49c927eda8c79d2d75c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7739
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
1) use spdk_bdev_get_name() accessor
2) use __SPDK_BDEV_MODULE_ONLY #define
The latter allows nvmf to just get the spdk_bdev_module
definitions and APIs that it needs for claiming bdevs
for purposes of avoiding the same namespace used in
different subsystems.
This also ensures that future changes to structures
like spdk_bdev and spdk_bdev_io will not cause
lib/nvmf so version changes.
Note: we include bdev_module.h explicitly in the
nvmf/subsystem unit tests now, before including
subsystem.c, because the unit tests do depend on
knowing the internal structure of spdk_bdev.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2f499a741d19f4749eadb402641f28137245fd23
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7738
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
We have some cases where libraries need the
spdk_bdev_module structure definition and a couple
of related APIs, but not everything else (i.e.
spdk_bdev, spdk_bdev_io), for purposes of avoiding
abidiff errors.
For example, nvmf creates a dummy spdk_bdev_module,
and then uses it with the spdk_bdev_module_claim_bdev
API to ensure multiple subsystems cannot add the same
bdev as a namespace.
But when nvmf includes bdev_module.h, it pulls in the
spdk_bdev structure definition as well. This means
when the spdk_bdev structure is modified, it requires
a major version bump since abidiff detects the
difference in the debug info.
Alternatives considered:
* We could add a specific suppression into our abidiff
script for nvmf and struct spdk_bdev, but it would be
a risk (albeit very very small one) that we could
add a real dependency on struct spdk_bdev in the future,
and the suppression would hide the difference.
* We could also break out bdev_module.h into multiple
header files, but the ways of doing that either result
in odd file naming, or modifying every bdev module to
include a new header.
* We could add a public bdev API to expose what the
bdev library needs, but that seemed even more intrusive
than this change. nvmf is kind of abusing the bdev_module
API here, and I'd prefer to not promote that kind of
usage by adding something to the bdev API.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie8fdef8ea294d005b9ae7934dde49c62748420d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7737
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Move some of the bdev_module APIs immediately after
the bdev_module structure definition. This prepares
for an upcoming patch.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I78d534ba047048ec27d8d3159666584a52211de3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7736
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
libvfio-user DMA APIs report all regions notified by the client, including those
that don't have a corresponding shared mapping. There are several of these for
a typical VM, so just ignore this case.
Signed-off-by: John Levon <john.levon@nutanix.com>
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Change-Id: I37b06f4bc6d1818a03c8742616ed142f575d3f0e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7532
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
When payload_size is 0, we may get wrong cdw10 because of the calculate: 0 - 1,
add value check to fix value inversion bug.
Signed-off-by: sunshihao <sunshihao@huawei.com>
Change-Id: I3bcd38ba981c854ff917282341d32aac47d22b76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7443
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This allows us to remove separate fcntl() calls to
set O_NONBLOCK.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1a590cfb3b65b3174bb5ef33e060cdc9bb7ac86c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7598
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
This simplifies the code a bit, removing the need
for the separate fcntl() calls.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4fef8f01a055d1471df87bd979c21d6198e9868a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7596
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
It is already set by nvmf_tcp_req_pdu_init
when we get the pdu. So we do not set it again.
Change-Id: I034bbc46e600afd802457c0b152e303f16bafba3
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7714
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This reverts commit b32cfc467b.
This commit fails the ABI checks and only got through because the checks
were disabled until 21.04 hit.
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Id26b8f8ba551193d99b1ccbd31b35378b4095a20
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7731
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Today the in-guest nvme device shows physical_block_size=512 even though
the backend iSCSI bdev supports physical_block_size=4K
iSCSI targets exposes physical block size using
logical_block_per_physical_block_exponent in READ_CAPACITY_16
NPWG is one of the way to let Linux nvme driver set
physical_block_size of the nvme block device.
This patch adds spdk_bdev.phys_blocklen which is updated if the iSCSI
backend exposes physical_block_size.
Later phys_blocklen is used in nvmf to set NPWG and NAWUPF to report
back during NS identity.
Linux driver uses min(nawupf, npwg) to set physical_block_size.
Similarly in scsi_bdev fill lbppbe in READ_CAP16 response
based on spdk_bdev.phys_blocklen.
Fixes#1884
Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Change-Id: I0b6c81f1937e346d448f49c927eda8c79d2d75cf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7310
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
We have seen that dptr was not alligned to 4k using cuse. Added allignment of data in cuse ctx to 4k same as it is done in nvme_allocate_request_user_copy
Signed-off-by: jwyka <jakub.wyka@intel.com>
Change-Id: Ic5c2482eae20d64ba467016eb61f5255467f70a9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7453
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI
This check was disabled after 21.01 LTS to allow for
clear break of SO versions. Now that SPDK 21.04 is being
released, this test should be reenabled.
See following patch for details:
(e4070ee0)so_ver: increase all major versions
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8a299a340338e7a2ab3439b81153818778b4c93a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7616
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
test script 'test/interrupt/reactor_set_intr.sh' will
do various reactor set intr operations on interrupt_tgt
without spdk_thread and with spdk_thread.
Change-Id: Ie5af1dc68b0272c34a91e8a66b78088c3794907c
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7348
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>
When performing snapshot creation the I/O is frozen
during the process. The blob persists for extent page
allocation is delayed until snapshot creation is finished.
This results in multiple blob persists executing one after
the other, with only intent of writing out updated extent table
pointing to new extent pages.
Since blob->state is marked DIRTY before issuing each persist,
but a single persist completion marks state CLEAR.
Blob serialize correctly expects each persist to contain
dirtied metadata, in order to avoid unnecessary md writes.
Since all other instances of marking blob DIRTY is explicit,
assert in blob serialize is left as is.
Instead when running the queued up blob persists, the blob
state is marked DIRTY.
Side effect is that it will write out same md in some cases.
Fixes#1909
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I39f37299f3f0ebfccbdd4063781b5ecce286e993
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7640
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
spdk_vtophys() takes a mapping_length parameter, so
it can return the length for which the returned
virtual address is valid.
But spdk_vtophys() will only return the max
between the valid length and the input mapping_length
parameter.
So the nvme SGL building code for contiguous buffers
was broken, since it would only set the mapping_length
once, before the loop started. Worst case, if a buffer
started just before (maybe 256 bytes) before a huge page
boundary, each time through the loop we would create
a new SGL for only 256 bytes at a time, very quickly
running out of SGL entries for a large buffer.
Fixes#1852.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib1000d8b130e8e4bfeacccd6e60f8109428dfc1e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7659
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The IDENTIFY_CNS quirk was applied as part of QEMU
OCSSD handling in commit 6442451b. But it was applied
not only to the OCSSD dev ID, but also the dev ID
for non-OCSSD NVMe controllers.
Starting with QEMU 5.2, QEMU will allocate a default
256 namespaces, but only some are active (associated
with the backing disks specified by the user). QEMU
supports IDENTIFY_CNS, but since this quirk was set,
we wouldn't send a real IDENTIFY_CNS and instead
would just populate a fake list where all namespaces
were considered active. This causes breakage in
a few places - mainly where we iterate through
the active namespaces, and then are surprised that
calling spdk_nvme_ns_is_active() returns false.
It was also breaking bdev_nvme_attach_controller RPC,
since by default we can only support returning 128
names, but since all of the namespaces were deemed
active, it was trying to return 256.
Fixes#1916.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4fdd27e0e36f0ac07a95f9f29aa83357e8505a45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7658
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Use -Wno-stringop-overflow only for GCC > 10.
Change made to use the same condition as in
dpdkbuild/Makefile.
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I6a396e250807f46720ff5dcaf21f13d802404a1b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7537
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
DPDK now officially supports only GCC > 4.9.0.
Some older systems like Centos7 (gcc 4.8.5) can still
build DPDK, but sometimes fail due to -Werror enabled.
Disable this option to increase build success chance.
Fixes#1891
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I0950ad01e2d8361851e9ac42c556004980e00ff4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7536
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This is first commit that should go into latest SPDK
after the code freeze for SPDK 21.04.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I515772a0c90a362bd4a23a7717281a8d7a9e4393
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7615
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
When zcero copy send is enabled and used by initiator,
it could significantly increase latency in some payloads.
To enable more fine graing configuration of zero copy
send feature, add new parameters enable_zerocopy_send_server
and enable_zerocopy_send_client to spdk_sock_impl_opts to
enable/disable zcopy for specific type of sockets.
Exisiting enable_zerocopy_send parameter affects all types
of sockets.
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I111c75608f8826980a56e210c076ab8ff16ddbdc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7457
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-04-27 08:13:32 +00:00
486 changed files with 26073 additions and 10452 deletions
max_large_datain_per_connection | Optional | number | Max number of outstanding split read I/Os per connection (default: 64)
max_r2t_per_connection | Optional | number | Max number of outstanding R2Ts per connection (default: 4)
pdu_pool_size | Optional | number | Number of PDUs in the pool (default: approximately 2 * max_sessions * (max_queue_depth + max_connections_per_session))
immediate_data_pool_size | Optional | number | Number of immediate data buffers in the pool (default: 128 * max_sessions)
data_out_pool_size | Optional | number | Number of data out buffers in the pool (default: 16 * max_sessions)
To load CHAP shared secret file, its path is required to specify explicitly in the parameter `auth_file`.
@ -5909,6 +6182,8 @@ model_number | Optional | string | Model number of virtual contr
max_namespaces | Optional | number | Maximum number of namespaces that can be attached to the subsystem. Default: 0 (Unlimited)
allow_any_host | Optional | boolean | Allow any host (`true`) or enforce allowed host list (`false`). Default: `false`.
The response is an object containing NVMf subsystem statistics.
In the response, `admin_qpairs` and `io_qpairs` are reflecting cumulative queue pair counts while `current_admin_qpairs` and `current_io_qpairs` are showing the current number.
### Example
@ -6617,6 +6893,8 @@ Example response:
"name": "app_thread",
"admin_qpairs": 1,
"io_qpairs": 4,
"current_admin_qpairs": 1,
"current_io_qpairs": 2,
"pending_bdev_io": 1721,
"transports": [
{
@ -6660,6 +6938,22 @@ Example response:
}
~~~
## nvmf_set_crdt {#rpc_nvmf_set_crdt}
Set the 3 CRDT (Command Retry Delay Time) values. For details about
CRDT, please refer to the NVMe specification. Currently all the
SPDK nvmf subsystems share the same CRDT values. The default values
are 0. This rpc can only be invoked in STARTUP stage. All values are
in units of 100 milliseconds (same as the NVMe specification).
Menu at the bottom of SPDK top window shows many options for changing displayed data. Each menu item has a key associated with it in square brackets.
* Quit - quits the SPDK top application.
* TAB selection - allows to select THREADS/POLLERS/CORES tabs.
* Switch tab - allows to select THREADS/POLLERS/CORES tabs.
* Previous page/Next page - scrolls up/down to the next set of rows displayed. Indicator in the bottom-left corner shows current page and number of all available pages.
* Columns - enables/disables chosen columns in a column pop-up window.
* Sorting - allows to sort displayed data by column in a sorting pop-up.
* Refresh rate - takes user input from 0 to 255 and changes refresh rate to that value in seconds.
* Item details - displays details pop-up window for highlighted data row. Selection is changed by pressing UP and DOWN arrow keys.
* Total/Interval - changes displayed values in all tabs to either Total time (measured since start of SPDK application) or Interval time (measured since last refresh).
* Help - displays help pop-up window.
# Threads Tab
The threads tab displays a line item for each spdk thread. The information displayed shows:
@ -63,3 +60,6 @@ The cores tab provides insights into how the application is using the CPU cores
\n
Pressing ENTER key makes a pop-up window appear, showing above information, along with a list of threads running on selected core. Cores details window allows to select a thread and display thread details pop-up on top of it. To close both pop-ups use ESC key.
# Help Window
Help window pop-up can be invoked by pressing H key inside any tab. It contains explanations for each key used inside the spdk_top application.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.