Commit Graph

16324 Commits

Author SHA1 Message Date
Shuhei Matsumoto
56e2d632ce bdev/nvme: Reset all ctrlrs of a bdev ctrlr sequentially
Reset all controllers of a bdev controller sequentially. When resetting
a controller is completed, check if there is next controller, and
start resetting the controller.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I169a84b931c6b03b36bb971d73d5a05caabf8e65
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7274
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-10-18 07:49:14 +00:00
Shuhei Matsumoto
5d62af41a3 bdev/nvme: Complete outstanding reset after canceling pending resets
Previously the NVMe bdev module had completed the outstanding reset and
then canceled pending resets. This was complex.

On the other hand, the generic bdev layer cancels pending resets
and then completes the outstanding reset.

Following the generic bdev layer simplifies the code and makes us easier
to control retry reset, delay retry reset by a few seconds, or stop retry
after repeated failures and then delete ctrlr.

Update unit tests accordingly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9a68422918ebcb052b3a281316ffba9b3450ecd4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9816
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
2021-10-18 07:49:14 +00:00
Jim Harris
df9f1e99c2 bpftrace: add escape char to gen_enums.sh
At least on my system, I need an extra escape for
the opening brace in the generated enums.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9671
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-18 07:47:38 +00:00
Jim Harris
88f9411281 bpftrace.sh: append enums at end of script
bpftrace scripts do not allow struct definitions after
the first probe definition (including BEGIN/END).
This is problematic for an upcoming patch which will
include some struct defintions.

So instead just add the generated BEGIN/END probes
with enum definitions to the end of the user-specified
script, instead of the beginning.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9670
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-18 07:47:38 +00:00
Jim Harris
e8c467965e test/scheduler: change how test threads consume cpu cycles
Now a test thread will have one idle_poller and an optional
busy poller (when active_percent > 0).

The idle poller will just consume a very small amount of
tsc via spdk_delay_us(10).

If active_percent > 0, we will start a timed poller for
TIMESLICE_US (currently 100 * 1000).  When that timer
expires, it will consume TIMESLICE_US * active_percent
microseconds.

I think this is a slightly simpler way to enforce the
thread consumption percentages specified by the tests.

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9654
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-18 07:47:38 +00:00
Jim Harris
15535803d4 test/unit/scsi: initialize prev_lun
Otherwise compiler complains that this variable
is used uninitialized (scsi_dev_find_free_lun does
reference it).

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

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9868
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-18 07:47:38 +00:00
GangCao
b0a52577a2 bdevperf: properly handle the next run of perform_tests
Change-Id: I65060a3a3f254ef541ab2f65995f168f649fbf69
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9821
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: Jim Harris <james.r.harris@intel.com>
2021-10-14 23:23:21 +00:00
GangCao
d4827a681b bdevperf: properly rename functions and update the usage of job count
There are two resources to construct.

One is the job configuration and the other is the job.

This patch is to properly rename the related functions.

Change-Id: Ie005ed75a558b3176b183f30ef5bfdb9bef30dc2
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9854
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: Jim Harris <james.r.harris@intel.com>
2021-10-14 23:23:21 +00:00
Maciej Wawryk
328a75c0cb scripts/nvmf: fixed type error in sar measurements
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ibcc7a77d1ebcc013b5050564fcc31b23b1202912
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9840
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2021-10-14 23:20:36 +00:00
Krzysztof Karas
a72f77e9b1 Commit updating intel-ipsec-mb submodule.
Additionally:
In release 1.0 intel-ipsec-mb module moved main header
(intel-ipsec-mb.h) from main directory of the project
to the /lib directory. This change aims to address that
and allow for a successful build.

