Commit Graph

16250 Commits

Author SHA1 Message Date
paul luse
78ef7cfc23 test/accel: add UT for test_spdk_accel_submit_copy()
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I2fb94a20bda23e9da07db5405977603dfaa319f9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6473
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-07 09:25:20 +00:00
Michal Berger
71a8e5658c autobuild: Consider use of clang while building DPDK
Our CI has a separate job dedicated for clang builds. Consider that
while specifying arguments to make sure they are compatible with the
actual compiler that is being used during the test.

Also, be strict as to what compilers can be used for the test -
gcc and clang only.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ia1a4e9fea9a46e37c07fffe5077c4dacbe13102a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9614
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
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>
2021-10-07 09:24:16 +00:00
paul luse
bcd3ed39e7 modules/crypto: remove dependency on rte_cryptodev_pmd.h
Call rte_cryptodev_close() to free qpair memory instead of using
an internal function.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I1bd7f0dd86de83f278f6be3263cdf3fbd8e1c77f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9720
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-07 09:23:55 +00:00
Maciej Wawryk
e50d1e0f59 scripts/nvmf: fixed sar mesure error
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I1a4d32de6a83800cdcd65dde3895a36731c52838
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9710
Reviewed-by: Jim Harris <james.r.harris@intel.com>
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>
2021-10-07 09:23:22 +00:00
John Levon
890b657e6b examples: detect fio backend fd redirection
It's useful to be able to run fio daemonized, and very recent versions of fio
redirect stdout/stderr to /dev/null in order to avoid the problem that
previously caused the plugin to abort. Detect if this redirection has happened
and allow fio to run in this case.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I8ec13a4c26a0acc67b15fa5e8502dc28d341e441
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9691
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Andreas Economides <andreas.economides@nutanix.com>
2021-10-07 09:22:57 +00:00
John Levon
6751909838 bdev/iscsi: unregister conn poller when idle
There's no need to keep polling with iscsi_bdev_conn_poll() when the request
list is empty, as new requests already restart the poller when needed.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Iec5553f8c14d32e894989c9f7a448b6817a821b1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9375
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-10-07 09:22:37 +00:00
Jim Harris
99fb67803c test: allow user to override autotest_common.sh HUGEMEM
By default on Linux, we hardcode HUGEMEM=4096.  But some
environments (like VMs) may not have enough memory to
allocate that much hugepage memory, and the user may
want to run some test scripts that don't require that
much memory.

So allow user to specify HUGEMEM in their environment
before calling a script that uses autotest_common.sh.
If it's set, it will use the specified value,
otherwise default to the values used prior to this
patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6e441ed2d703a04430305ad712903a7fa41190c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9726
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-06 11:17:21 +00:00
Jim Harris
93351b0e01 test: use single core when testing nvme fuzz with nvmf target
There's really no need to specify 4 cores for both the fuzz app
and the nvmf target, since only one is ever used.  Reducing the
mask to a single core each makes the fuzz.sh tests easier to run
in VMs with a limited number of cores.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id956ac8d0d7f75cb0e76b78c9175b4aa520218bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9725
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-06 11:17:21 +00:00
Jim Harris
a29c5a164f nvme_fuzz: add -U option to skip IOMMU check
There are many cases where we can safely run the nvme_fuzz
app without having to worry about DMA corruptions - for
example, any test using the TCP/RDMA/vfio-user transports
against a target using an emulated backend like null or
malloc.  So add a -U option to skip the IOMMU check if
the user so desires.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia123b7fb49056f49e2d805c9c3d5b3169c0d589e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9724
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-06 11:17:21 +00:00
Jim Harris
c42d8a16df nvme_fuzz: use spdk_nvme_connect() API
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7e2bd33ba4a70000493a2f8f1c67ede784dd29cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9723
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-06 11:17:21 +00:00
Konrad Sztyber
b14196fa7f scripts/trace: add owner/object type to tracepoint definition
These fields aren't needed by the JSON provider, as the trace entries in
this format already has the owner and object fields filled, but it'll be
needed for the provider using the trace library.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I9db974793193fe59bfffc8dd3b975d5343036be9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9438
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-06 07:30:17 +00:00
Konrad Sztyber
d1732fcedc scripts/trace: create trace provider abstraction
This abstraction will make it possible to support different sources for
the traces.  The current JSON implementation is moved to a provdider and
a new one using the trace_parse library will be added in the following
patches.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I322e7984ffe19ce8b8e1bb551e8339655383623f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9437
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-06 07:30:17 +00:00
Konrad Sztyber
69390766a4 app/trace: use trace_parse library to process traces
Removed code that was copied to the trace_parse library and replaced
with calls to that library.  This significantly reduces the size of the
application (LOC), as it's only responsible for formatting the traces
and pretty-printing them.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ib9f4e65f9f0072fb00bfa60cece1ce0627f109a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9436
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-10-06 07:30:17 +00:00
Konrad Sztyber
f243f62450 lib/trace_parser: update object statistics
Object's statistics (its index and start timestamp) are now tracked and
updated in the trace entry object.

