Commit Graph

13641 Commits

Author SHA1 Message Date
Maciej Wawryk
5df2c9a343 test/vhost: add -f for mkfs.btrfs command
During tests with new qcow2 image there is error:
    ERROR: use the -f option to force overwrite of /dev/sdb1
when creating filesystem using mkfs.btrfs, adding -f
resolve this issue.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: If6548d3d5781e2b46f794422144e2a635e700559
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4660
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 12:19:38 +00:00
Krzysztof Karas
3c408dd5a6 etc: Remove etc directory
SPDK is removing legacy INI style configuration
and the examples in this dir are representing
and documenting it.

Those should be removed, instead of being converted.
Because JSON does not support inline comments
and all of the JSON RPC is already documented
extensively https://spdk.io/doc/jsonrpc.html.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I8609bc107736aea53e9d64e05d0d3221bd73b567
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4782
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 12:19:10 +00:00
Shuhei Matsumoto
9d3afe1f50 CHANGELOG: NVMe-oF target supports ANA Reporting and provides multipath
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8a444ffaf8d4a167ac19fb3cf280887620acfac3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4781
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>
2020-10-21 12:19:01 +00:00
Shuhei Matsumoto
e99ac03100 CHANGELOG: Configuring TCP delayed ACK feature
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9cc1b5f1bf43682bff6aa876a27ff5f2409fd12d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4778
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>
2020-10-21 12:19:01 +00:00
Shuhei Matsumoto
5dcbf54bcf CHANGELOG: iSCSI login redirection feature
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifb41571137e5007b4a018e1bdcda13d62b336b84
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4777
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-21 12:19:01 +00:00
Shuhei Matsumoto
44ac74e8b3 CHANGELOG: NVMe async detach and adding namespace to NVMe-oF subsystem
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I12f083d694d1e5c6b3edec9635f9e81b6ccc6390
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4776
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>
Community-CI: Broadcom CI
2020-10-21 12:19:01 +00:00
Tomasz Zawadzki
0798ddf723 test/json: remove virtio-nvme RPC
The virtio nvme was removed from SPDK, so this TODO
would never get implemented.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iafa701249ed3fafa45d028f2bb929a024b78a0b6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4784
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 12:18:52 +00:00
Tomasz Zawadzki
887a0e0347 Revert "test/vhost: workaround issue #1583 by specifying --vq-count"
This reverts commit cff7c8f1f7.

DPDK submodule is updated with the actual fix:
(9471c59) vhost: fix external backends readiness
https://review.spdk.io/gerrit/c/spdk/dpdk/+/4219

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I130d1d0b7aab86f3eb2bf420aa8644d4607e1eeb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4783
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 12:18:52 +00:00
Niklas Cassel
3301f8214b examples/nvme/identify: print zone report excerpt for zoned namespaces
If the namespace is a zoned namespace, get and print a zone report.

Since a ZNS drive can have thousands of zones, request a zone report
containing only the first 8 zones.
The code does take a ZNS drive with less than 8 zones into account,
even though such a drive is unlikely to exist in the wild.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I28ecb4d7c60ab5a911d7b1faae595f43ef6706e1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4794
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
2020-10-21 12:18:44 +00:00
Niklas Cassel
6dec7623be nvme: add support for ZNS zone management receive command
Add support for the ZNS zone management receive command.
An internal nvme_zns_zone_mgmt_recv() function is created
that matches the parameters of the zone management receive
function in the ZNS specification.

Convenience functions are provided for the following
Zone Receive Action: Report Zones.

Zone Receive Actions not implemented: Extended Report
Zones.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I23589a602336da5dffccec7230d07026a868e81b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4793
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 12:18:44 +00:00
Niklas Cassel
be3ff9c0b5 nvme: add function to get ZNS num zones
Add a function to get the number of zones for a zoned namespace.

