QEMU is fully capable of unlinking its own pidfile so it may happen
that after sending a signal to terminate it, the file is already gone
when we attempt to rm it - in such a case, rm fails leading to overall
test failure. Avoid that by allowing QEMU to do its job.
For cases where QEMU might have potentially failed (e.g. due to a crash)
we leave the rm in with an extra -f on its cmdline.
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ia8d5c73dd76225583a63c1f622835e22ce32e66c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16040
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>
Encourage the use of spdk_spinlock over pthread_mutex_t and
pthread_spinlock_t to improve safety and debugability.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I22e2d3cc917687c9878d7558fe8c640051b51a45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16021
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>
In the case of running by below commands:
./examples/bdev/bdevperf/bdevperf.py perform_tests
This value needs to be reset in each run, otherwise, it shows
wrong IOPS in the periodical way with -S parameter.
Change-Id: Ib8de7611aa06675d4a16fc3aa130d99b508b7605
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15960
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: Changpeng Liu <changpeng.liu@intel.com>
To achieve the highest possible IO-rates and lowest latency, then CPU
cycles must be spent processing IO. This commit introduces three
different techniques dependendent on the 'io_mechanism' used.
For 'libaio', xNVMe is instructued via 'opts.poll_io' to not wait for
completions, thus xnvme_queue_poke() returns immmediatly, the user can
then call xnvme_queue_poke() as frequently as desired. This requires
xNVMe v0.5.0. Earlier versions will ignore 'opts.poll_io' for 'libaio'.
For 'io_uring', xNVMe is instructed via 'opts.poll_io' to enable
IORING_SETUP_IOPOLL.
For 'io_uring_cmd', xNVMe is instructued via 'opts.poll_sq' to enable
IORING_SETUP_SQPOLL, this sets up a kernel-side thread reaping
completions from user-space on the ring. Note that 'io_uring_cmd'
requires liburing >= 2.2.
This commit enables the above by default. The above can be disabled by
setting 'conserve_cpu' to true on the bdev-setup.
Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Change-Id: Id54f1e59733ce9ae3b174ad4562904d868d4ef4f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14678
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 updates the xNVMe submodule to v0.5.0 and adjusts the Makefile,
disabling a backend (libvfn) introduced in v0.5.0 which is not of
interest.
With xNVMe v0.5.0 two things important for the bdev_xnvme has changed:
* The 'libaio' backend implementation responds to 'opts.poll_io'. It
does so by 'xnvme_queue_poke()' returning immediatly instead of
waiting for at least one outstanding IO to complete or for a timeout
to occur. This dramatically improves the IO-rate and reduces latency.
* Prior to xNVMe v0.5.0, the liburing library was vendored and "bundled"
into the xNVMe library. This library-bundling can cause linker issue
and is thus replaced by linking "properly" with liburing on the system
via pkg-config discovery.
To make sure linker can properly link libxnvme.a's content we need to
make sure we point at system's -luring during the build. Effectively,
this can now work together with --with-uring[=/uring].
This change is made in preparation to adding the 'conserve_cpu' option
which makes use of 'opts.poll_io' for 'io_mechanism=libaio'.
Signed-off-by: Simon A. F. Lund <simon.lund@samsung.com>
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ibd6e620679a3991a4a8642bb39390a61284aac74
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14677
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Under fedora, install_liburing() would put .pc under
/usr/lib/pkgconfig, whereas the pkg-config, by default, looks under
/usr/lib64/pkgconfig.
For the tests, make sure both paths are included in the environment
in case any entity (like xnvme) attempts to use pkg-config during
build.
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Iab3a4d1f69afc12c56c9fa6b7dd99daaca670e45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15853
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: Konrad Sztyber <konrad.sztyber@intel.com>
When merging data from one spdk_histogram_data to
another, the merging is only valid if the bucket_shift
for each structure is the same. Otherwise we are
combining data points that cover different ranges
of values.
So check that the bucket_shifts are the same before
merging. Change the return type to int to
return -EINVAL if structures with different
bucket_shifts are attempted to be merged.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If98e2d03384d85f478965956da2a42cfcff4713d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15813
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
When gdb_macros.py is used with unit tests some of the globals it
expects are not present. This commit handles the relevant exceptions so
a missing symbol does not prevent the use of macros that are initialized
later.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ic81f0dfa705839c9a03fb76e934684716b710390
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15999
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>
A bunch of python files in rpc and scripts directories were missing two
blank lines after the opening comments. python3-pycodestyle-2.5.0-2.el8
was unhappy with this
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Iee7f2bd4f0ddd96b2be89949a3aa324b2f9ea43a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16003
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 is only relevant when rpc.py is running in server mode. Recent
changes in argparse under python3.11 force it to raise the
ArgumentError exception whenever subparser of the same name is being
added.
With that in mind, avoid extra call to spdk_rpc_plugin_initialize()
by keeping track of all plugins that were already successfully
initialized.
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I89124738b995ba774b6619f97726a5bd69fe1fd9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15807
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Many parts of the blobstore.c seem to have gone with the assumption that
blob creation, deletion, etc. all happen on the md thread. This
assumption would allow modification of the bs->used_md_pages and
bs->used_clusters bit arrays without holding a lock. Placing
"assert(spdk_get_thread() == bs->md_thread)" in bs_claim_md_page() and
bs_claim_cluster() show that each of these functions are called on other
threads due writes to thin provisioned volumes.
This problem was first seen in the wild with this failed assertion:
bs_claim_md_page: Assertion
`spdk_bit_array_get(bs->used_md_pages, page) == false' failed.
This commit adds "assert(spdk_spin_held(&bs->used_lock))" in those
places where bs->used_md_pages and bs->used_lock are modified, then
holds bs->used_lock in the places needed to satisfy these assertions.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I0523dd343ec490d994352932b2a73379a80e36f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15953
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
A future commit will add to the complexity when returning with a
non-zero value. Rather than further complicating the several error
return locations, all affected error returns are handled after the error
label.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I56e8e338b0560f849399c085d0bb07efb7df26fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15983
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
A future commit may need to release a lock before returning. This
refactors blob_resize() to always return at end of the function using an
out label and goto.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I671fbdbe0e3b766c264c45589dad3a864ba1f192
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15982
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
Convert bs->used_lock to a spinlock. This is being done to help with
the debugging and fixing of a race that has led to a failed assertion in
bs_claim_md_page.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I11b80096de022f79a217c65d787ee57ca54240f9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15952
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
The bs->used_clusters_mutex protects used_md_pages, used_clusters, and
num_free_clusters. A more generic name is appropraite. The next patch in
this series will convert it from a mutex to a spinlock and having
"mutex" or "spin" in the name is of little help to maintainers, so a
more generic name is used.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I5ce7b85b84fdec2a0c5d2ac959e0109e1d80c7f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15981
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
Options:
FORMULA_TRANSPARENT
LATEX_SOURCE_CODE
RTF_SOURCE_CODE
DOCBOOK_PROGRAMLISTING
CLASS_DIAGRAMS
DOT_FONTNAME
DOT_FONTSIZE
DOT_TRANSPARENT
are obsolete in the Doxygen version 1.9.5
Doxyfile has been updated with 'doxygen -u'
Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Ic2c598f2e463d94b963a32a20f28a16b21389bfe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15822
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Doxygen 1.9.5 contains false positives that will be fixed
in later version. Right now if that version of doxygen is used
in tests (e.g. Fedora 37), any error (from issues below) is ignored.
False possitive is related to:
https://github.com/doxygen/doxygen/issues/9552https://github.com/doxygen/doxygen/issues/9678
This patch ignores only warnings related to "\ifile" and
"@param" processing in doxygen, reporting any other warnings.
Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I1ff5005351b82e81c323ad0fae47ba53a765b8a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15847
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
`--target-help` option is not available with CC set to clang
causing `clang: error: no input files`.
redirect `--target-help` stderr to `/dev/null`
This patch fix issue: #2820
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
Change-Id: I2c90e0122e162dc08537d94bbf0adad58f2eee2c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15967
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
In DPDK 22.11 rte_cryptodev_sym_session_create() now takes
a single mempool with element size big enough to hold session
data and session private data.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6c9db063825843a903d1ff84dd8d77f198a841a1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15435
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
Adjusts use of rte_crypto API after DPDK patch below:
(bdce2564dbf78e1fecc0db438b562ae19f0c057c)
For DPDK 22.11 and later, rte_cryptodev_sym_session_init()
is no longer used and only calling
rte_cryptodev_sym_session_create/free().
Change-Id: I89d8fa737fd6c199a4a5a810b85d6d5b79d5d27b
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15391
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
Basic IO completion counting can be done at the common
layer, to enable some level of stat tracking even for
transports that don't have transport-specific tracking
yet.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If04f854b97440089b8ad149b64cb59173c73975c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15912
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
There is set of "*_vs_DPDK" jobs running on nightly basis,
their purpose is to verify version compatibility between
SPDK and DPDK. That includes latest DPDK too.
This patch modifies the path passed to check_dpdk_pci_api.sh,
to be any DPDK under test.
Change-Id: Id059e60a0260e7dc11e61445389f2afed0f78f1f
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15865
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>
For validation of upcoming DPDK releases, pci_dpdk needs
to initialize and work.
This patch adds support for testing DPDK main branch,
with appropriate notice given when that DPDK version is used.
Change-Id: I5257beac3a3926bd432d9c00e50858facd21e6f5
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15891
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>
Starting with DPDK 22.11, PCI API are no longer public.
In order to implement out-of-tree driver like
SPDK NVMe driver that is compatible with DPDK,
a copy of PCI API headers are required in SPDK.
check_dpdk_pci_api.sh script is intended simplify
the maintanance of the compatibility between
SPDK copies of the headers and multiple DPDK versions.
Please see the included README
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ief028c13564441560425761e7802c6cf07460876
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15857
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>
Since SPDK holds copies of local DPDK headers for DPDK PCI API,
the same headers will now be used as includes.
It was already the case for DPDK 22.11, but not for DPDK 22.07.
Change-Id: I5859a630d1fb20b4ebf8628adb962f5e46c23788
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15969
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>
Shortly after DPDK 22.11 release it was amended with single
patch, which bumped the minor version.
No changes have occurred to the DPDK PCI API.
Change-Id: I94dadb23b3ad79cfbb21e848d718d909493137d1
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15890
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
As spdk_lvs_init() validates arguments, it uses o->cluster_sz in a
comparison but misleadingly prints opts.cluster_sz in the error message.
This changes the error message to print cluster_sz from the proper
structure.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I810bf9ad4a24ed7cc844c2835e0edda988cb2cbe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15970
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Cipher keys in sma are encoded by base64 that by default wrap line
after 76chars. It causes issues for 256bit keys in sma flow.
Adding "-w 0" disables line wrapping
Signed-off-by: Michal Rozegnal <michal.rozegnal@intel.com>
Change-Id: Ic6a8136672b1cdbd8d71d3cc1caa82a5bc898636
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15888
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: <sebastian.brzezinka@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Fixed ftl_l2p reference by adding anchor to the
"Logical to physical address map" subsection
Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I7d6ef590a76d55bea4d1392847241f439fc7aebf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15821
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
It makes it possible for stateless clients to send CreateDevice /
DeleteDevice each time a volume is attached / detached. Deleting a
device with attached volumes results in FAILED_PRECONDITION error, which
a client can simply ignore. The device will be deleted during the final
DeleteDevice call, once all volumes are detached.
We limit this behavior to device types that support AttachVolume /
DetachVolume methods, otherwise it would be impossible to delete such
devices.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I244b2b09455ec1430970c70f3fbb739cc9069754
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15670
Reviewed-by: Jing Yan <jing1.yan@intel.com>
Reviewed-by: Filip Szufnarowski <filip.szufnarowski@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 internal mempools were replaced with the newly added iobuf
interface.
To make sure we respect spdk_bdev_opts's (small|large)_buf_pool_size, we
call spdk_iobuf_set_opts() from spdk_bdev_set_opts(). These two options
are now deprecated and users should switch to spdk_iobuf_set_opts().
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ib1424dc5446796230d103104e272100fac649b42
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15328
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
This is done in a couple of places, so it makes sense to extract it to a
separate function.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Id34b2545d9912c2b7b65b1277711e9683db92658
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15327
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
It will allow us to add extra (de)initialization steps to be executed
before / after each unit test.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ic3c644e893e4fdb368723c120b23f18cd752db70
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15780
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
We don't need to create as many devices to fully populate two buses, we
can create 32 devices on the first bus and 1 device on the second one
and basically test the same thing, while allocating less resources at the
same time.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ibaca094f71f3702f8d58f5feb54b676df749ff49
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15645
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
This gives us a place to initialize iobuf pools, specify subsystem
dependencies, and execute RPCs to configure the sizes of the pools.
We allow users to configure the size of the pools either through the
options in spdk_bdev_opts or through the new RPC, iobuf_set_options.
The second option has higher priority, so it will override the options
set by the bdev layer.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I7c45ace04bc71c8343658f98248fc7babcf24e5d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15765
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Users can now specify a number of small/large buffers to be cached on
each iobuf channel. Previously, we relied on the cache of the
underlying spdk_mempool, which has per-core caches. However, since iobuf
channels are tied to a module and an SPDK thread, each module and each
thread is now guaranteed to have a number of buffers available, so it
won't be starved by other modules/threads.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I1e29fe29f78a13de371ab21d3e40bf55fbc9c639
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15634
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.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
The idea behind "iobuf" is to have a single place for allocating data
buffers across different libraries. That way, each library won't need
to allocate its own mempools, therefore decreasing the memory footprint
of the whole application.
There are two reasons for putting these kind of functions in the thread
library. Firstly, the code is pretty small, so it doesn't make sense to
create a new library. Secondly, it relies on the IO channel abstraction,
so users will need to pull in the thread library anyway.
It's very much inspired by the way bdev layer handles data buffers (much
of the code was directly copied over). There are two global mempools,
one for small and one for large buffers, and per-thread queues that hold
requests waiting for a buffer. The main difference is that we also need
to track which module requested a buffer in order to allow users to
iterate over its pending requests.
The usage is fairly simple:
```
/* Embed spdk_iobuf_channel into an existing IO channel */
struct foo_channel {
...
struct spdk_iobuf_channel iobuf;
};
/* Embed spdk_iobuf_entry into objects that will request buffers */
struct foo_object {
...
struct spdk_iobuf_entry entry;
};
/* Register the module as iobuf user */
spdk_iobuf_register_module("foo");
/* Initialize iobuf channel in foo_channel's create cb */
spdk_iobuf_channel_init(&foo_channel->iobuf, "foo", 0, 0);
/* Finally, request a buffer... */
buf = spdk_iobuf_get(&foo_channel->iobuf, length,
&foo_objet.entry, buf_get_cb);
...
/* ...and release it */
spdk_iobuf_put(&foo_channel->iobuf, buf, length);
```
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ifaa6934c03ed6587ddba972198e606921bd85008
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15326
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Recently while updating the copyright notices
throughout SPDK the headers, env_dpdk copies of
DPDK headers were modified too.
This patch brings them to the exact version as
in DPDK upstream.
Change-Id: If30b8556386a539d81d2fc1a5e42293522ed91f5
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15856
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>