Commit Graph

14577 Commits

Author SHA1 Message Date
Konrad Sztyber
e4d271f302 external_code/nvme: send identify controller during init
Now that it's possible to both submit the identify controller command
and process its completion, the initialization flow has been updated to
issue that command and update controller's identify data (which can be
retrieved via nvme_ctrlr_get_data()).

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Iee0e85f431275a5e6f1767db1d807de7fba6cdcc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6677
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
71c69ddfc3 external_code/nvme: process completion queue
Added function that check the completion queue for completed commands,
executes their callbacks, and puts the associated requests back onto the
free request queue.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I0f04c0d173a7058d4d4f7e59e573ce48130ff024
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6676
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-03-09 08:28:22 +00:00
Konrad Sztyber
c4d01aa5b7 external_code/nvme: identify command submission
This patch adds code required for sending identify controller admin
command.  It means allocating an NVMe request, filling spdk_nvme_cmd
structure, and submitting the command by writing the command to the
submission queue and ringing the doorbell.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I69934213a350df03852860eeaeadc2a456c7673c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6675
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-03-09 08:28:22 +00:00
Konrad Sztyber
48a89ec7d3 external_code/nvme: introduced nvme_ctrlr_get_data()
This function allows the user to retrieve the controller's identify
data.  Currently, that buffer is zeroed, but it'll be populated by the
identify command.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I91a99feef25ecf94c43cf144c12ac3c541c76cd9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6674
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
5555513653 external_code/nvme: basic controller initialization flow
Added a simple controller enablement state machine based on the CC.EN
and CSTS.RDY bits.  The admin queue registers are also filled during
this process, so it's now possible to send admin requests.

To simplify the code, there are no timeouts for a controller to
transition from a specific state to the next one or for the whole
initialization process.  This means that if a controller gets stuck, the
code will hang indefinitely too.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I93f5a5931d7b24780da242e601dcdf2bec5f6552
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6673
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
a2d3ea8cb3 external_code/nvme: initial controller initialization definitions
After enumerating and attaching NVMe controllers, they're now
initialized at the end of nvme_probe()/nvme_connect().  For now, they're
immediately marked as initialized, but subsequent patches will replace
it with an actual initialization.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I22137bb10e871c7e79c28053c8ec98a835e11147
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6672
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
07dc433a2f external_code/nvme: queue pair initialization
This patch adds NVMe submission/completion queue pair definitions.
These definitions are required to keep track of outstanding NVMe
requests.  The admin queue pair is now instantiated with the minumum
number of entries (2).

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I2ced3ce7d210408d66cc17de1e66d86b1a1dbf79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6671
Community-CI: Broadcom CI
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
210e0db7e0 external_code/nvme: retrieve page size and doorbell stride
These values are needed for managing a submission/completion queue pair,
which will be added in the subsequent patch.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I80ac0d607160f06a13014b7dea95ae8172290aee
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6670
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
7da17fb378 external_code/nvme: enable PCIe bus master and disable INTx irqs
It allows the controller to issue memory read/writes (the bus master
enable bit) and disables the ability to generate INTx interrupts which
won't be serviced.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I3b041f1ea7c2bc275b609afcc3d1e4f655aee4c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6669
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
ad9ccbbf52 external_code/nvme: controller register access functions
Added getters/setters providing access to several of the NVMe
controller's registers.  Only the registers that are needed for the
initialization are implemented.

For now all of them are unused, so they're marked as external to avoid
the -Wunused-function warnings.  The subsequent patches will make use of
them and mark as static appropriately.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I7012583f74e87720f6915afca69474ad1bb1e377
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6668
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
c2ca187c1e external_code/nvme: map controller's registers
The controller's memory register space (located in the first BAR) is now
mapped.  The functions for accessing individual registers from this area
will be added in the following patch.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ie5f88079a46152ba8d68e534d5e4c0c2bef84ef3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6667
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
86b1b71f5f external_code/identify: use nvme_connect() if an address is provided
The identify app can now be used in two modes:
 - without any parameters it'll attach to all available NVMe controllers
   and print each one out,
 - with a single parameter specifying the BDF address of the controller
   it'll only attach and print out information about that controller.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I02c7a8a072f1db5fdfd428a5ab84163f26338a09
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6666
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
5802856ece external_code/nvme: direct NVMe device connect
Added interface, nvme_connect(), for connecting an NVMe device specified
by a BDF address.  Similarly to spdk_nvme_connect(), it returns a
pointer to an NVMe controller representing requested device.