Since the ZNS specification does not allow zone size == 0,
divide by zero should not be possible on a spec compliant drive.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I15e0ac8a72e244e248b7fb44f7156b182ecd98b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4792
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
2020-10-21 12:18:44 +00:00
Niklas Cassel
6abee9a205 nvme: add function to get ZNS zone size
Add a function to get the zone size of a zoned namespace.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I89429fa2fd36307a8b34bdf91e3251c68596a48c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4791
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>
Community-CI: Broadcom CI
2020-10-21 12:18:44 +00:00
Tomasz Zawadzki
6511969c3b event: remove subsystem legacy config print
This patch removes callback function for subsystems to
present their options for legacy config.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I63076fc03eff45da5d57fab03501602922a20e3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4749
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-21 02:25:45 +00:00
Tomasz Zawadzki
28ebb8cc78 bdev_module: remove config_text
This patch removes function for bdev modules to
present options of the bdevs.

blob_bdev.h refers to the spdk_bdev_module, so would need
to be bumped too.
At this time spdk_bdev_module is left unchanged to prevent
that.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3cacb087c998d928c5d8c2722b7f041d82bb43f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4748
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
2020-10-21 02:25:45 +00:00
Ivan Betsis
bd3840a729 nvmf/rdma: Add RPC to set new RDMA batching option
Add option to enable/disable work requests batching (RDMA only).

Signed-off-by: Ivan Betsis <c_ivanb@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Change-Id: I84ca599711cdc2713606444e7ec501c36671e796
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/925
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
2020-10-21 02:25:32 +00:00
Ivan Betsis
c818233b41 nvmf/rdma: Add WR batch rdma new transport option
With x86 and low queue depths with multiple QPs/initiators
there is a benefit from disable batch when we have randread IO pattern.

Testing environment: x86, Intel(R) Xeon(R) Silver 4116 CPU @ 2.10GH
Several results:
init_cores | QD | BS | Avg IOPs/BW without batch | Avg IOPS/BW with batch
  8 cores  | 4  | 4K |     1870087 / 7305        |     1594014 / 6226
  8 cores  | 8  | 4K |     1853573 / 7240        |     1576400 / 6157
  8 cores  | 16 | 4K |     1819643 / 7108        |     1569487 / 6130
  8 cores  | 32 | 4K |     1815467 / 7092        |     1569909 / 6132
 16 cores  | 4  | 4K |     1908018 / 7453        |     1566843 / 6120
 16 cores  | 8  | 4K |     1906081 / 7446        |     1562110 / 6102
 16 cores  | 16 | 4K |     1880706 / 7346        |     1555060 / 6074
 16 cores  | 32 | 4K |     1835878 / 7171        |     1548156 / 6046

Signed-off-by: Ivan Betsis <c_ivanb@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Change-Id: Icdbbbdf83f137eb4f05bd2063268ee2a7d87335a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/924
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
2020-10-21 02:25:32 +00:00
Shuhei Matsumoto
938d2ae254 test/nvme: Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async()
Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async() with
a local variable detach_ctx to detach multiple controllers.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I77cdc07ddfcd97569e31eeb245cd4e5a26289dbd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4441
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 16:55:55 +00:00
Shuhei Matsumoto
7a85c283d9 test/app: Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async()
Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async() with
a local variable detach_ctx to detach multiple controllers.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I43428a41df2b6f26b62cf03990d35add9a3663d6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4440
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 16:55:55 +00:00
Shuhei Matsumoto
0a903c91ac examples/nvme: Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async()
Use spdk_nvme_detach_async() and spdk_nvme_detach_poll_async() with
a local variable detach_ctx to detach multiple controllers.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I05c504428df56f4ab5d1ffdd19ac81e6c062c89d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4439
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 16:55:55 +00:00
Shuhei Matsumoto
d8f4bbeb43 lib/nvme: Add spdk_nvme_detach_async() and spdk_nvme_detach_poll_async()
Add two new public APIs, spdk_nvme_detach_async() and
spdk_nvme_detach_poll_async() to detach multiple controllers in parallel
as a simple manner to users.

Hold the target controller to nvme_ctrlr_detach_ctx because users
will free any object which held it after returning spdk_nvme_detach_async().