This is the final piece of code that had to be copied from the trace
app.  The following patch will remove that code from the application and
replace it with functions from the trace_parse library.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I1acaefb5a516bbc59c0549b2f66a5c52368bcd2c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9435
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-10-06 07:30:17 +00:00
Konrad Sztyber
189b0f0920 lib/trace_parser: method for retrieving entry count
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: If5f1b1bea0d30419be46e704ddd7c2f9556b4627
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9498
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-10-06 07:30:17 +00:00
Konrad Sztyber
ffaec5f91c lib/trace_parser: reconstruct tracepoint arguments
Tracepoint arguments are now reconstructed when retrieving next trace
entry (possible from multiple buffers).  Similarly to previous patches,
the code is directly copied from the spdk_trace app.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ie7594d381660ef31c286b5e124d2a6df3835111e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9434
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-10-06 07:30:17 +00:00
Michal Berger
65f01122b2 pkgdep/git: Bump fio to 3.28
Older versions of fio depend on raw driver which recently got removed
from the linux kernel:

git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=603e4922f1c

Due to that, these fio versions won't build anymore under latest
kernels available, e.g., for fedora (due to missing raw.h from the
kernel-headers package). Details here:

https://github.com/axboe/fio/commit/382975557

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ie63769395c482f1965c6664e8f5143c71ef80253
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9718
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-06 07:21:43 +00:00
Maciej Wawryk
c76f45ee87 scripts/nvmf: set correct port in adq_configure_tc
fixes #2178

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I89981459e2d5917bf46cde496550e28b1a3175f7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9717
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-10-05 08:24:01 +00:00
Denis Nagorny
d42045b2af bdevperf: test time wrong time fix
spdk_bdevperf_shutdown_cb computed total time after the
bdevperf_test_done call. It's wrong. Let's get
g_shutdown_tsc delta when it is really needed.

Signed-off-by: Denis Nagorny <denisn@nvidia.com>
Change-Id: Ic4421305b16277af874008e293da8cb121c0244a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9598
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-04 15:02:46 +00:00
Konrad Sztyber
00d587140f bdev/nvme: remove CSTS from driver-specific JSON info
It's not providing a lot of value, while being pretty problematic, as
the read is blocking and cannot be easily changed to be non-blocking, as
dump_info_json is a synchronous interface.

Now that dump_info_json isn't using any synchronous interfaces from the
NVMe driver, we can send a bdev_get_bdevs call in the async_init.sh
test to verify that.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ida31c8d1000a52b0782f698afe46b071ed4e41df
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9488
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-04 15:00:35 +00:00
Konrad Sztyber
c5ebb7ff99 bdev/nvme: use asynchronous ctrlr detach functions
This patch replaces the synchronous `spdk_nvme_detach()` calls with its
asynchronous counterparts in the controller unregister path.

