Commit Graph

14223 Commits

Author SHA1 Message Date
Jim Harris
a27756993c identify: fix set-but-not-used error
Fixes: 5ef79a17ec (add an option to dump the full zns zone report)

max_zones_per_buf was only used in an assert.  Per-patch
testing doesn't do a release build, so this wasn't found
until running nightly tests.

So rework the code a bit to print error message and exit
instead of this unexpected condition occurs.

While here, change another error message to use stderr
instead of stdout.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2c2893089cc82f76d7dd6b569952dd4a9f907ebc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5949
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-01-15 22:44:31 +00:00
Tomasz Zawadzki
a9a0761bcc scripts/config_converter: skip sections not present in legacy config
Sections 'Nvme', 'Nvmf', 'Bdev' and 'iSCSI' were always present in
the output of config_converter. Even when they were not present in
the legacy config.

This posed an issue with iSCSI section. Support for iscsi_set_options
is part of lib/iscsi, that is not compiled with all applications
(such as nvmf_tgt).

Fixes #1741

This patch checks if there is corresponding section in the legacy
config, and only then presents the JSON output.

Added test to verify output from empty legacy config.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ief94e92115dbd80c890dcb434b7c6d5376421c9e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5879
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
2021-01-15 08:32:10 +00:00
Tomasz Zawadzki
25b3a770bd scripts/config_converter: remove always empty subsystems
JSON configuration that does not contain a particular
subsystem is a valid one. If needed, the defaults are always
present in the subsystem itself.

accel, interface, net_framework, scsi, nbd do not have
legacy configuration to convert. Including those in the
output of config_converter does not serve any purpose.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6442ac1b8f65ac7271102e782068846f86c2d09f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5878
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-15 08:32:10 +00:00
Niklas Cassel
5ef79a17ec examples/nvme/identify: add an option to dump the full zns zone report
Add a new option, -z, to dump the full zone report for
NVMe Zoned Namepaces.

Rather than allocating a buffer that can exactly hold the number
of zones we request, allocate a fixed size buffer of size MDTS.

That way, the controller will copy as many zones as it can,
while not exceeding the buffer. The nr_zones field in the
received report indicates the number of zones that were
successfully copied to the buffer.

The full zns zone report can be larger than MDTS, therefore
we now need to put the spdk_nvme_zns_report_zones() call
inside a loop.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: If3ff84876289a491d0482e74c58c5a11de7e19df
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5896
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:31:54 +00:00
Niklas Cassel
d3fe9591c2 examples/nvme/identify: exit after showing help text
Exit after showing the help text.

If the user specifies -H, it is confusing that
the regular execution of the program continues,
which might mislead the user to think that the
option they specified is not taking effect.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I52d8e0f6c720c7ce1d66bddb99181babb12cef1f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5895
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:31:54 +00:00
Liu Xiaodong
76c21d4138 intr_tgt: interruptable libs shown by modules.mk
Indicate interruptable module libaries by spdk.modules.mk
through INTR_BLOCKDEV_MODULES_LIST.
Other applications can directly use INTR_BLOCKDEV_MODULES_LIST
to create themselves to be interruptable.

Change-Id: Id1894dd3753c7b404ebb9d77f3184be942f6d216
Signed-off-by: Liu Xiaodong <xiaodong.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5782
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:31:42 +00:00
Ziye Yang
d478edd4ee lib/nvmf: Use the async function to caculate the crc32 for header_digest.
In this patch, we will use the accel library to do the crc32 work for the
header digest when sending the pdu in the target side.

For data digest support, will consider in the further patch.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I3169a158afd633f48bdbeb2cce1ed20e4141ae45
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5472
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:30:34 +00:00
Ziye Yang
a8ebf6ac53 nvmf perf test: Add the data integrity test.
Just change the test for QD=32 in order not adding the addtional
test time.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic801fffd904aecfd7ccdc89d04f67273dbdf2753
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5908
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:30:34 +00:00
Jin Yu
2969c5ab30 vhost-blk: recover ring base when reconnect
This patch is for packed ring and recover the ring
base when vhost target reconnect to QEMU.