Under the hood, it uses spdk_nvme_pci_device_attach() to attach the
PCI device.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I15c7cabae07539cb97aba810385d26f223abfd6d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6665
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
29342a9ed8 external_code/nvme: device attach/detach
The NVMe devices can now be enumerated, attached, and detached.  To
simplify the driver, the probing step has been omitted - all available
controllers are attached and need to be detached later.

The driver registers itself as a PCI driver via a call to
SPDK_PCI_DRIVER_REGISTER() and then uses spdk_pci_enumerate() to
enumerate available NVMe devices and attach them.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Id03e2f4365f4f7ca98178be70278d0c4b7b34b26
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6664
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Konrad Sztyber
91b30e7aec test/external_code: initial definitions for basic NVMe driver
This patch introduces initial definitions for a stripped down version of
an out-of-tree NVMe driver.  It's purpose is to showcase SPDK's
interfaces for writing user-space drivers for various types of devices.
The choice of NVMe as the example is based on the fact that it can be
emulated by QEMU and the code can be borrowed from SPDK's regular NVMe
driver.

This driver will only provide the most basic functionalities (e.g.
device probing, controller initialization, only admin queue support,
etc.) and won't have support for any device quirks.  Therefore, it's
only intented to be used with emulated devices.

In addition, an application utilizing the driver to list all available
NVMe controllers and print their identify data will be added.  It'll
be a very basic, stripped down version of `examples/nvme/identify`.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I67c748aabf75a37ca72dfb74301a610f7c4ae2bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6663
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: Ben Walker <benjamin.walker@intel.com>
2021-03-09 08:28:22 +00:00
Shuhei Matsumoto
e8cde79560 bdev/nvme: Return the created ctrlr directly from nvme_bdev_ctrlr_create()
This also simplifies the code.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I32ca5e24779dc60e0ff4cf2610951cce55d06c75
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6622
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-03-08 10:49:54 +00:00
Shuhei Matsumoto
949b21f143 bdev/nvme: Add nvme_bdev_ctrlr parameter to nvme_ctrlr_populate_namespaces_done()
nvme_bdev_ctrlr is valid while populating namespaces of the
nvme_bdev_ctrlr regardless of the result. nvme_bdev_ns holds
nvme_bdev_ctrlr by its pointer, ctrlr. Hence it is not necessary for
nvme_ctrlr_populate_namespaces_done() to use nvme_bdev_ctrlr_get_by_name()
to get nvme_bdev_ctrlr.

To simplify the code, add nvme_bdev_ctrlr parameter to
nvme_ctrlr_populate_namespaces_done() and remove the
nvme_bdev_ctrlr_get_by_name() call from nvme_ctrlr_populate_namespaces_done().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic2013842fad16ea0de49c18b5b853d147c23a6b2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6621
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>
2021-03-08 10:49:54 +00:00
Shuhei Matsumoto
4fa4e4cc3f bdev/nvme: Use bdev_nvme_find_io_path() to a remaining case, no_pi_readv()
bdev_nvme_no_pi_readv() had not been used for bdev_nvme_no_pi_readv() yet.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9bf815b36ef0daa2f1248f618a9c7e2f1ea62346
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6603
Community-CI: Broadcom CI
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-03-08 10:49:54 +00:00
Mao Jiang
2b2a297de1 test/nvme_io_msg: build nvme_io_msg uinttest file
Cases for IO message sending and processing.

