Commit Graph

16962 Commits

Author SHA1 Message Date
John Levon
bc5f3a6f80 nvmf/vfio-user: allocate SQ requests individually
Since we already allocate ->sg on a per-request basis now, drop the
->reqs_internal allocation in favour of allocating individual requests
and placing them on the ->free_reqs queue, which simplifies the need to
track the array. For request abort, we'll use the ->outstanding request
list, now we have it, to find the victim request.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I25227ccd2ab7e00c8a2e7b2e2af2dc3b073584cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11427
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-02-09 16:06:52 +00:00
John Levon
cb3d98d596 nvmf: fix nvmf_tgt_create_poll_group() cleanup
On failure, we weren't cleaning up the poll group data properly, and in
one place, we were trying to remove ourselves from the tgt-> list prior
to being on it.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I9bbe5847b3703eba1ee1d762392ad3159a74ac8b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10717
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: Changpeng Liu <changpeng.liu@intel.com>
2022-02-09 16:06:52 +00:00
John Levon
3f585d3f3e nvmf: relocate nvmf_tgt_destroy_poll_group()
There's no need to forward-declare this, when we can just place it
before its consumers, and this will also help follow-up fixes.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I201bd966371db76a3b789473041799bf55b13c95
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11437
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: Changpeng Liu <changpeng.liu@intel.com>
2022-02-09 16:06:52 +00:00
John Levon
f9cb01ca11 nvmf/vfio-user: cleanup memory callbacks
Use of %p in logging simplifies this code a little bit.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I8e5daa59a614b8bcde7d67d1e5cc6196923031a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11244
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: Changpeng Liu <changpeng.liu@intel.com>
2022-02-09 16:06:52 +00:00
John Levon
58e75cf714 nvmf/vfio-user: avoid division in cq_is_full()
Avoid using the modulus operator in the hot-path cq_is_full(),
by aping how cq_tail_advance() is written.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Idbdf1715ab30d08233b38aa7691f0212ae93a542
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11445
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2022-02-09 16:06:52 +00:00
John Levon
b16da6ca62 nvmf/vfio-user: avoid division in sq_head_advance()
Avoid using the modulus operator in the hot-path sq_head_advance(),
by aping how cq_tail_advance() is written.

Suggested-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Id1e9d63a08e470344fdeb549d78ea505088b1a62
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11436
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: Changpeng Liu <changpeng.liu@intel.com>
2022-02-09 16:06:52 +00:00
John Levon
8fd0e680f2 nvmf/vfio-user: drop struct nvme_q
There is very little now shared between submission and completion
queues, so drop usage of this struct, folding its remaining members
into the relevant owning types.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I02195d1944ca9905ef03ddf2c099ddb806df70dc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11296
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: Changpeng Liu <changpeng.liu@intel.com>
2022-02-09 16:06:52 +00:00
John Levon
e05be3a05d nvmf/vfio-user: wrap head/tail accesses
Consistently wrap access to queue heads/tails, so it's easier to make
further changes. Adjust sqhd_advance() to match the head/tail naming of
the accessor functions, and move the definitions to be close to each
other.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: I197e230ecc4e67fe0207f29281d7e4ca946c22e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11295
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-02-09 16:06:52 +00:00
John Levon
c38e59182b nvmf/vfio-user: introduce nvme_q_mapping
Add a struct defining the local mapping of a queue.

Signed-off-by: John Levon <john.levon@nutanix.com>
Change-Id: Id3bbdf72bfc082f4496748571bd2617bdafe4309
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11294
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: Changpeng Liu <changpeng.liu@intel.com>
2022-02-09 16:06:52 +00:00
Konrad Sztyber
79415753ea bdev: register bdev's UUID as its alias
In many cases, addressing bdevs by their UUIDs is often easier than
using their names, which can be somewhat arbitrary.  For instance, the
NVMe bdev builds a name by addng the n{NSID} suffix to the controller's
name, while the UUID is filled with NGUID (if available).

The UUID alias is stored in the form defined by RFC 4122, meaning five
groups of lower-case hexadecimal characters.  It's important to note
that bdev layer uses case-sensitive name comparison, so the user needs
to use the same textual UUID representation.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I8b112fb81f29e952459d5f81d97fdc7a591730f8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11395
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>
2022-02-07 21:11:10 +00:00
Konrad Sztyber
a5895656ed test/match: support for matching UUIDs
The script can now match UUIDs via the $(UUID) marker.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ied11f9ce65e4f1102309523f3f8ec0ee7c9e74d0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11410
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: Ben Walker <benjamin.walker@intel.com>
2022-02-07 21:11:10 +00:00
Konrad Sztyber
36e9dc6f16 bdev: move queue initialization up in bdev_register
The initialization has no side effects, so it can be done earlier, which
allows for using functions that operate on these queues.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I36830d815b7b43687f369dba2a0999a6dcca5a14
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11394
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-07 21:11:10 +00:00
Konrad Sztyber
76add75f1b bdev: add internal bdev_alias_del
This function takes a function callback to be used to delete a name from
the global bdev name tree.  It makes it easy to delete an alias with or
without locking:

```
bdev_alias_del(bdev, alias, bdev_name_del);
```
or
```
pthread_mutex_lock(&g_bdev_mgr.mutex);
bdev_alias_del(bdev, alias, bdev_name_del_unsafe);
pthread_mutex_unlock(&g_bdev_mgr.mutex);
```

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ida2209d6618a4ce31a6f73da285626c3ecb658fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11393
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-02-07 21:11:10 +00:00
Konrad Sztyber
dcbba659a6 bdev: move the locks inside bdev_name_del
Additionally, added an unsafe version, bedv_name_del_unsafe, which can
be used while already holding the mutex.  It'll make it easier to remove
an alias without taking a lock.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: If986909cc52c9b9bdb6f429654b01b83b08b1ea3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11392
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-02-07 21:11:10 +00:00
Karol Latecki
8175ef2944 pkgdep/git: bump up nvme-cli version to 1.16
spdk_nvme_cli_cuse.sh fails with:

```
NVMe status: DATA_XFER_ERROR:
Error while trying to transfer the data or metadata(0x2004)
```

when running test with v1.15 version. v1.16 works just fine.

Fixes #2361

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ic058d652d1a8f7adc05fefbad58a5e24d31f2cc8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11408
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.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>
2022-02-07 17:44:18 +00:00
Jim Harris
c5d80a8bc3 blob: avoid recursion when split IO immmediately complete
In some scenarios, a split IO can immediately complete.  For
example, a very large unmap operation to a newly thin-provisioned
blob has no operations to perform, so the batch for its operation
immediately completes.

But if it immediately completes, we can't recursively submit
the next split IO.  So use variables in the context structure
to detect when an operation immediately completes, to allow
it to unwind and submit the next operation without recursing.

Fixes issue #2347.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8e4c121190c7d08152aa8de20cf6abc55b5edc46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11388
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-02-07 17:40:07 +00:00
Jim Harris
b6992a90d3 blob: add do/while (false) to blob_request_submit_op_split_next
No functional change here, this only prepares this function for
some functional changes in the next patch.  By adding the
do/while loop here we reduce the amount of whitespace changes
in the next patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I09d64fd1fb69ee232af1d298619c762e562fdc79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11387
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-02-07 17:40:07 +00:00
Karol Latecki
d4b8944881 test/nvmf: enable fio verify_backlog option
Using time_based tasks with do_verify=1 and rw=write
results in verification not being run. Basically
writes consume all run time and there's no time
left for verify:

fio: verification read phase will never start
because write phase uses all of runtime

Using verify_backlog we ask fio to verify after every
N blocks written.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I4c1571f4fad893e47cc5fea2ad6b4e2a7d8cc5ef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11376
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-02-04 21:58:18 +00:00
Tomasz Zawadzki
9dda3d60b9 lib/vhost: separate out rte_vhost code from vhost
This patch separates out rte_vhost code responsible for
vhost init/fini and vdev register/unregister from vhost.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie69ecd3b2659c805c9c0b0a0076996ef85c8fe71
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9535
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-02-04 21:57:42 +00:00
Karol Latecki
19d1b5f965 pkgdep/git: reduce irdma flush delay before building
Reducing this value causes "nvme disconnect" operations
to return much quicker.
Without this change disconnecting from Kernel Target takes
about 40-50 seconds, from SPDK Target about 2 minutes.

Fixes #1748

Change-Id: Ib74d89735b4345cbeaf172190356e2c63f168fd0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11309
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-04 21:06:34 +00:00
Michal Berger
639f6c3a60 pkgdep/git: Update available version of the IRDMA and ICE driver
Change-Id: Id7e4b41dd09426dc46f0b58eea6ee7309c1fa917
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10934
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
2022-02-04 21:06:34 +00:00
Mao Jiang
aa221ca1f8 test/nvmf/rdma: cases for creating rdma resources
Change-Id: I2e1d464c7bd76fdd49f673c0c5863ac17372c768
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8460
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-02-04 20:58:56 +00:00
Shuhei Matsumoto
2a99dbc792 nvmf: Support concurrent execution of multiple abort commands
We did not have any practical limitation to support concurrent
execution of multiple abort commands.

NVMe specification recommends that implementations support a minimum
of four abort commands.

Let's follow the NVMe specification.