Change-Id: Idd6ec90396166c94ca492ef1d2038331adbbc36c
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7976
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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2021-10-14 09:52:39 +00:00
Jacek Kalwas
8f8f3f8703 json: add the spdk_json_write_uint8|16 function
Add the paired spdk_json_write_named_uint8|16 function

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ib7ee9ae4dbe9a4e9cfa28750f0b9a0af597d260c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9788
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: Jim Harris <james.r.harris@intel.com>
2021-10-14 09:52:25 +00:00
Michal Berger
58410e6c79 test/openstack: Use stable branch for the requirements repo
As of recently, devstack requirements are broken - the suds-jurko
requirement doesn't work with a particular version of setuptools
needed by the latest devstack. Since this breaks installation on
ALL distros take a step back and use specific, stable branch
for the requirements: xena is the upcoming release hence it should
be as close as possible to master.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I1133cd64413ec4fb794fac932bd3ffe6ac81dd9c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9794
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-14 09:51:52 +00:00
Michal Berger
3bcff0b2e4 pgkdep/git: Patch ice driver under ubuntu1804
This is needed for the older kernel builds which include the following
change:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7240b60c98d6

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I8ac86885028d663b776ae8de6d9fb500ed997523
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9808
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>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
2021-10-14 09:51:42 +00:00
Richael Zhuang
711a4a70e5 test: fix build error about type-limits on arm64
There is an build error on arm64:
nvme_compliance.c:203:42: error: comparison is always true due to
limited range of data type [-Werror=type-limits]
while ((op = getopt(argc, argv, "gr:")) != -1) {

For "op" is defined as "char" here. "char" is "unsigned char" on arm
and "signed char" on x86 by default. So change its type to "int"
to avoid this error.

Change-Id: I1f9fa8e0112538e005e8b88c1bfda9257b3f517e
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9853
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
2021-10-14 09:51:14 +00:00
Jim Harris
4963728855 nvme_fio: add log_flags
Allow user to add something like:

log_flags=nvme,nvme_vfio

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

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

log_flags=app_config,nvme,bdev

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

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I383512e47ad6ea86b8b2c71a212bdc88fadf2f65
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9870
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-14 08:17:28 +00:00
Jim Harris
f01146ae48 blob: use uint64_t for unmap and write_zeroes lba count
Previous patches (5363eb3c) tried to work around the
32-bit unmap and write_zeroes LBA counts by breaking
up larger operations into smaller chunks of max size
UINT32_MAX lba chunks.

But some SSDs may just ignore unmap operations that
are not aligned to full physical block boundaries -
and a UINT32_MAX lba unmap on a 512B logical /
4KiB physical SSD would not be aligned.  If the SSD
decided to ignore the unmap/deallocate (which it is
allowed to do according to NVMe spec), we could end
up with not unmapping *any* blocks.  Probably SSDs
should always be trying hard to unmap as many
blocks as possible, but let's not try to depend on
that in blobstore.

So one option would be to break them into chunks
close to UINT32_MAX which are still aligned to
4KiB boundaries.  But the better fix is to just
change the unmap and write_zeroes APIs to take
64-bit arguments, and then we can avoid the
chunking altogether.

Fixes issue #2190.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I23998e493a764d466927c3520c7a8c7f943000a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9737
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
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-10-14 08:17:16 +00:00
Shuhei Matsumoto
6dba57eb26 bdev/nvme: Use cb_arg of for_each_channel() to pass result of reset
Restore the previous nice idea and unify canceling pending resets
into bdev_nvme_complete_pending_resets().

cb_arg of spdk_for_each_channel() was reserved for a different
purpose but it was gone.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1c01051ae9d8eccc7fc3ec485dd344ff9f55087b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9815
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-14 08:16:32 +00:00
Shuhei Matsumoto
8786f215e3 bdev/nvme: Use boolean for the result of the reset operation throughout
The all setters of the reset_cb_fn use boolean as the result eventually.
Using boolean as the result earlier makes the code simpler and the
following patches easier.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9ec4f670ed7a000a824ab7e261bab07a3dc21f43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9814
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-10-14 08:16:32 +00:00
Shuhei Matsumoto
d456cd93d6 bdev/nvme: admin_passthru() submits to the first found unfailed ctrlr
bdev_nvme_admin_passthru() chooses the first ctrlr which is not failed.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If41a1d1e1bde4bddfa92e5a385509daa3f0ce4de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9525
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-10-14 08:16:32 +00:00
Shuhei Matsumoto
eea12e0df1 bdev/nvme: Admin commands fall through even if optimal io_path is not found
bdev_nvme_admin_passthrough(), bdev_nvme_reset_io(), and
bdev_nvme_abort() do not use io_path. So simply fall through even
if the optimal io_path is not found for these, and clear the
cached io_path for these.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib26fcbf99c95bbfb6e825c1b7c6455241c198d92
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9675
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-14 08:16:32 +00:00
Shuhei Matsumoto
d2e2405f13 bdev/nvme: reset() and abort() call io_complete() themselves for error cases
Even if the NVMe bdev module supports I/O retry, it will not retry reset or abort.

For clarification, bdev_nvme_reset_io() and bdev_nvme_abort() call
bdev_nvme_io_complete() themselves for error cases.

For bdev_nvme_abort(), we do not need to differentiate error processing
among return values. Simply complete the request with failure.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id5d51cbba47c6360a6177efd7d5f2e978c48ee9b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9674
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-14 08:16:32 +00:00
Shuhei Matsumoto
d7c7fbcda7 bdev/nvme: Inline bdev_nvme_io_complete() into bdev_nvme_reset_io_complete()
Even when I/O retry is supported, reset will not be retried. However,
bdev_nvme_io_complete() will process I/O retry. Hence inline
bdev_nvme_io_complete() into bdev_nvme_reset_io_complete() to exclude
reset from I/O retry. The result of reset is success or failure, so omit
the -ENOMEM case.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I667e74cbbac4a13cefb6896f898476ba48bcd0fa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9687
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-14 08:16:32 +00:00
Shuhei Matsumoto
d278711cff bdev/nvme: Save io_path into nvme_bdev_io to reuse it while processing I/O
Save the io_path to which the current I/O is submitted into struct
nvme_bdev_io to know which io_path caused I/O error, or to reuse it
to avoid repeated traversal.

Besides, add a simple helper function nvme_io_path_is_available() to
check if the io_path can be reused.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idadd3a3188d9b333b335ea79e20a244aa0ce0bdd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9296
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-14 08:16:32 +00:00
Shuhei Matsumoto
e49f77ece3 bdev/nvme: find_io_path() returns io_path instead of ns and qpair
We have io_path structure now and returning io_path rather than
ns and qpair match the function name. The following patches will
cache the returned io_path into nvme_bdev_io.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5d773da18591fc324667f6b5c489a38f497bf3d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9295
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-14 08:16:32 +00:00
Shuhei Matsumoto
c19ec84378 bdev/nvme: Add multiple namespaces to a single nvme_bdev
This patch removes the critical limitation that ctrlrs which are
aggregated need to have no namespace. After this patch, we can
add multiple namespaces into a single nvme_bdev.

The conditions that such namespaces satisfy are,
- they are in the same NVM subsystem,
- they are in different ctrlrs,
- they are identical.

Additionally, if we add one or more namespaces to an existing
nvme_bdev and there are active nvme_bdev_channels, the corresponding
I/O paths are added to these nvme_bdev_channels.

Even after this patch, ANA state is not utilized in I/O paths yet.
It will be done in the following patches.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I15db35451e640d4beb99b138a4762243bee0d0f4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8131
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>
2021-10-14 08:16:32 +00:00
Jacek Kalwas
630db8c209 nvmf: rm parse trtype in create transport rpc
seems it is not required, string is used instead enum

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ic67af6cfa6f8e22a6593f904cd5b5c1b51cae6ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9623
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: Changpeng Liu <changpeng.liu@intel.com>
2021-10-13 07:40:33 +00:00
Liu Xiaodong
a3d93c468c bdev_nvme_rpc: NULL check for multipath
Pointer 'ctx->req.multipath' returned from call to
function 'strdup' may be NULL. Reported by Klocwork.

Change-Id: Id4a188ec5340f02c9bd0643db0acb03409dd5829
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9843
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: GangCao <gang.cao@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-13 07:40:23 +00:00
Michal Berger
0403d3736a test/nvmf: Nuke all SPDK net namespaces before starting tests
This is to make sure we won't lose any net interfaces needed for the
phy tests in case they got stuck behind lingering namespace.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ic83bc5cca8b536bb3e72fbceb31d2560d840d05e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9795
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: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-13 07:40:18 +00:00
Monica Kenguva
9221a0d81c test/accel: add UT for test_spdk_accel_submit_copy_crc32c()
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I1d70d0fccc7e251777a5568ce869bb47fbaefaca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9504
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-10-13 07:37:36 +00:00
Monica Kenguva
55ee29ec09 test/accel: add UT for test_spdk_accel_submit_crc32cv()
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Iefe925a61accea896e820cae5c401f1ceb8856e6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9503
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-10-13 07:37:36 +00:00
Monica Kenguva
24128a9703 test/accel: add UT for test_spdk_accel_submit_crc32c()
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I38d0e301399e0ba1e2196a1a109f36c3c4cd1cd9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9487
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-10-13 07:37:36 +00:00
Monica Kenguva
fb639b53b0 test/accel: add UT for test_spdk_accel_submit_fill()
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I6ecccb015ddc72b3d676d9607bf2ca79aa7435ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9486
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-13 07:37:36 +00:00
Monica Kenguva
b22cd665c9 test/accel: add UT for test_spdk_accel_submit_compare()
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: I3287353d76de226f950620f1a4702887d33b1686
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9297
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-13 07:37:36 +00:00
Monica Kenguva
2e736160e1 test/accel: add UT for test_spdk_accel_submit_dualcast()
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: If20750c3671e794b5079972c612743c5ab189862
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9285
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-10-13 07:37:36 +00:00
Jim Harris
355604bfb0 nvme_fuzz: simplify register_ns()
We can just always do the TAILQ_INITs for admin
related TAILQs.  Also no need to set anything to
NULL since the buffer was allocated using calloc.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifbbda0436e7f33e225cf14dbd103779080b106da
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9729
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: Changpeng Liu <changpeng.liu@intel.com>
2021-10-13 07:27:14 +00:00
Jim Harris
3ca8b72c9e nvme_compliance: test admin commands with fuse bits set
These commands should always fail.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0abfbe4a4a107957a3271692468fe69eeb823137
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9728
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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-10-13 07:27:14 +00:00
Jim Harris
eb3f756ce4 nvme_compliance: add test for IDENTIFY CNS=1
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I030e64fa8d679d2beebacf657f0c417c422533e4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9727
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-10-13 07:27:14 +00:00
Jacek Kalwas
a827fd7eec json: Added support for 8 bit unsigned value converter in json
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Id670be974f5d07f5292d338448cb0ada9510b105
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9787
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: Jim Harris <james.r.harris@intel.com>
2021-10-12 23:46:49 +00:00
Michal Berger
bec627fcb0 test/common: Supress mem leak triggered during nvme_fio test
This is needed since fio, by default, links to libtcmalloc if found
during the build. See:

01fe773df4

Fixes #2192

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I1de8fe9d489f92acb79ef0f169229a6c09ce1179
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9822
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.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>
2021-10-12 16:22:07 +00:00
Tomasz Zawadzki
f8a961f5ea scheduler_dynamic: prioritize g_main_lcore during _find_optimal_core
_find_optimal_core was always consolidating idle threads to g_main_lcore.
Meanwhile for active threads lower lcore id were prioritized over the
higher ones.

So long as g_main_lcore can fit the active thread, it should be prioritized
over any other. Regardless of the lcore id.

Fix #2080

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I30b3a7353bcf243d4362b4db9dde5446c435d675
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9243
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: Changpeng Liu <changpeng.liu@intel.com>
2021-10-12 09:10:32 +00:00
Shuhei Matsumoto
45dddbc891 scsi: Decide LUN format for each LUN ID
Previously we decided which LUN format is used by the macro constant
SPDK_SCSI_DEV_MAX_LUN. However, as long as we read SAM, the LUN format
can be decided per LUN ID.

Linux host SCSI driver supports 256 LUNs per SCSI device at the
maximum. So we cannot test this fix on any actual system but we
apply this fix for the potential future cases.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifa6a3b66431f5e1eade326348dd99b8b9653408b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9664
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: Jim Harris <james.r.harris@intel.com>
2021-10-12 09:10:18 +00:00
Shuhei Matsumoto
5e87727596 scsi: SCSI device supports 256 LUNs at the maximum by default
Most SCSI hosts, Linux, Windows, VMware, supports 256 LUNs per
device now, and it is not easy to test even if any other non-free
OS or driver supports more than 256 LUNs.

Hence increase the macro constant SPDK_SCSI_DEV_MAX_LUN from 64 to
256. Then we do not need to expose it publicly now. So move it to
lib/scsi/scsi_internal.h.

Update the CHANGELOG together.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iacde46c3854f326eebfb8befb47d41fce383b027
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9631
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: Jim Harris <james.r.harris@intel.com>
2021-10-12 09:10:18 +00:00
Shuhei Matsumoto
4265fc50d9 scsi: Manage LUNs per device by not fixed size array but linked list
Change a fixed size array to a linked list to manage LUNs per SCSI
device.

Keep the linked list sorted by LUN ID because this is necessary to
efficiently find the lowest free LUN ID or check the specified LUN is free.

To avoid traversing the linked list twice, change scsi_dev_find_free_lun()
to return the LUN which comes just before where we want to insert an new LUN.

Additionally, previously spdk_scsi_dev_add_lun_ext() had not checked if
the specified LUN ID was duplicated. Fix the bug in this patch.

Add unit test cases for the function scsi_dev_find_free_lun().

These changes will enable the following patches to increase
SPDK_SCSI_DEV_MAX_LUN from 64 to 256 without consuming additional memory.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7f6f070ddc680127cf86ae255055da2d1d29e4ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9630
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>
2021-10-12 09:10:18 +00:00
GangCao
e9030f36bc trace: add an assert for the valid history
Change-Id: I4dd97351354af8ccdd0684afda06e6f2e8889839
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9828
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-12 08:52:10 +00:00
Ben Walker
fa36884a78 bdev/nvme: Inline bdev_nvme_delete_secondary_trid
It can be much simpler when inlined.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ifad89d7b9557a45eee601fc2004066a0fd9289c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9826
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-12 08:52:01 +00:00
Ben Walker
be6a2feff2 bdev/nvme: bdev_nvme_delete now takes a path_id
Specifying only a transport id is not enough. We need to be able to
describe the host parameters too.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Iadbea553aee4b38e7cacab0b486e7e5746d0d1ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9825
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-12 08:52:01 +00:00
Ben Walker
128a921e95 bdev/nvme: Build an nvme_path_id in rpc_bdev_nvme_detach_controller
Change-Id: I463ee15480fbde3b113afc75fbe38032f59d3aad
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9577
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-12 08:52:01 +00:00
Ben Walker
7d28aae7fb bdev/nvme: Rename connected_trid to active_path_id
This is the currently active path identifier in a failover scenario. The
path is defined by more than just the transport identifier, so fix the
name.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I682c6f4c54f75307e2615bf80e70358180d99fe2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9576
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: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-10-12 08:52:01 +00:00
Ben Walker
0262859f3c bdev/nvme: Rename nvme_ctrlr_trid to nvme_path_id
This defines a unique path between a host and a target.

Change-Id: Ia3d24c1b34199a8b596aaf17900ca9694a9da77d
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9505
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-10-12 08:52:01 +00:00