Change-Id: Id9085c016d4379401f8e203006e11a268518d0e2
Signed-off-by: Mao Jiang <maox.jiang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6215
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: Jim Harris <james.r.harris@intel.com>
2021-03-08 10:49:45 +00:00
Changpeng Liu
17c5843d5a nvmf/vfio-user: don't block DSM command in vfio-user
Previously we only process Read/Write/Flush IO commands, we should
not block the DSM command in vfio-user layer if the backend block
device can support it.

Change-Id: Ia6b90397adcc36015f331f011a5bdf3e3d6562d8
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6525
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-08 10:49:32 +00:00
Monica Kenguva
d5bcc16d09 rpc: Document bdev_set_qd_sampling_period
Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Ic95eb98eeafe536fe3ac74f88229bbfdcf5daccb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6632
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-08 10:49:23 +00:00
Michal Berger
9801533f8a scripts/setup: Use uio_pci_generic if it's loaded/compiled in
Also, for consistency, use check_for_driver() while checking if
igb_uio is loaded too.

Change-Id: I00302b3cab169c77032fc0cef0ea384e9e5eb5be
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5303
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-08 10:49:11 +00:00
Michal Berger
fcc35c86cd scripts/setup: Attempt to load uio driver only when igb_uio is picked up
Change-Id: I5c4860c69ccfdae4532498aaea8886ed3905d899
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5302
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-03-08 10:49:11 +00:00
Maciej Wawryk
46f5120c56 test/vhost: fix cgroup path
new fedora33 is using cgroup-v2 and old path in script give us error Permission denied

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I238c1eae0e4708003726a721c445a0b62dc0cff7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6425
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-08 10:48:53 +00:00
Krzysztof Karas
6c0cebf1c9 spdk_top: update spdk_top docs for spdk.io
Updates spdk_top documentation page to explain and present new features.
Images are being deleted to make versioning easier.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I6c3c172ed54423afc3afa4566b71ed19f0bc2e3e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6095
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-08 10:48:47 +00:00
Maciej Wawryk
02da8ebd2e test/openstack: retry git clone when failed
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: If0c814b36c29aa301a6b77a3b5e74465cccfc0bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6195
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: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-03-08 10:48:36 +00:00
Maciej Wawryk
c4dfdeefdb test/openstack: clone only recent revision
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I81581ebe46f172f0fbbeb542dfb4b513326a3566
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6166
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Community-CI: Mellanox Build Bot
2021-03-08 10:48:36 +00:00
Tomasz Zawadzki
739d541362 lib/bdev: move to spdk_bdev_open_ext()
spdk_bdev_open() is deprecated, so this patch moves
remaining instances to spdk_bdev_open_ext().

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7e8648efbf166665bf1c3700a11a6dc81fd051c3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6625
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: Ben Walker <benjamin.walker@intel.com>
2021-03-05 08:33:45 +00:00
Tomasz Zawadzki
3e15b356f3 module/blob: remove deprecated spdk_bdev_create_bs_dev/from_desc()
spdk_bdev_create_bs_dev was deprecated in SPDK 19.10
spdk_bdev_create_bs_dev_from_desc was deprecated in SPDK 20.10

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1290958923f7833579d098a693454e7ab7656307
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6624
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-05 08:33:45 +00:00
Tomasz Zawadzki
a38d241cd6 lib/event: remove deprecated fields from spdk_app_opts
max_delay_us was deprecated in SPDK 19.04.
config_file was deprecated in SPDK 20.10.
master_core/pci_blacklist/pci_whitelist were deprecated in SPDK 21.01.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ie8be4c347de58044a7c3d5b1329d96e47ce084b4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6594
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-05 08:33:45 +00:00
Tomasz Zawadzki
4fb0b89625 lib/env: remove deprecated fields from spdk_env_opts
The fields were deprecated in SPDK 21.01.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If6b946024bf1ce4c106cdf493bcb5662a3b21b13
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6592
Community-CI: Broadcom CI
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-03-05 08:33:45 +00:00
Nick Connolly
292b8e0c3e ut/bdev_nvme: fix 'used uninitialised' warning
On some platforms, GCC identifies that opts.io_queue_requests is used
uninitialised in bdev_nvme_create_qpair due to the stub function
spdk_nvme_ctrlr_get_default_io_qpair_opts which would normally zero the
qpair opts. Whether the warning appears is likely to be determined by
how effectively the platform garbage collects unused code.