An additional poller is introduced to periodically poll the NVMe driver
for detach completion.  Once the detach is completed, the poller is
unregistered and the nvme_ctrlr is destroyed.  The poller uses the same
period (1ms) as the async probe poller.

Since reset and detach cannot happen at the same time, reset_poller was
renamed to reset_detach_poller and it can now store the pointer either
to the reset or detach poller, depending on the circumstances.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I5eb2dd6383d98d25d1f9748af08c1a13d18acb0e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8729
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-04 15:00:35 +00:00
Konrad Sztyber
f983acfc3a bdev/nvme: move module finish callback to nvme_ctrlr_delete
This is done in preparation for using the non-blocking versions of the
spdk_nvme_detach API, which will delay controller's delation until the
detach is completed asynchronously.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ia785408c9a94427e60bf239e6036a5e89d589f61
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8727
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-04 15:00:35 +00:00
Konrad Sztyber
c1f6054114 nvme: asynchronous detach without shutdown notification
Detaching a controller with `no_shn_notification` flag set will follow
the regular detach path making it asynchronous too.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I0b9c6c23626b4cc1cfaedb3268024776a07b9195
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9003
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-10-04 15:00:35 +00:00
Konrad Sztyber
b6ecc37298 nvme: make ctrlr detach fully asynchronous
The controller detach had asynchronous API (with async/poll), but the
register operations were synchronous, so they would block on fabrics
controllers.  In this patch, they're changed to their non-blocking
counterparts, making the detach fully asynchronous.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I74df12ab40a54f1d675639672e03755c89768bef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8726
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-04 15:00:35 +00:00
Konrad Sztyber
51b018da0f test/nvmf: add asynchronous NVMe initialization test
The test verifies that the NVMe driver initialization is asynchronous.
There are some error logs during shutdown, as the detach path isn't
asynchronous yet, but as long as the detach is performed implicitly,
the test completes successfully.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I97483d8a8ba2487e279f7674514ad2cc2c54d504
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8625
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-04 15:00:35 +00:00
Changpeng Liu
b3ddd46e0d nvmf/vfio-user: return error when deleting SQ more than once
Previously we only use an assertion to address this sceanrio.

Fix issue #2173.

Change-Id: I7a6e715977218d2a3a08c48a9935880f3fe4ec63
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9604
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Andreas Economides <andreas.economides@nutanix.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-30 08:08:05 +00:00
Changpeng Liu
742ae4ec72 nvmf/vfio-user: check SQ doorbell is valid or not before use
According to the specification, we should also post an AER
error event for this error case.

Fix #2171.

Change-Id: Ifb2343453ea5e36ce244938a939537ee6ed1c4e1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9584
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-30 08:08:05 +00:00
Michal Berger
8a0fedf4e6 scripts/vagrant: Remove OCSSD support from vagrant configuration
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ifdd1d02b466b6496469c9ea1f09633b6e368ab57
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9617
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: Jim Harris <james.r.harris@intel.com>
2021-09-30 08:07:57 +00:00
Jim Harris
b8d2b705dd README.md: add some additional pointers on setup.sh help
This calls attention to some of the more advanced features
in setup.sh for users who may require them.

Fixes issue #2179.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0a9d1e20257768da0796ceb0360377c948f0e166

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9676
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-30 08:06:02 +00:00
Nick Connolly
2a51824a54 lib/thread: Use PRIu64 for portability
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: I622fd43e7acf2cb93d3ba4ba9e9367e6dd064a74
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9663
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-29 08:58:28 +00:00
Denis Nagorny
7098e2ed31 bdevperf: prevent multiple performance statistics poller registering
Current implementation allows to run bdevperf with --wait-for-rpc and
without -z option. As the result several statistics pollers will be
registered. Let's add guardian to prevent this.
In the case of multiple test running guardian also will be helpful.