spdk_nvme_detach_ctx holds all nvme_ctrlr_detach_ctx in a sequence
by linked list.

spdk_nvme_detach_ctx has a boolean variable polling_started to prevent
the user from calling spdk_nvme_detach_async() while
spdk_nvme_detach_poll_async() is called repeatedly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>i
Change-Id: Ib049c19f7ef24410b963fd5c777a21184f3012d1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4758
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-20 16:55:55 +00:00
Shuhei Matsumoto
ea1bfd84cd lib/nvme: Make internal of spdk_nvme_detach() asynchronous
Add two new helper functions, nvme_ctrlr_detach_async() and
nvme_ctrlr_detach_poll_async() to make the internal of
spdk_nvme_detach() asynchronous.

Use callback function to remove controller from the attached list after
completing shutdown and before freeing to avoid conflict between
attach and detach.

Update MOCKs in the corresponding unit test cases.

The next patch will add two public APIs spdk_nvme_detach_async()
and spdk_nvme_detach_poll_async() based on this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifbdfec2a1facde9354007c6248f280e245a36eed
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4416
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-20 16:55:55 +00:00
Shuhei Matsumoto
3806b2e1f9 lib/nvme: Make nvme_ctrlr_destruct() asynchronous
Following the last patch, separate nvme_ctrlr_destruct()
into nvme_ctrlr_destruct_async() and nvme_ctrlr_destruct_poll_async(),
but keep nvme_ctrlr_destruct() by replacing the internal by
nvme_ctrlr_destruct_async() and nvme_ctrlr_destruct_poll_async().

Add shutdown_complete to nvme_ctrlr_detach_ctx. If shutdown_complete is true,
we can destruct the controller. The case that nvme_ctrlr_shutdown_async()
failed sets shutdown_complete to true. The case that nvme_ctrlr_disable()
is called sets shutdown_complete to true unconditionally.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3994e259f9d3ccf8fede3ac03aadef911eefb9dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4415
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@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>
2020-10-20 16:55:55 +00:00
Shuhei Matsumoto
257fcb7352 lib/nvme: Make nvme_ctrlr_shutdown() asynchronous
This patch is the first of the patch series to make spdk_nvme_detach()
asynchronous.

We have lengthy shutdown notification, i.e., we have to wait a long time
until shutdown processing is completed, in some SSDs. If the running system
has many such SSDs, we see large intolerable delay.

SPDK provides a controller option, no_shn_notification as a workaround.
We can use the workaround if the use case of the detach is to switch to
the next application without system reboot. However, we cannot use the
workaround if we want to do system reboot after detach.

To mitigate such lengthy shutdown notification, we need to parallelize
detachment among SSDs.

Hence the patch series will introduce an asynchronous detach API and
will use the API to parallelize detachment.

This patch adds the following changes.

Introduce a context structure and separate nvme_ctrlr_shutdown()
itno nvme_ctrlr_shutdown_async() and nvme_ctrlr_shutdown_poll_async()
using the context structure.

Name the context structure as nvme_ctrlr_detach_ctx because it will be
used only in internal APIs. The upcoming public APIs will support
multiple detachment and will have the contest structure named as
spdk_nvme_detach_ctx.

Use TSC instead of counter because polling interval will be controlled
by the caller.

Use the convenient macro, SPDK_CEIL_DIV(), to round off the time
value in milliseconds.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9e2355fd24b6d6a4d6c1813577d53822304d4f33
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4414
Reviewed-by: Jacek Kalwas <jacek.kalwas@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 16:55:55 +00:00
Shuhei Matsumoto
c865839736 examples/blob_cli: Use spdk_bdev_create_bs_dev_ext() to pass bdev_name
Update a few print outputs to out not product name but bdev name
because bdev pointer is not available there after replacing
spdk_bdev_get_by_name() and spdk_bdev_open() by spdk_bdev_open_ext().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I624fea3a0a12c1049e950bddae8cea9f88b16db5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4702
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-10-20 15:27:38 +00:00
Shuhei Matsumoto
97901dca7c examples/hello_blob: Use spdk_bdev_create_bs_dev_ext() to pass bdev_name
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I932d46fc4c8e6d2de0e8f92c0c8a7965032ccb17
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4703
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>
2020-10-20 15:27:38 +00:00
yidong0635
2e0dafb305 test/reset: put unregister_worker after unregister_controllers.
From the log we can see that it reports ns_ctx was freed before it
was used. In unregister_controller, it still need ns_ctx to do io_complete.