Change-Id: I73f791b4a55adf9834112afd7dd7bb26c75a135d
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4128
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-01-15 08:30:18 +00:00
Jin Yu
4ad4c76cba vhost-blk: resubmit inflight descs of packed ring
This patch is for packed ring live recovery.
After reconnection we should resubmit the inflight descs.

Change-Id: I133bf5f1c09029d3c693c0fef67a609d72f2bf69
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4127
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>
Community-CI: Mellanox Build Bot
2021-01-15 08:30:18 +00:00
paul luse
ec2e6e2b91 modules/crypto/compress: changes to support DPDK mbuf changes
Need to manage how we store IO context based on DPDK updates
made in 19.11.

Fixes issue #1671

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If1183808cd30987b6c999912f563949b7ade7fcb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5799
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>
Community-CI: Mellanox Build Bot
2021-01-15 08:30:01 +00:00
Michal Berger
c3d5069947 pkgdep/git: Fix spdk_abi_lts build for v20.01 under make 4.3
This attempts to mimic commit 2a860943b8 from DPDK repo to pass the
build under make 4.3. Currently, this affects Fedora33 which ships
with make 4.3 by default.

Change-Id: If3afa8ad9200d618f43bbea42360efbfe99d3085
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5779
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-01-15 08:29:32 +00:00
Tomasz Zawadzki
95d8e7a683 lib/bdev: delay bdev_register notification til after examine
"bdev_register" notification was sent right when register
happened, which was misleading for any listener.
Action on the registered bdev might not have been possible
when examine took longer time.

Order of bdev_register notifications in json_config test
was modified, because they are being sent out as pollers
for the spdk_bdev_wait_for_examine() are being processed.
This is only because pollers are inserted at the tail,
and processed from the tail as well.

Order of notifications should not matter, as long as bdevs
are ready for use.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I45b769f184b386df2daa4152ee766636ef0668ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5213
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:57 +00:00
Tomasz Zawadzki
e57bb1afb8 lib/bdev: build bdev_wait_for_examine into subsystem
Since user/orchestration has no chance to call
bdev_wait_for_examine when loading json configuration,
this RPC is now always built into bdev subsystem json.

This behaviour was already there for SPDK_RPC_STARTUP,
see bdev_module_action_complete().
Yet it did not apply to SPDK_RPC_RUNTIME RPCs, as the
bdev module initialization was already complete.

Making sure all SPDK applications finish their startup
when all bdevs are ready to be used. See issue below:

Fixes #1675

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0f60f56932da020a15deeef09a5a1544f3a1bae6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5481
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:57 +00:00
Tomasz Zawadzki
c5c7de44f3 scripts/rpc: allow methods without params in load_config/load_subsystem_config RPC
JSON-RPC allows for methods that do not contain any params.
Turns out that so far this scenario has not occured for load_config or load_sybsystem_config
RPC, which processes JSON config file saved from previous app run.

Next patch writes out bdev_wait_for_examine to bdev subsystem
configuration. As that methods does not contain any params following
error was seen:
# /home/vagrant/spdk_repo/spdk/scripts/rpc.py load_config
Traceback (most recent call last):
  File "/home/vagrant/spdk_repo/spdk/scripts/rpc.py", line 2671, in <module>
    call_rpc_func(args)
  File "/home/vagrant/spdk_repo/spdk/scripts/rpc.py", line 2601, in call_rpc_func
    args.func(args)
  File "/home/vagrant/spdk_repo/spdk/scripts/rpc.py", line 100, in load_config
    include_aliases=args.include_aliases)
  File "/home/vagrant/spdk_repo/spdk/scripts/rpc/__init__.py", line 143, in load_config
    client.call(elem['method'], elem['params'])
KeyError: 'params'

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4a56a9d0caa4b752fb9c1fad4ae581aad8a4c2c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5860
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:57 +00:00
Tomasz Zawadzki
77b6f4bc3e lib/bdev: add spdk_bdev_wait_for_examine()
Add spdk_bdev_wait_for_examine() API to be called
in order to report when examine on all registered bdevs finished.
It will be built in to most bdev modules RPC.