Signed-off-by: Denis Nagorny <denisn@nvidia.com>
Change-Id: I885f9dba6fa324fe4fbaba104d3058bf9f686c19
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9613
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-09-29 08:58:12 +00:00
Konrad Sztyber
279b7babe4 lib/trace_parser: method for iterating over entries
Added a definition of a parsed trace entry and a function allowing for
iterating over these objects.  The difference between a parsed and a
regular trace entry is that it includes more information gathered while
processing the trace file (e.g. lcore, object statistics) and provides a
contigous buffer for trace arguments.

For now, only lcore and the pointer to the actual trace entry are
filled.  Tracepoint arguments and object statistics will be added in
subsequent patches.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I4d5e30a7abb4860a5ba9db46f64ceae8bd14646f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9433
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-29 08:57:58 +00:00
Konrad Sztyber
6727cc382b lib/trace_parser: method for retrieving tsc offset
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I11fc341b4353c01cd933d6692cf97de3a3744a84
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9432
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-29 08:57:58 +00:00
Konrad Sztyber
4ba770720a lib/trace_parser: populate entries map
The trace file is now parsed and the entries are put in a map, sorted by
their timestamps.  The code is directly copied from the spdk_trace app,
with very little modifications.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I7929497ffd3079b6974f5423c82a6128db2cee98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9431
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-29 08:57:58 +00:00
Konrad Sztyber
41ba2b30e7 lib/trace_parser: method for retrieving trace flags
It gives user access to things like the tsc rate and tracepoint
definitions.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ib50126b331faa4508174c7cb707643a3d8db6a01
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9430
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: Ben Walker <benjamin.walker@intel.com>
2021-09-29 08:57:58 +00:00
Konrad Sztyber
55f64c36c6 lib/trace_parser: map/unmap the trace file
Copied code responsible for mapping/unmapping the trace file.  The
only modifications were related with tying it to the spdk_trace_parser
object.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ia575101532c612b185bd971c69157623b52b9e81
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9429
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: Ben Walker <benjamin.walker@intel.com>
2021-09-29 08:57:58 +00:00
Konrad Sztyber
9f671238b2 make: specify C++ standard version in CXXFLAGS
The standard is now specified explicitly.  The chosen standard, c++11,
is the latest supported by gcc-4.8.5, which is the oldest compiler still
in use on some systems (centos 7).

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I7ba84278b28e6d96f43b52014c358a74902188b9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9597
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-29 08:57:58 +00:00
Konrad Sztyber
d919a197d6 lib/trace_parser: add trace_parser library stubs
This library will provide functions that parse traces recorded by an
SPDK application.  This includes merging traces from multiple cores,
sorting them by their timestamp and constructing trace entries spanning
across multiple buffers.  All of these tasks are currently implemented
in the spdk_trace app, so most of its code will be moved here (this is
the reason for using C++).

The motivation for extracting this code to a library is to be able to
use it from places other than the spdk_trace app, specifically the
`scripts/bpf/trace.py` script.

The main reason for creating a separate library instead of extending
libtrace is to avoid pulling in all of its dependencies.  ISA-L is the
most problematic, as we only build it as a static library, which makes
it impossible to use with dlopen (making it unusable in scripts).

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: If101ca3425d7404abd51b0da2031358d0be44766
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9428
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-29 08:57:58 +00:00
Changpeng Liu
f7866a563f nvmf: consolidate AER notification into one function
Change-Id: If43e92fad60eff3e3f12cac1a8b413f5c16232fb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9633
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-09-28 12:51:06 +00:00
Changpeng Liu
86ad145bc1 nvmf: add AER error event API support
We still don't support get log page with error
information LID.