And now this app works as a signle worker to do something.
Just need to change the order, execute unregister_worker after
unregister_controllers.

Fixes issue #1626

tested on clearlinux.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I392ff168abb862ba236a24b775fb31bb341e2157
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4761
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>
2020-10-20 14:05:51 +00:00
Niklas Cassel
998ec7b094 nvme/hello_world: for zoned namespaces, reset the zone before write
If the namespace is a zoned namespace, reset the zone starting at
LBA 0, before doing the "Hello world!" write to LBA 0.

This is done to ensure that the write pointer for the first zone
is at LBA 0.

We need to do this since a regular write on a zoned namespace
to an LBA that is not equal to the write pointer results in a
Zone Invalid Write I/O error.

Therefore, if we don't do a zone reset before doing the write,
the write would fail if there already were data written to the
first zone. (E.g. if the user ran the hello_world example twice.)

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I0ee972b4cc40bc5ebd476105d0b180a07cfe5a76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4683
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>
2020-10-20 12:18:56 +00:00
Niklas Cassel
67475a58f4 nvme: add support for ZNS zone management send command
Add support for the ZNS zone management send command.
An internal nvme_zns_zone_mgmt_send() function is created
that matches the parameters of the zone management send
function in the ZNS specification.

Convenience functions are provided for the following
Zone Send Actions: Close Zone, Finish Zone, Open Zone,
Reset Zone, and Offline Zone.

Zone Send Actions not implemented: Set Zone Descriptor
Extension.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I9cc04776c249d2b9c515438b81a0f06aea4198fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4682
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>
2020-10-20 12:18:56 +00:00
Niklas Cassel
3be2935701 nvme: move ZNS specific functions to their own header file
Move ZNS specific functions to their own header file:
include/spdk/nvme_zns.h.
This is similar to how it's done for e.g. NVMe-oF with
include/spdk/nvmf.h.

This avoids cluttering the nvme.h header with ZNS specific functions.

A SPDK program that wants to use the spdk_nvme_zns_* functions will
need to include include/spdk/nvme_zns.h, however, this is similar
to how e.g. spdk_nvmf namespaced functions work.
This change is safe to do now, since there is no SPDK release with
ZNS so far.

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: If39fab4e7a6924cc3bd67aa0c03e9c6de5f8a324
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4681
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>
2020-10-20 12:18:56 +00:00
Niklas Cassel
198a3ad2fd nvme: if no command set is requested, use the most reasonable default
Since namespace types were introduced in NVMe, the CC.CSS register
has a new value (SPDK_NVME_CC_CSS_IOCS) which indicates that all
supported command sets should be selected/enabled. This possibly
includes command sets other than NVM and ADMIN only.

Therefore, if a SPDK application wants enable all the command sets
that the controller supports, it has to explicitly set
opts->command_set to SPDK_NVME_CC_CSS_IOCS.

To avoid possibly a lot of SPDK applications having to set this
parameter, check if the user requested a command set explicitly,
if not, make SPDK automatically use the most reasonable default,
based on the supported bits set by the controller.
The most common case is that you want to enable (all) the command
sets that the controller supports.

A user will still be able to restrict the controller to only use
the NVM command set (or ADMIN only), by setting opts->command_set
to a specific value.