As stated in the head, we do not have any limitation, and we do not
have to check if abort commands exceeds ACL or not.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I31e066fadcb5d619d0c50c895c4cb64520b33513
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11232
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-04 20:58:29 +00:00
Tomasz Zawadzki
6b9a980795 autobuild: skip doxygen 1.8.20 false positives
Doxygen 1.8.20 contains false positives that are fixed
in later version. Right now if that version of doxygen is used
in tests, any error is ignored. Please see:
(63330f6)autobuild: Ignore warnings comming from doxygen 1.8.20

The false positive is realted to:
https://github.com/doxygen/doxygen/issues/7948

This patch ignores only warnings releated to "\ilinebr"
processing in doxygen, reporting any other warnings.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I19595f35a2e6f66b9917133a19cf45394a240dbd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10388
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-04 20:58:00 +00:00
Richael Zhuang
f36c033c71 uring: fix bug when inserting sock into pending_recv list
There is io error when running NVMe over TCP fio test with uring
socket. It's easy to reproduce the bug with the following
configuration:
target 1 core, 16NVMe SSD, 2 initiators each connects to 8 NVMe
namespaces, each runs fio with numjobs=3.

For if in each round, we inset the sock to the head of the
pending_recv list, and then get max_events socks from head of the
list to process, there is possibility that some socks are always
not processed.
Although there was a strategy to cycle the pending_recv list to make
sure we poll things not in the same order. Such as a list: A B C D E F,
if max_events is 3, then this strategy makes the list is rearranged to
D E F A B C. But it will make this strategy not effective if using
TAILQ_INSERT_HEAD(&group->pending_recv, sock...).

Using TAILQ_INSERT_TAIL(&group->pending_recv, sock...) can fix it.

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: I8429b8eee29a9f9f820ad291d1b65ce2c2be22ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11154
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: Ben Walker <benjamin.walker@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2022-02-04 20:57:53 +00:00
Mike Gerdts
5eb363cf8c bdev_ut: UB due to small buffer
bdev_multi_allocation tries to write four characters, an integer between
0 and INT_MAX, and a nul byte into 10 characters. That requires at least
15 characters.

This leads to build failures with "make CONFIG_DEBUG=n CONFIG_UBSAN=y".

Change-Id: I8cb9fd4ede31ae24809e4a04fd60a67dae3a0ac4
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11261
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: Aleksey Marchuk <alexeymar@mellanox.com>
2022-02-03 20:08:35 +00:00
Mike Gerdts
7caa514f3c blob: blobcli should dump XATTR_INTERNAL
Refactor the code that dumps XATTR into a function.  Call this function
for XATTR and XATTR_INTERNAL.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ic0cb32b14f7a34e030a48e1ea468ec63172e2bf1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11256
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2022-02-03 20:07:58 +00:00
Mike Gerdts
ab2aad8553 blobcli: include bdev name in error message
When multiple bdevs are accessible by blobcli, it may be helpful to know
which bdev is giving the "Unsupported bdev event" error message.

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

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

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ibc631b6dc0576f81fa1e0b71bd0c18244823e4c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11353
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2022-02-03 20:07:58 +00:00
Mike Gerdts
a6c5feb0a2 blob: add forced recovery
Add the ability to open a blobstore in such a way that recovery happens
even if the superblock says it is clean.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I475e51beff24428d387446f7785e025294d2f014
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11253
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>
2022-02-03 20:07:58 +00:00
Jim Harris
893ad78814 blob: clarify that the blob is open in the iter_cb
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I543c3c2d54967884d704fc80214f0a1d6aa2db60
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11355
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-02-03 19:43:35 +00:00
Jim Harris
af1c4f7ffb lvol: finish initial iteration even if blob has no name
If we find a blob during the initial iteration during load
that doesn't have a name, we cannot just immediately
unload the blobstore, since the 'bad' blob is still
open.  Instead finish the iteration, and unload the
blobstore (with failure status) after the iteration
is complete.

This is somewhat related to issue #1831. By ensuring
we can unload the blobstore, it closes the open
descriptor on the underlying bdev, which allows
the bdev subsystem to exit on application shutdown.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7ecd189842704bb809f25c60efa8f81dcf8ca79c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11352
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-02-03 19:43:35 +00:00
Mike Gerdts
878bec9d73 doc/blob: replace htmlonly graphic with ASCII art
The htmlonly element that uses javascript to draw a diagram hinders
readability of the document in typical terminal-based editors, on
github/gitlab, etc. Not even the official documentation at
https://spdk.io/doc/blob.html renders it, at least in part because
Two.js is not present.