Change-Id: I92db361dc956ea3ed4f6e7bdfdca763d0fea6886
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9583
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-09-28 12:51:06 +00:00
Jacek Kalwas
fb335cb29c nvmf: allow to query only specified transport
Similar is already done for json-rpc bdev_get_bdevs, it might be
useful for the upper layer which has no interest in all but only
in one specified.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ie1af1cb4778edd265914bbfdc2777f66c6c76572
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9362
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@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>
2021-09-28 07:36:45 +00:00
Jim Harris
1227342cd4 test/nvme: add nvme_compliance test app
This is a rough first cut at an nvme_compliance test
application.  Initial focus will be on testing
the SPDK vfio-user target, but over time many of the
tests here will apply to TCP and RDMA as well (or
even running the test against a virtual nvme device
backed by vfio-user in a VM).

Usage:

test/nvme/compliance/nvme_compliance -r <trid>

There is also a test/nvme/compliance/compliance.sh
script that starts the vfio-user target with a single
malloc namespace, and runs the nvme_compliance
app against that target.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2c19df07c9ad93a69420545ab825015f49957fc2

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9599
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: John Levon <levon@movementarian.org>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-28 07:30:28 +00:00
Ben Walker
4fb3fea387 bdev/nvme: In bdev_nvme_attach_controllers, if adding a path the subnqn
must match.

Change-Id: I4e19ab8668268b273580d2b23ec30eafe21001ef
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9342
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-09-28 07:29:50 +00:00
Ben Walker
8dfefec509 bdev/nvme: Improve error reporting when adding additional paths to a
controller

Change-Id: I53ac0c6f8879bf80bc1345ef620a215d434f536f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9340
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-09-28 07:29:50 +00:00
Ben Walker
bf9e3156a9 test/nvmf: Add detach_controller calls to multicontroller.sh
This test will expand with more ways to add second paths, so we need to
remove the ones we add right after they're added.

Change-Id: Ie95ba01176cdedd858a98306f876d2d253a1c8cc
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9454
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
2021-09-28 07:29:50 +00:00
Ben Walker
14739d6e13 bdev/nvme: bdev_nvme_detach_controller is now much more flexible
It can match by any provided parameter to remove paths.

Change-Id: I5e7a87342bbb90943dc97fb52f142814fcf0acfa
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9453
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-28 07:29:50 +00:00
Ben Walker
301b3635fd bdev/nvme: bdev_nvme_delete treats empty trid fields as wildcards
The RPC that calls this function needs wildcard behavior.

Change-Id: Ie373d8fdd6f0308476e23de8a7a5be1d2595e574
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9575
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-09-28 07:29:50 +00:00
Ben Walker
a91079fd2d bdev/nvme: connected_trid is now an nvme_ctrlr_trid
Instead of storing an spdk_nvme_transport_id, store the object that
contains it. This will make a few later patches easier.

Change-Id: I36b74889fe39af3b7ab2b900fb3ea4b3f39e1f83
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9484
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>
2021-09-28 07:29:50 +00:00
Jim Harris
3184f6e227 scheduler/dynamic: rename _is_core_over_limit()
Rename it to _is_core_at_limit().  This function
currently returns true if the core is at the limit
(instead of over the limit) which is really the semantics
that we want - so just change the name of the function
to make it more precise.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Idf815f67c71463c3b98bc00211aafdc291abdbd2

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9582
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: Ben Walker <benjamin.walker@intel.com>
2021-09-28 07:29:03 +00:00
Jim Harris
cf494305bf scheduler/dynamic: don't put dst core over limit when moving thread
We have _is_core_over_limit() which determines if a core is
currently over its busy:total tsc ratio.  We use this to determine
if we need to move threads off of a core that is too busy.

But when we pick a core to move a thread *to* we were allowing the
dst core to fill to 100%, rather than the SCHEDULER_CORE_LIMIT.

This patch fixes that, which has the nice effect of keeping
thread-to-core assignments much more stable when running
I/O workloads.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id98b08803939d2a25104082e6436bb8d4727d7c2

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9578
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-09-28 07:29:03 +00:00