New RPC added to allow
- building it into bdev submodule
- user/orchestration to verify examination status manually

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I27db3ae42eea3e692faeea4c2a01d04586bff438
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5480
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:57 +00:00
Tomasz Zawadzki
cc8e4443e5 lib/bdev: refactor out checking for module actions
This patch moves out check for all module actions to finish.
It will be used further down in the series for new RPC and as
new bdev API.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I24ff40de70f5ed1c8582e60dc23146d7bf9380fd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5212
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-01-15 08:28:57 +00:00
Maciej Szwed
89a922221d event: Fix SPDK_SCHEDULER_REGISTER macro
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I1b7d00f7ae2675e316eb64323966f8696357e7c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5897
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:30 +00:00
Maciej Szwed
6e3346df5b scheduler: Add option to provide scheduler period in framework_set_scheduler RPC
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I96a8937ffe8751f093227589b076a5ae77fa5f16
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5295
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:30 +00:00
Maciej Szwed
cc0d13f7e6 event: Change _spdk_scheduler_period_set() to use usec as argument instead of ticks
That is more inline with other places we
do things like this in SPDK. Also change
argument type to uint64_t.

Change-Id: Ie98f6c37bf53d583431ea9edd7d977075aeaa7a0
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5876
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:30 +00:00
Maciej Szwed
f3bf9f501a event: Set default scheduling period
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ieabe13803d0bb7013ca529da196cb1b5d2eacc98
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5434
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2021-01-15 08:28:30 +00:00
Maciej Szwed
584fb373eb scheduler: copy snapshot of thread stats to new spdk_lw_thread field
This will be used by a scheduler while balancing threads
to get information how much busy a thread is.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib0e897a9bb5d2a71173f60cce7e1d442e67a57f9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5253
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:30 +00:00
Maciej Szwed
75022aa205 event: Move scheduler set call and scheduling reactor set call
This fixes issue where scheduler is not being
initialized on first set.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I881438955f08852fb72187a2b92c7acfb12cd662
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5029
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-15 08:28:30 +00:00
Changpeng Liu
3962f9047a nvme: add quirks for new NVMe controller
Change-Id: Ice9da4b539b6c5955e449ec4d1ea18d580595caf
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5857
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-14 16:20:38 +00:00
Michael Haeuptle
02d3d439be nvme: New function to perform a NVMe subsystem reset
This commit introduces spdk_nvme_ctrlr_subsystem_reset to
perform a NVMe subsystem reset according to the NVMe spec.

Signed-off-by: Michael Haeuptle <michael.haeuptle@hpe.com>
Change-Id: If4ffae1bd92d4d16a62ec2b6a01f7373223b5705
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5488
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-14 16:20:29 +00:00
yidong0635
64739a7a24 module/bdev: Remove unnecessary code.
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I95a804f94ad6dac02243a029858ffae2d0ae26e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5883
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-14 16:20:05 +00:00
Ziye Yang
b48596efbc lib/nbd: Remove errno != EWOULDBLOCK in nbd_socket_rw
In this commit (a1d4a714b2),
we refactor the code but introduce the new error comparison.

And it causes the hang issue in some cases for RPC, so remove
it.

Change-Id: I4da802dff24b7efc27dd25a05739f1def37c1486
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5767
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: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-14 16:19:58 +00:00
Alexey Marchuk
01f2d0bd2d nvmf/rdma: Use RDMA provider memory translation
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I78420118d3ec1bf78c0301a51ab320503b6f2fca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5123
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-14 16:19:48 +00:00
Alexey Marchuk
b6efb964cd nvme/rdma: Use RDMA provider memory translation
Change-Id: Ie0995a55d252c0167b82ef54aaf7c7b8e5fd75d0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5122
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-14 16:19:48 +00:00
Alexey Marchuk
7fabdd12b6 rdma: Add functions to support memory translation
This is the first commit in a series which aim is to
unify MRs registration and memory translation in
NVMEoF target and NVME initiator RDMA transports.

Next patches will add usage of new functions in
RDMA transports.

Change-Id: I93153d497fc4554ced14edbe545961b78bda91e3
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5121
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-14 16:19:48 +00:00
Naresh Gottumukkala
f892089f92 nvmf/fc: Add flag to differentiate LS queue and non LS queue.
Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ic80c5de475b712b045ec4e9c31d4bc2fdbe395fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5828
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-14 16:18:25 +00:00
Naresh Gottumukkala
9f0b1d763a nvmf/fc: Extend nvmf_fc_lld_fini to take spdk_nvmf_transport_destroy_done_cb.
As LLD cleanup is asynchronous in nature, Pass the
spdk_nvmf_transport_destroy_done_cb to LLD and it will be called
once the cleanup is completed.