Since the current default command set value specified by
spdk_nvme_ctrlr_get_default_ctrlr_opts() is SPDK_NVME_CC_CSS_NVM,
which is defined as 0, we cannot know if the user specified a
command set explicitly or not.
To solve this, change the default command set value specified by
spdk_nvme_ctrlr_get_default_ctrlr_opts() to CHAR_BIT (0x8), which
is larger than the largest value that can be set in CS.CSS (which
is only 3 bits wide, thus 0x7).

Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Change-Id: I45ec148d3667ab87c41fbfb6d6612a1e0e5c9d9c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4701
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-10-20 12:18:56 +00:00
Tomasz Zawadzki
20b7b660c9 test/lvol: rename lvol test script
After the large effort of moving lvol tests from
python to bash, the original lvol.sh was removed.
Only lvol2.sh remained.

Just rename the script to its original name.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5c0a239b01c111f0b11f554caaebfec372877c6d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4561
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>
2020-10-20 08:54:53 +00:00
Karol Latecki
af62eb57fc autopackage.sh: add flag for release builds
Using another flag for the conditional will let us
run release build test in selected job configurations
for per-patch testing on CI side, not just for nightly
tests.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: Ib9de1c98bf6d7380670f22321f2df7784f2517de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4734
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>
2020-10-20 08:54:40 +00:00
Karol Latecki
d526c73c61 autobuild.sh: replace --disable-debug
Using "get_config_params" and appending --disable-
debug results in contradictory options on the same
./configure line. Sed out "--enable-debug" instead.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I465f38b4c63ab7a6ae824c7932b2548fdb362ff3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4733
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>
2020-10-20 08:54:40 +00:00
Karol Latecki
63a6e3ba31 Add requirements.txt for Python Pip
“Requirements files” are files containing a list of items
to be installed using pip install. We're going to need
this for SNYK scans. We can also later use this file
in our pkgdep.sh installation script.

Change-Id: I3224f21ee4cbe170c9840aac38156eeee627c257
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4532
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-20 08:54:25 +00:00
Tomasz Zawadzki
6d86242dc5 subsystem/iscsi: remove legacy config support
This patch removes legacy config support in iscsi subsystem.
All options through the legacy config are already reflected in JSON.

Following RPCs are corresponding to removed legacy config sections:
Initiator groups - iscsi_create_initiator_group and iscsi_initiator_group_*
Subsystem options - iscsi_set_options
Portal groups - iscsi_create_portal_group
Target node - iscsi_create_target_node and iscsi_target_node_*

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I11326a84d4d580b19db422b8522198eea5a5be0d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4747
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-10-20 08:53:53 +00:00
Shuhei Matsumoto
2842056073 blobfs_bdev: Use spdk_bdev_create_bs_dev_ext() instead of spdk_bdev_create_bs_dev_from_desc()
Replace all calls of spdk_bdev_create_bs_dev_from_desc() and
spdk_bdev_open_ext() by calls of spdk_bdev_create_bs_dev_ext()
including unit tests.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idb9dc5a10f6e221c26e82e0194930cb7a2071dae

Change-Id: I61e577db9e26ef3e1c3e2e4093ad66922a178f34
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4723
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
b6cbf872eb bdev/lvol: Pass bdev name instead of bdev pointer to vbdev_lvs_create
Change the first parameter of vbdev_lvs_create() from bdev pointer
to bdev name, and then remove spdk_bdev_get_by_name() from
rpc_bdev_lvol_create_lvolstore().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9b0e47f551657f6aa1235af37a8357b0af62d414
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4707
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
3ea2bffb9e blob/bdev: Add function pointer get_base_bdev to struct spdk_bs_dev
spdk_bdev_create_bs_dev_ext() gets not bdev pointer but bdev name
as an argument, and hence vbdev_lvs_create() will get bdev name
accordingly.

However after completing spdk_bdev_create_bs_dev_ext(),
vbdev_lvs_create() has to get bdev pointer from the created bs_dev.