Replace the stub with a minimal implementation that zeros the qpair
opts to avoid the warning.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I2b8c2d657ae5401c3b35ca66938a966906cdc846
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6595
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 <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-05 08:33:30 +00:00
Changpeng Liu
2f579469b6 nvme/tcp: pass correct parameter to nvme_tcp_qpair_send_h2c_term_req_complete
Previously the callback parameter for this function is NULL, this will
cause segment fault, so pass the correct parameter here.

Fix #1817

Change-Id: Ie768b7bf4a72862d16a44742ab3032803d0939a2
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6690
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Community-CI: Mellanox Build Bot
2021-03-05 08:33:18 +00:00
Jin Yu
17a286baff pci: fix rte dev remove handling
Can not remove device in the remove event
callback as we can not unregister the remove
callback. So use the alarm_set to fix this issue.

Fixes #1809

Change-Id: Ib86bc4eeecc0fe2bc51538e28684d015405e8835
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6553
Reviewed-by: Vasuki Manikarnike <vasuki.manikarnike@hpe.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-03-05 08:33:11 +00:00
ChengqiangMeng
6de10dfc01 unittest/nvme_tcp: increase code coverage for nvme_tcp_parse_addr
nvme_tcp_parse_addr code comprehensive coverage.
res->ai_addrlen is returned by getaddrinfo(), and it is an IPV4 or IPV6 address, so its maximum length is not more than 46.
And sizeof(*sa) is always 128,so ai_addrlen cannot be greater than sizeof(*sa).

Signed-off-by: ChengqiangMeng <chengqiangx.meng@intel.com>
Change-Id: Id432a39c1461c484ea871e7e9d8d3ed7a8391200
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6512
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Mellanox Build Bot
2021-03-05 08:33:02 +00:00
Krzysztof Karas
6a34348219 spdk_top: fix app crashing on tab selection with TAB key
Fixes spdk_top crashing problem upon selecting a row in one tab,
then switching with TAB key to a different tab with fewer rows
and calling pop-up details window with ENTER key.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Change-Id: I52c5729eca0ce0eaad88767ff3add471a780140a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6367
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-05 08:02:10 +00:00
Monica Kenguva
97ef870100 nvmf/rdma: add RPC parameter to specify CQ size with RDMA transport
nvmf_create_transport rpc parameter to configure the CQ size helps
if the user is aware of CQ size needed as iWARP doesn't support CQ resize.