Dont forcefully remove fc_ports by nvmf_fc_port_cleanup function.
LLD will drive the fc_ports cleanup gracefully as part of nvmf_fc_lld_fini.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I537b9ea817eda26a0469114821e2288d2ba9d91c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5827
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-14 16:18:25 +00:00
Naresh Gottumukkala
74669b90fc nvmf/fc: Fix use after free issue.
As fc_req is freed in the previous step, using fc_req->hwqp
results in segfault. Fix this.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I9d82f62a24e8c139b1971466948fc5aa3513f4ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5826
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-14 16:18:25 +00:00
Naresh Gottumukkala
cf07c1f7be nvmf/fc: Use correct args in nvmf_fc_adm_evnt_hw_port_reset api.
Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I3d0b3a228479b21ea18c4ff7f9c41bc8879f630d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5825
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-14 16:18:25 +00:00
Naresh Gottumukkala
143c78a94c nvmf/fc: For ABTS search only in already established connections.
For ABTS search only in already established connections. Skip
any connections that are in process of establishing.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I824f14b38faaa6897d2e5a4c4564bbb0f8e2fd74
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5824
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-14 16:18:25 +00:00
Naresh Gottumukkala
61dfdd2a48 nvmf/fc: FC Priority tagging and VMID support.
Add support for FC priority tagging and VMID.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ic3b67e4a9bf33308fb08dedd0e2f39344d979f34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5822
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-14 16:18:25 +00:00
Naresh Gottumukkala
cfc716feb8 nvmf/fc: Handle out of order fused commands.
For FC, Fused commands ordering is not gauranteed but nvmf layer expects strict ordering.
FC LLD layer can reorder this out of order commands based on FC header CSN.
Introduce a new FUSED_WAITING state that can be used by LLD to keep waiting the out of order
data.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: I85eba0059f75ff3775f664e85ed2e4dc258d27a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5811
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-14 16:18:25 +00:00
Naresh Gottumukkala
e3c78a6453 nvmf/fc: Add support for hwport free admin api.
Currently we dont have an api to delete fc port. Add SPDK_FC_HW_PORT_FREE
api. This is useful in cases of hardware reset and other error cases.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ib1b986ee7ab2f54043bd300b52121b651c292e5b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5810
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-14 16:18:25 +00:00
Naresh Gottumukkala
dc0d896293 nvmf/fc: Cleanup pollgroup and hwqp mapping logic.
1) As part of nvmf_fc_adm_evnt_hw_port_offline event, We try to remove
hwqps from pollgroup but we dont actually wait the action to complete.
Wait for the action to complete before completing nvmf_fc_adm_evnt_hw_port_offline
as this will serialise things nicely.

2) Protect fgroup->hwqp_count inside the transport lock as there can be
races where an fgroup can be removed paralley.

Signed-off-by: Naresh Gottumukkala <raju.gottumukkala@broadcom.com>
Change-Id: Ib7af6bc0641c91e40331da2b2a7e72b5f55d54ae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5808
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-14 16:18:25 +00:00
Karol Latecki
65291a30ec dpdk: update dpdk-20.08 submodule
Update to include RHEL 8.3 fix located at
4073acbe61d232623d910fa93c672bc7ee8bf3b9

Change-Id: I958218eeb4e2abdaea6f751d8151797ea12822e5
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5836
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-01-14 12:10:28 +00:00
Changpeng Liu
fb27c710f2 vhost/blk: make packed and split vring process in different function call
Code cleanup to make the code looks more clear, this helps the coming
inflight IOs support for packed ring.

Change-Id: Iebca17e01e597eab2a920dd7f38056c57ae2cd11
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5755
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: JinYu <jin.yu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-01-13 10:08:11 +00:00
Changpeng Liu
99c62dda60 vhost/blk: make process_blk_request() only process virtio_blk request
Previously the function also get the payload from vring descriptors,
this mixed the process of vring and virtio_blk together, now it's
only related with virtio_blk.