Hence add a function pointer get_base_bdev to struct spdk_bs_dev
and set it to bdev_blob_get_base_bdev() at initialization.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idef0663ace85db0269442212014286669c150069
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4706
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
6051368da9 bdev/lvol: Use spdk_bdev_create_bs_dev_ext() when creating lvol store
This is a drop-in replacement. The following patches will remove
spdk_bdev_get_by_name() from the operation to create lvol store.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I31688cf98625f1d13012281d89f06d343e2f2cef
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4705
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
9b32f4858c lib/rocksdb Use spdk_bdev_create_bs_dev_ext() to pass bdev_name
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4acce43baa95d0968b7b568e87fade1972efc646
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4704
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
6a72c19ee2 blob/bdev: Add an API spdk_bdev_create_bs_dev_ext()
spdk_bdev_open_ext() requires the caller to use bdev_event_cb_t
and bdev_event_cb_t is more extensible than bdev_remove_cb_t.
Hence use bdev_event_t as an argument.

spdk_bdev_open_ext() calls spdk_bdev_get_by_name() inside and
spdk_bdev_create_bs_dev_ext() calls spdk_bdev_open_ext() inside.
The caller needs to know if the spdk_bdev_get_by_name() succeeded.
Hence spdk_bdev_create_bs_dev_ext() returns return code by return
value and returns the created bs_dev by double pointer.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1c225bfb66db036439c69c459f39c86684d8a540
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4692
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
778e21aabd blob/bdev: Factor out the common blob_bdev initialization
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icdcc8b57198cd697921b025edfc8ba8f61bf0764
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4691
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
94d6e332bc ut/nvmf_ctrlr_discovery: Remove spdk_bdev_open() stub because it is not used
Remove the stub for spdk_bdev_open() and use the DEFINE_STUB_V macro
to the stub for spdk_bdev_close().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I84df06b4b73e1f5af5c2c8854f1613e8a413533b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4729
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
6a684a349e ut/bdev_mt: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
Replace all spdk_bdev_open() calls by spdk_bdev_open_ext() calls
in the multiple SPDK threads cases of the unit tests for lib/bdev.c.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I65591f12f8737bb8a0c1256fa84c5b6dac481150
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4728
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
75dfecbb16 ut/bdev: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
Replace most spdk_bdev_open() calls by spdk_bdev_open_ext() calls
in the unit test for lib/bdev.c.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifbb8a7338b1d99808c96c87be1cfbee145b0d21f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4727
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Shuhei Matsumoto
d163fc1820 app/spdk_dd: Use spdk_bdev_open_ext() instead of spdk_bdev_open()
This is a drop-in replacement.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icf8e90fee4a3ffc70f68e346cabbfc87591bab73
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4726
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 08:52:29 +00:00
Tomasz Zawadzki
cda1d2cf11 build: remove unused references to conf library
- Removed slew of conf.h includes
- No longer require mk vars that include conf

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ica7e8e8bf1d4a5d0b0200bfe689aa13afd77bfaf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4746
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>
2020-10-20 02:42:16 +00:00
Tomasz Zawadzki
9103bca73b lib/event: remove deprecated ReactorMask from legacy config
Legacy INI configuration is being removed this release.
This patch removes one of its options and always uses the
SPDK_APP_DPDK_DEFAULT_CORE_MASK as default core mask.

That can only be overwriten by -m/--cpumask arguments in app.

In bdevperf there was no reason to set reactor_mask to NULL,
as that was then still using the defaults.

Meanwhile bdev_svc will now check if user provided different
string via command line args to know if it should
unaffinitize its thread.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id882f8d7dbdd07b7743bd5981c37daa888b7872a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4619
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>
2020-10-20 02:42:16 +00:00
Tomasz Zawadzki
5b1e154a5c bdev: remove legacy config support
This patch removes legacy config support in bdev layer.
All options through the legacy config are already reflected in JSON.

Removed configuration can be set via `bdev_set_options` and
`bdev_set_qos_limit` RPC.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I24c365625540659cad425268d2aa41e3bf279d5d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4645
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>
2020-10-20 02:42:16 +00:00
Tomasz Zawadzki
a8de86e9aa lib/accel: remove legacy config support for accel module register
Since legacy config is being removed, SPDK_ACCEL_MODULE_REGISTER
macro no longer needs field corresponding to processing this
type of configuration.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I76ca02487a5fb8f9ecc9d33ac6fa514e7226a03b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4636
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-10-20 02:42:16 +00:00