ASCII art can easily convey the same information in a much more
accessible way.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I5779d4639b1bee8a976d915d6853f11b05a35b71
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11269
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-02-02 08:25:02 +00:00
Mike Gerdts
b66f8df748 blob_ut: bs_opts initialized with wrong size
An spdk_bs_opts structure is sometimes partially initialized due to
using sizeof(opts) (struct spdk_blob_opts, 64 bytes) rather than
sizeof(bs_opts) (struct spdk_bs_opts, 72 bytes).

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Iaaa89bb419f66969d0888f49f8991c35b3dc5ea4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11268
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2022-02-02 08:25:02 +00:00
Mike Gerdts
9f9c7161c9 bdev_ut: test read-only bdev claim
While not documented as such, spdk_bdev_module_claim_bdev() has always
allowed a bdev that is opened read-only to remain read-only when
claimed. This occurs when NULL is passed in place of an spdk_bdev_desc.

This change updates the function's documentation to match the
implementation and adds a unit test to ensure the current behavior
remains.

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ief26de60e4408bfe1aa60b7a4e1d8adf273470b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11267
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2022-02-02 08:25:02 +00:00
Mike Gerdts
79ba049a6f thread: wrong_thread SEGV when NULL thread passed
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I7c121531eda9473b78c46332d6fdb1c8f71c88b7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11266
Reviewed-by: John Levon <levon@movementarian.org>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.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>
2022-02-02 08:25:02 +00:00
Mike Gerdts
9b72cda8b2 blob: fix spelling, white space, grammar
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I236c8a1c7f1ae4b0afd0d20175a1a2a647dba758
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11265
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2022-02-02 08:25:02 +00:00
Mike Gerdts
fae72b3464 blob: add logging for blobstore recovery
When a blobstore is not clean, a message is logged at the notice
level.  As other progress is made, messages are logged at the info
level.

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

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

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I5b574c1c2c4b4802aae3ba23d32ef58fb6fa7586
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11249
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-02-01 20:05:13 +00:00
Mike Gerdts
d715c82cc6 blob: print sequence and next while dumping pages
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: I2873633e435560ed1199b141851ba43fffcfe2c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11248
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>
2022-02-01 20:05:13 +00:00
Mike Gerdts
148bcefa85 blob: report bit arrays that reference each page
While dumping the blobstore with blobcli, read the super block and bit
arrays.  As each metadata page is dumped, indicate which bit arrays
reference the page.

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

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

Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Ic71eaaf1987609b4f705d372ced4240650b12684
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11245
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2022-02-01 20:05:13 +00:00
Tomasz Zawadzki
047c067c05 so_ver: increase all major versions
To allow SO_MINOR updates on LTS for the whole year it is supported,
the major version for all components needs to be increased.
This is to prevent scenario where two versions exists with matching
versions, but conflicting ABI.
Ex. Next SPDK release adds an API call increasing the minor version,
then LTS needs just a subset of those additions.

Increasing major so version after LTS, allows the future releases
to update versions as needed. Yet allowing LTS to increase minor
version separately.

Disabled test for increasing SO version without ABI change, as
that is goal of this patch. This check shall be removed with SPDK 22.05
release.

This patch:
- increases SO_VER by 1 for all components
- resets SO_MINOR to 0 for all components
- removes suppressions for ABI tests

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id1a5358882dc496faa5b0b5c9a63b326c378c551
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11361
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: Ben Walker <benjamin.walker@intel.com>
2022-01-31 15:29:56 +00:00
Michael Haeuptle
7a0c901a4c bdev/nvme: RPCs for adding/removing error injections
Provides RPCs for the qpair error injection APIs to bdev_nvme.
These RPCs are useful in testing NVMeoF/NVMe behavior for various
error scenarios in production.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Change-Id: I0db7995d7a712d4f8a60e643d564faa6908c3a55
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10992
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-01-31 09:51:07 +00:00
Alexey Marchuk
2ccaf2acfa bdev/nvme: Add transport_ack_timeout to bdev_nvme_set_options RPC
It may take a long time to detect network transport error
when e.g. port is removed on remote target. This timeout
depends on 2 parameters - retry_count and ack_timeout.
bdev_nvme_set_options supports configuration of retry_count
but transport_ack_timeout is missed. Note: this parameter
is used by RDMA transport only.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I7c3090dc8e4078f64d444e2392a9e0a6ecdc31c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11175
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: <tanl12@chinatelecom.cn>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-01-31 09:44:28 +00:00
Shuhei Matsumoto
cc797456f4 ut: Use unit/lib/json_mock.c for stubs
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I2cd488c17dbc92c381cd956ae0d6f5ca709a24dc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11263
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-01-31 09:44:28 +00:00
Shuhei Matsumoto
def45b4c07 ut/json_mock: Add stubs for json_write_uint8 and _uint16
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I260b958e0640f737ab77654fedc8007f92eec325
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11262
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>
2022-01-31 09:44:28 +00:00