Also this make the resubmission process more clear.

Change-Id: I6dd17cf9e30dde99e50a7c6d345b6eee7fa5b758
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5754
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: JinYu <jin.yu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-13 10:08:11 +00:00
Shuhei Matsumoto
6fdc71ec18 lib/thread: Defer exiting thread if thread is unregistering io_device
Current SPDK thread library has a issue which occurs if there is
a race between exiting thread and unregistering io_device.

For example, there are two threads. Thread 1 registers a device
and thread 2 gets a channel of the device. Then if thread 1 starts
exiting and unregisters the device, and then thread 2 puts the channel,
thread 2 sends a message to thread 1 to complete releasing the device,
thread 1 already moved exited. Hence thread 2 failed to send the
message.

This patch fixes the race issue. The code is verified by adding
a unit test case.

In detail, add a count, unregistering_dev, to struct spdk_thread,
increment it if a callback is specified to spdk_io_device_unregister(),
and then decrement it in _finish_unregister(), and thread_exit()
checks if it is zero.

The contents of struct spdk_thread is changed but it is not public
data structure, and hence suppress it for ABI testing.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idf5faa55335c3ea89f47ccce32687a6be2e26c68
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5796
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-01-13 10:07:51 +00:00
yidong0635
ad583422ce lib/event: Fix SEGV causing by spdk_app_stop executing twice.
Bdevperf shutdown_cb calls spdk_app_stop(0) directly.
 But since json configuration also failed, spdk_rpc_initialize()
 that calls spdk_app_stop, with -EINVAL. So subsystems are shutdown twice.

 Adding a flag stopped in spdk_app to record the spdk_app status.
 This confirms spdk app one start and one stop.

 Meanwhile this fixes some SEGVS.

 Fixes issue: #1731.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ic3e36a458813a2d6bcf806de67ab691446b8d6fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5802
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2021-01-13 10:07:44 +00:00
Michal Berger
2212610cd1 pgkdep/freebsd: Use py37-pycodestyle
py27-pycodestyle was dropped and is no longer available for the
amd64 arch. Use py37-pycodestyle instead (it should be available for
other common architectures too).

Change-Id: Icb56860d358e2fa06f202a47302a5005b32708e3
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5877
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-01-13 10:07:31 +00:00
Jim Harris
da5e62782f bdev/nvme: detect failed async probe
Track whether we attached a controller while
polling the probe ctx.  If we didn't when the probe
ctx is done, then it means the controller failed to
attach and we need to free the ctx.

Fixes issue #1723.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia7f040a073e4c824c29c0ed493f8391b69f94174
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5818
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-01-13 10:07:11 +00:00
Shuhei Matsumoto
60601e8cfb bdev/ocssd: Get nvme_ns from nvme_bdev via helper function for configuration
Use nvme_bdev_to_bdev_ns() for configuration.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I33ff9889a3677d96f714256542d1959e879542e5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5872
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-13 10:06:48 +00:00
Shuhei Matsumoto
d86477bff3 bdev/nvme: Get nvme_ns from nvme_bdev via helper function for configuration
When multipath is supported, nvme_bdev_ns will be got via bdev_subsystem.
To make such change invisible, add a helper function
nvme_bdev_to_bdev_ns() and use it in bdev_nvme_io_type_supported()
and bdev_nvme_dump_info_json().

Inline the function and locate it in common.h to use for ocssd_bdev
too.

ctrlr can be got from ns using spdk_nvme_ns_get_ctrlr().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: If85c86737e8194b8e34ed62df04a3968443f23bb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5795
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-13 10:06:48 +00:00
Shuhei Matsumoto
e995690fbc bdev/nvme: nvme_bdev remembers if opal is enabled or not
This is helpful to simplify bdev_nvme_dump_info_json() when supporting
multipath.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7cf7712b8ee8ac6f15354a46dee2edbacbdeafcf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5794
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-13 10:06:48 +00:00
Shuhei Matsumoto
885dd11225 bdev/ocssd: Factor out finding I/O path, nvme_ns and qpair, at I/O submission
Use bdev_nvme_find_io_path() for ocssd_bdev too.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9e7169821fb03f397a6ff240e704cd1c425eaeeb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5820
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-01-13 10:06:48 +00:00