Fixes issue #1747

Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Change-Id: Ia9ba2b5f612993be27ebfa3455fb4fefd80ae738
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6495
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-04 08:14:57 +00:00
Michal Berger
7ecf76e02e scripts/vagrant: Drop vagrant-cachier
There's almost no benefit coming from it CI-wise since all our VMs are
already fully provisioned. The speed up of nightly jobs, which do run
package updates, is minimal. Overall, it only slowers deployment of the
autotest VMs.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I68d9530533f0b0d7d2fb72ce82706d6bc0cf2e6e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6637
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>
2021-03-04 08:12:54 +00:00
Michal Berger
344cc21e69 scripts/vagrant: Drop support for FreeBSD 11.x
These releases reached their EOL already.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ic30b343b63620a2fb80870a6c192c4931936421e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6636
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>
2021-03-04 08:12:54 +00:00
Michal Berger
b5212f04e7 scripts/vagrant: Drop support for Clearlinux
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Idc0ca75b48cd680bacdd455206b88df6b99d0bff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6635
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-04 08:12:54 +00:00
Michal Berger
ee191fa807 test/vhost: Don't fetch .qcow2 image needed for tests
Simply fail. It's expected to have this image already installed on
the system.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ie7bbde84fe633c8b5a4d41bd6dcbee66d6f4a0c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6375
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-04 08:09:43 +00:00
Michal Berger
3e4b33ab9f test/vhost: Drop nested-lvol from the tests
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I815cdd18281b7c63aadd287cdd277bb9eb8d9489
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6596
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>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-04 08:09:43 +00:00
Michal Berger
e0335bb121 test/vhost: Drop support for multiple nvme controllers
This test path is currently not being run through CI, hence no need
to support it.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I9a7cc7005c4e20f25724d2a0a417656deb09abb1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6543
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-04 08:09:43 +00:00
Michal Berger
3369ef457f test/vhost: Remove tests dependent on centos image
Said image is not used by the CI at all, drop support for it.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I3493e8c5f808e56cfb0304a04cfa90ab3700018c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6542
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-03-04 08:09:43 +00:00
Shuhei Matsumoto
5261f638cb lib/iscsi: Call iscsi_reject() in return statements in iscsi_pdu_hdr_op_data()
iSCSI library had used goto label to consolidate iscsi_reject()
calls but calling iscsi_reject() in return statements will be simpler
and easier to read. This patch series focuses on Data-OUT PDU processing,
and so change goto label to function call in return statements for
Data-OUT PDU first.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5f30aff764820aab87233ea8cf22263611591a96
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6533
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-03 08:17:33 +00:00
Nick Connolly
b8d548911b app: exclude spdk_top from mingw cross builds
Temporarily exclude spdk_top from mingw cross builds until curses
support is resolved.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I1db9a9d592de06e45e1ec496369c629d66f0a50c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6580
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-03-03 08:16:54 +00:00
Nick Connolly
2a8065b554 mk: add mocking for mingw cross builds
On Windows there has to be a thin layer above the system calls to
provide POSIX functionality. When wrapping system calls, the name needs
to be prefixed with wpdk_ to ensure that the layer is called.

Re-arrange the definitions to facilitate wrapping and prefix with wpdk_
for mingw. For other compilers targeting Windows, the --wrap flag is not
supported and the layer above the system calls implements an alternative
mechanism to enable the mocking.

Tested with $(info LDFLAGS) added to spdk.mock.unittest.mk combined with
visual inspection and running the unit tests.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: If00504740229362c40bee4ae171d35489afb2e77
Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6577
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-03-03 08:16:54 +00:00
Nick Connolly
3399171388 mk: workaround for mingw stack-protector bug
Add -mstack-protector-guard=global to work around GCC bug 86832,
where -fstack-protector will attempt to use native TLS, but mingw only
supports emulated TLS. This causes a segmentation violation at the start
of any function protected by stack-protector. The issue exists in GCC
versions prior to 8.3.

Enable -mstack-protector-guard=global which uses a global variable for
the guard value. This is the behaviour with the fix, so there is no
downside to enabling it for all versions of GCC on Windows.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I85bc831043585071b0d8b0a3dd637b8d9ff26dab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6575
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-03 08:16:54 +00:00
Nick Connolly
af17c1d44d mk: adjust options for mingw cross compilation
Check compiler target triplet for the strings 'windows' or 'mingw'
and set OS to Windows. If found, adjust basic parameters:

Set EXEEXT to indicate executables have .exe suffix.
Exclude 'relro' and 'now' flags which are not recognised on Windows.
Exclude 'noexecstack' flag which is not recognised on Windows.
Exclude -pthread flag because Windows doesn't have POSIX threads.
Include libssp.a to support stack-protector and _FORTIFY_SOURCE.

Signed-off-by: Nick Connolly <nick.connolly@mayadata.io>
Change-Id: I94a45d3123ebc81f5529006fa07b05da897e5866
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6574
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-03-03 08:16:54 +00:00
Pawel Piatek
b3139d716b scripts/vagrant: change owner also on ocssd_md file
For OCSSD disk case we create two files, but only one was later
chown-ed.

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: I411f0717f5416ba012e2e90582b60ec892d2744e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6170
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
2021-03-03 08:13:20 +00:00