Commit Graph

1021 Commits

Author SHA1 Message Date
Tomasz Zawadzki
413d25b036 bdev_module: add async fini_start()
fini_start() is called for each bdev module before
iterating over all unclaimed bdevs to unregister them.
This allows bdev modules to behave differently during
each such unregister. Ex. unloading lvol store when
all lvol bdevs on it are unregistered.

Another use of this callback is to unclaim all bdevs
that can be at that point. Especially ones that will
not receive callback due to no bdev registered.
Ex. offline raid bdev, when some underlying bdevs are missing.

fini_start() being synchronous does not help in cases
where to release claim on the bdev, an asynchronous operation
is required. Ex. lvol store with no bdevs present, requires
async lvs unload to be called.

This patch adds async_fini_start flag for the bdev modules,
to be used when async fini_start is required. When done,
bdev module has to call spdk_bdev_module_finish_start_done().

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I63438b325d4cc53fd236bf9ff143abf6bdd81c49
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9094
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-08-23 08:49:56 +00:00
Konrad Sztyber
c7d1c506ef sock/uring: reorder task cancellations in remove_sock
When removing a socket from a sock_group, the recv_task should be
cancelled last, because it can be sent out while cancelling other tasks
(if POLLERR is received).  Otherwise, we could end up with outstanding
recv requests from a socket removed from a group.

Fixes #2112.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ic8e24c210541390dd8bdffe8d3bc4e7dd746d4b7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9239
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-08-23 08:49:01 +00:00
Konrad Sztyber
57d60b9f17 sock/uring: fix build on systems w/o zerocopy support
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I9c856a6390f227393bb0df8a473895e2368d2fbb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9238
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-08-23 08:49:01 +00:00
Tomasz Zawadzki
d2dd47433b bdev/lvol: remove lvs with lvols during application shutdown
Once bdev finish starts, bdev unregister is called on all
unclaimed bdevs. This means that for lvs with at least one
lvol present, there will be a corresponding bdev unregister.

Yet the vbdev_lvol module does not attempt to unload the lvs,
once last lvol from that lvs is unregistered. Leaving
the base bdev for lvs claimed.

This patch fixes that by using fini_start callback from
bdev_module to mark when shutdown begins. After that
last lvol unregistered on lvs will unload it.

Expanded struct lvol_bdev to contain lvol_store_bdev.
Closing the lvol will free spdk_lvol, so lvol->lvol_store cannot
be accessed.

Changed ut_lvol_destroy UT to ut_bdev_finish. Previous UT didn't
really test vbdev_lvol_destroy, but 'hotremove' of the lvol bdev.
In effect there is no hotremove of the lvol bdevs (only lvs bdev).
spdk_bdev_unregister() can only be called from within vbdev_lvol,
or during bdev module finish.
This UT will now check the bdev module finish.

Note that at this point lvs with no lvols will not trigger
lvs unload. Next patches in series will introduce async fini_start,
to allow for the unload.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8f51e8c1fcfdc55a5d090a3bc84ccefda813aef8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9093
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2021-08-20 07:27:58 +00:00
Rafal Stefanowski
074a63d507 bdev/ocf: Fix devices block size mismatch
OCF creates vbdev with block size equal in size with a core device.
We need to ensure that cache's bdev block size is not bigger than
core's bdev block size, so there are no IO errors due to IO length
smaller than cache device's block size.
The reason why this is implemented late in the cache start and not
as soon as we want to construct OCF vbdev is that cache or core
device can be added later after OCF vbdev creation and only then
we are certain to have both devices to compare.

Fixes #2088

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: I536c783ca71b52f212217c597b7997f2d2e89491
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9229
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-08-20 07:27:43 +00:00
Alexey Marchuk
8b21208129 bdev_nvme: Use new extended API
The new API is used if bdev ext_opts is not NULL.

Change-Id: I414b5d19bff54114d6708efed89ba19b5955f56a
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6271
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2021-08-20 07:26:10 +00:00
Alexey Marchuk
c3a5848966 bdev: Add API to get SPDK memory domains used by bdev
Change-Id: Ic9f42eff59bdc4c8c6e73deb76b3eecfc04f80a8
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6268
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2021-08-20 07:26:10 +00:00
Tomasz Zawadzki
b556e43e92 bdev/lvol: add lvol_bdev structure on top of spdk_bdev
Added struct lvol_bdev wrapping around spdk_bdev.
This will help with passing around any context.
For this patch only spdk_lvol is still used.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I23f5be5edda526ad607ea8b45274c945a42d90db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9147
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2021-08-17 08:54:40 +00:00
Tomasz Zawadzki
08137e52e9 bdev/lvol: consolidate checking for open lvols on lvs
Same iterator was used in two places already, and new one
will be added in next patch.

Replaced _SAFE variant since entries cannot be removed
while iterating in this loop.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I5ee911a5b653cfbdf0b4a39d283bd5eee66c49d8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9092
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-08-17 08:54:40 +00:00
Alexey Marchuk
6479ddb358 compress: Add RPC option to enable mlx5_pci PMD
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I31efa2f9dd1aafdb87904083e56d693a699af526
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8781
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-08-16 08:48:31 +00:00
Monica Kenguva
771f65bb1f nvme: asynchronous create io qpair
async_mode option is currently supported in PCIe transport layer
to create io qpair asynchronously. User polls the io_qpair for
completions, after create cq and sq completes in order, pqpair
is set to READY state. I/O submitted before the qpair is ready
is queued internally. Currently other transports only support
synchronous io qpair creation.

Signed-off-by: Monica Kenguva <monica.kenguva@intel.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ib2f9043872bd5602274e2508cf1fe9ff4211cabb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8911
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-08-13 07:27:07 +00:00
Ziye Yang
fc9a264595 uring: Not enable zero copy if fd is opened on a loopback device.
In order to not affect the loopback test.

Also create a sock_common.c file which can be used by posix/uring
implementation. We do not put such code in sock.c. Because sock.c
is the general layer. Other users may include their own user space
sock impelmentations. So put those common code in sock_common.c instead.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I983ec2313119539e6eed2d9f11ba1488c0ed6560
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8769
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-08-13 07:14:38 +00:00
Ziye Yang
34ab803d30 sock/uring: Add the MSG zero copy feature
This patch tries to add MSG zero copy feature.
Though io_uring supports buffer registration, it only
support io_uring_prep_write_fixed. It means only one
registered buffer can be used. It does not satisfy our
current usage mode.

According to this situation, we still use the MSG_ZEROCOPY
flags in io_uring_prep_sendmsg.

Furthermore, this new feature is dependent on the kernel
version, The currently verified version is
kernel 5.12 rc3. So it is not enabled in the default manner.

For example, if you want to use it on the target side, you can
use the following rpc to configure:

./scripts/rpc.py sock_impl_set_options -i uring --enable-zerocopy-send-server

Change-Id: Ie7bb828f466362add94891989ddf0950dccd9e80
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/957
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-08-13 07:14:38 +00:00
Konrad Sztyber
aa51757648 bdev/zone_block: check for unmap support in zone reset
Sending the unmap in zone reset is optional (it's only a hint), so if
the base bdev doesn't support it, the reset is completed immediately.

Fixes #2064.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: If2c57eadc20d352a71853d7023599503330e1252
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9154
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-08-12 12:57:24 +00:00
Jim Harris
d1e67b8b1b bdev/nvme: add fabrics timeout to attach_controller RPC
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I42f6729475fd767087fb0a0c6e30d409672c3b99
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8597
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
2021-08-02 09:05:41 +00:00
Ziye Yang
bc33302ac0 bdev/aio: Remove the unused link entry in bdev_aio_task
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I13e745b23c7fe0a5376234ead8c068c72de64a53
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9011
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-08-02 09:04:46 +00:00
Yuri
38a30da5bd nvmf: accepts new parameter to set poll groups mask
Parses and verifies hexadecimal cpu bit mask specified by the user.
Added verification to check for cpu cores range, making sure poll groups cores
assigned within the range of cpu cores allocated for the application.

RPC nvmf_set_config now takes an argument to configure ‘poll groups’,
a new parameter for NVMf subsystem. This parameter sets a CPU mask
to spawn threads which run an event loop for a ‘poll group’.

Change-Id: Ied9081c2213715ec94de00a8b37153730b8ac2ed
Signed-off-by: Yuri <yuriy.kirichok@hpe.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5611
Community-CI: Mellanox Build Bot
Reviewed-by: Matt Dumm <matt.dumm@hpe.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-07-28 08:06:00 +00:00
Ziye Yang
e1e73440d3 bdev/rbd: open image on only one spdk_thread
Purpose: Only Open image on one spdk_thread
due to the limitation of librbd module in order to
eliminate the lock overhead among different
spdk_threads on operating on the same image.

Change-Id: I64c62e8ae1c3324b92cfd953b44ec08af6688530
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6812
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-07-26 08:57:09 +00:00
Alexey Marchuk
ec1b78dbd7 socket: Remove deprecated enable_zerocopy_send
This parameter is still part of API spdk_sock_impl_opts
structure but it is not used. Keep it to support ABI
compatibility since it is located in the middle of the
structure and removing it may break socket opts initialization
or parsing.

Change-Id: Ib641ad7d965d68bc9ebb65dba531408d88cf6fa1
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8914
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-07-23 10:30:25 +00:00
Ziye Yang
5a169179be uring: fix the assert issue.
Revise the if case to avoid the assert issue.

Change-Id: I095f3d111423e17abaa1f951fe22efb3d2e851b7
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8872
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-07-23 07:10:48 +00:00
WindYu
49ffdc18af bdev/nvme: Add support to get the health log for NVMe device
Add a new RPC method to get the health log of a certain NVMe
device.

Below is the example:

./scripts/rpc.py bdev_nvme_get_controller_health_info -c Nvme0
{
  "model_number": "INTEL SSDPE2KX020T8",
  "serial_number": "BTLJ72430ARH2P0BGN",
  "firmware_revision": "VDV10110",
  "traddr": "0000:08:00.0",
  "temperature_celsius": 33,
  "available_spare_percentage": 99,
  "available_spare_threshold_percentage": 10,
  "percentage_used_percentage": 2,
  "data_units_read": 1013408619,
  "data_units_written": 346792685,
  "host_read_commands": 30457773264,
  "host_write_commands": 18949677715,
  "controller_busy_time": 4979,
  "power_cycles": 49,
  "power_on_hours": 31114,
  "unsafe_shutdowns": 18,
  "media_errors": 17,
  "num_err_log_entries": 19,
  "warning_temperature_time_minutes": 0,
  "critical_composite_temperature_time_minutes": 0
}

Change-Id: I53125d2ec16cb36011571473430aece99167b803
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8806
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-07-22 13:46:50 +00:00
Jonathan Teh
153f03cf42 bdev/nvme: Add bdev_nvme_reset_controller rpc
Implement bdev_nvme_reset_controller rpc, which allows the NVMe
controller to be reset over RPC. Implement bdev_nvme_reset_rpc()
which starts the reset of the controller and returns the result of
the controller reset via the callback function after it completes.

Signed-off-by: Jonathan Teh <jonathan.teh@mayadata.io>
Change-Id: Id98d5e56feb315b7e44e9bb5e5f495e9b1cd1de0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8456
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-07-21 07:45:38 +00:00
Jonathan Teh
3c6b670df4 bdev/nvme: Switch to spdk_nvme_ctrlr_reset_async
In bdev_nvme_reset_ctrlr(), get a controller reset context and start
a poller that calls spdk_nvme_ctrlr_reset_poll_async() to perform the
controller reset asynchronously.

Signed-off-by: Jonathan Teh <jonathan.teh@mayadata.io>
Change-Id: I1e3ae42291c3b43b69c99ca56997dc1965c3ac59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8454
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-21 07:45:38 +00:00
paul luse
96d4c7a36d lib/accel: have accel and idxd engine use task->crc_dst
For clarity, this element was added when crc+copy API was
added so might as well have all the CRC related functions use
it instead of `dst` to avoid confusion.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic43adbd0df51c1a349847701ef318f452306d0b3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8229
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2021-07-15 21:04:08 +00:00
paul luse
71f0600c5b lib/accel: add support for crc32 with copy using source IOVs
Support in accel_perf is coming up in a later patch.

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I63a1d3b9b1a3254fdca78e27c473b9b3468c93c8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8202
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-15 21:04:08 +00:00
Shuhei Matsumoto
d2d1899b90 bdev/nvme: Create nvme_bdev_channel for nvme_bdev
Create a single nvme_bdev_channel for each nvme_bdev and each SPDK
thread. nvme_bdev_channel has a pair of nvme_ns and nvme_ctrlr_channel.

The pair of nvme_ns and nvme_ctrlr_channel will be aggregated by
nvme_ns_channel in the following patches.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I095a2d6afa4ea23a87e4452b2f9d4c7e0087abe0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6605
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
2021-07-14 09:15:59 +00:00
Shuhei Matsumoto
e0715c2a6b nvme: Add a new option disable_read_ana_log_page to struct spdk_nvme_ctrlr_opts
NVMe bdev module manages ANA log page itself now. So NVMe driver
should disable managing ANA log page.

Add a new option disable_read_ana_log_page to struct spdk_nvme_ctrlr_opts.
Then NVMe bdev module enables it when calling spdk_nvme_connect_async().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id5249efe90a4d50763c3a7eaa1eb9572f60fbc8c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8313
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2021-07-14 09:15:59 +00:00
Shuhei Matsumoto
072f2d0011 bdev/nvme: Update ANA log page it self when ANA change event is notified
When ANA change event is notified, increment reference count, read
ANA log page, and parse it to update ANA states of namespaces.

Then remove the spdk_nvme_ns_get_ana_state() call and its stub in
unit tests.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I254ae6cb993694bf0d7f4fa4b1039b5f9243b5cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8335
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-07-14 09:15:59 +00:00
Shuhei Matsumoto
7ec6d1d559 bdev/nvme: Read ANA log page itself when nvme_ctrlr is created
If ctrlr supports ANA log page, nvme_ctrlr allocates a buffer for ANA
log page and read ANA log page itself, and then each nvme_ns sets its
ANA state by parsing ANA log page.

Most code was brought from NVMe driver because NVMe driver already
supports ANA log page management. However it had a bug that assumed
each descriptor is 8-bytes aligned. Fix the bug together in this
patch. Besides, the implementation in NVMe driver was synchronous.
NVMe bdev module reads ANA log page asynchronously instead.

The next patch will support ANA log page update by AER handler.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib8eab887633b043b394a45702037859414b8e0a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8318
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-14 09:15:59 +00:00
Matt Dumm
67fbfdd8af nvme: rpc interface updates to manage 'timeout_admin_us' value
Signed-off-by: Matt Dumm <matt.dumm@hpe.com>
Change-Id: Ib97371924e56275ba9b845725d1d42682fd0f94a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8163
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-07-14 09:15:20 +00:00
Matt Dumm
5288c4df83 nvme: separate admin timeout vs. io timeout
Signed-off-by: Matt Dumm <matt.dumm@hpe.com>
Change-Id: Ia1f105fdf154aae034ccfca2f0dc3b4c43c9fc84
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8072
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2021-07-14 09:15:20 +00:00
Ziye Yang
e5d5b3ebef idxd/rpc: Revise the rpc function to use kernel or user driver
This patch is used to add the support for users to configure
use kernel or userspace idxd library.

Change-Id: Ie159b897bc9595894ad8f333168efaea6c2a3d78
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7332
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 17:22:30 +00:00
Ziye Yang
467f16bf7d uring: Use low level list ops to improve the performance when reorder the list.
This patch is used to improve the performance when
we need to reorder the list.

PS: Bring the similar operations from posix implementation.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I7031b35ddb597730ee160690e8ab9caf9b2b64b7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8675
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 09:08:15 +00:00
Ben Walker
e1d06d9954 net: Remove library
Now that we've deprecated the RPCs for a release, we can remove the whole
library.

Change-Id: I0f1a357fcfb3404efac39aa021928841c2f22ff1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4305
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-07-13 08:57:58 +00:00
Shuhei Matsumoto
1be049b7d4 bdev/nvme: Move up definition of struct nvme_async_probe_ctx in a file
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iac315c3484c23b7e8b9a812d728a15bf1c82dbb7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8591
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 08:57:33 +00:00
Shuhei Matsumoto
07c2b34ab6 bdev/nvme: Register completion function as a generic callback for reset
bdev_nvme_reset() will be used by JSON RPC and we will have to call
the callback to JSON RPC at bdev_nvme_reset_complete(). To do it
easily, register the current completion function for nvme_bdev_io
in bdev_nvme_reset_complete() into nvme_ctrlr as a generic callback.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie59551dc343215a95bfa5b22f234fc153c9db1b5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8589
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 08:57:33 +00:00
Shuhei Matsumoto
f1c141fcc8 bdev/nvme: Get ctrlr via io_channel_iter_get_io_device() at reset process
nvme_ctrlr will be registered as io_device even when multipath is
supported. Hence while spdk_for_each_channel() is executed in reset
processing, we can get nvme_ctrlr both spdk_io_channel_iter_get_ctx()
and spdk_io_channel_iter_get_io_device(). This duplication is not
necessary. Use spdk_io_channel_iter_get_io_device() and pass NULL
to the context parameter of spdk_for_each_channel() for clarification.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifdbd0af4274081c4be7ab0735eb8bf9ae10e3493
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8588
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 08:57:33 +00:00
Shuhei Matsumoto
3a243b7f38 bdev/nvme: Inline bdev_nvme_reset_io_complete() into bdev_nvme_reset_complete()
The current nvme_ctrlr will be registered as io_device even when
multipath is supported. Then we do not have to differentiate completion
processing between reset from bdev_io and internal reset. Hence
inline bdev_nvme_reset_io_complete() into bdev_nvme_reset_complete().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ife2c4c93d423da3953174ac860485a6e095a28bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8587
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 08:57:33 +00:00
Shuhei Matsumoto
c213f1b452 bdev/nvme: Revert reset_io to bring nvme_bdev_io as context
When we support multipath, reset_io will hold the controller currently
being reset to reset all underlying controllers sequentially.

bdev_nvme_submit_request() basically passes nvme_bdev_io to each I/O
type, and we have a convenient helper function bdev_nvme_io_complete()
which has nvme_bdev_io as a parametetr.

So revert the previous change to bring nvme_bdev_io as context
for reset processing.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I19697e8252505bab519a42889d1a88d967932f22
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8586
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 08:57:33 +00:00
Shuhei Matsumoto
07df4b0141 bdev/nvme: Rename bdev_nvme_reset() by bdev_nvme_reset_io()
Reset requests from the upper layer will reset the underlying
ctrlrs of a bdev ctrlr but internal reset requests will reset only
the specified ctrlr.

To clarify such difference, rename bdev_nvme_reset() by
bdev_nvme_reset_io() and remove the underscore prefix from
_bdev_nvme_reset() and related functions.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9a2d124f6e2039bfecfdd6599827354d6c373f2e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8492
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 08:57:33 +00:00
Shuhei Matsumoto
03332379f0 bdev/nvme: Hold mutex while traversing global ctrlr list
nvme_bdev_first_ctrlr() and nvme_bdev_next_ctrlr() were not possible
to hold mutex correctly, and nvme_ctrlr_get() and nvme_ctrlr_get_by_name()
had not held mutex.

nvme_bdev_first_ctrlr() and nvme_bdev_next_ctrlr() were replaced by
nvme_ctrlr_for_each() in the last patch.

In this patch, add mutex to three helper functions, nvme_ctrlr_get(),
nvme_ctrlr_get_by_name(), and nvme_ctrlr_for_each().

Add mutex to nvme_ctrlr_create() but it will be removed in the
following patches because nvme_ctrlr will be added to not global
ctrlr list but ctrlr list per nvme_bdev_ctrlr.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ife27066d2dcac82db0616b0afeaf68e5705d7da1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8722
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 08:57:33 +00:00
Shuhei Matsumoto
ca4dfff9e1 bdev/nvme: Replace nvme_bdev_first/next_ctrlr() by nvme_ctrlr_for_each()
Replace two helper functions, nvme_bdev_first_ctrlr() and
nvme_bdev_next_ctrlr() by an new helper function nvme_ctrlr_for_each().

This will make us easier to guard data structure correctly in the
following patches.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibd81286e454fd6127fd150a7d48d8381bd1b89d3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8721
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 08:57:33 +00:00
Shuhei Matsumoto
4af68eade6 bdev/nvme: Rename nvme_bdev_poll_group by nvme_poll_group
This object aggregates multiple I/O qpairs for their completion
operations and may be a higher layer object. However, the
aggregation is only to poll completions efficiently. Hence if we
follow the new naming rule, nvme_poll_group is better than
nvme_ctrlr_poll_group and nvme_bdev_poll_group, and rename
nvme_bdev_poll_group by nvme_poll_group.

Besides, many functions in NVMe bdev module have a naming rule,
  bdev_nvme + verb + objective
Follow this rule for a few functions related with nvme_poll_group.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5e5cb6001d4a862c2121b7265cbbffe0c2109785
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8720
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 08:57:33 +00:00
Shuhei Matsumoto
a3dcdc051f bdev/nvme: Rename nvme_bdev_ctrlr by nvme_ctrlr
This object is per I/O path and will be aggregated by an new upper
layer object.

Hence rename nvme_bdev_ctrlr by nvme_ctrlr. Then the following patches
will add nvme_bdev_ctrlr as a different upper layer object.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ieed634447785cc98140b3d49c52a2c753988ece7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8381
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 08:57:33 +00:00
Shuhei Matsumoto
9e65d3bb35 bdev/nvme: Rename nvme_bdev_ctrlr_trid by nvme_ctrlr_trid
This object is used for failover and per I/O path. A controller may
have multiple of this object. A controller is per path and may be
aggregated by an new object. Hence this object is a lower layer
object.

Based on the new naming rule, rename nvme_bdev_ctrlr_trid by
nvme_ctrlr_trid.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0d5e5812560a6947a0c25af05dea168e8745130e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8380
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
2021-07-13 08:57:33 +00:00
Shuhei Matsumoto
c4626aa486 bdev/nvme: Rename nvme_bdev_ns by nvme_ns
This object will be aggregated by the upper layer object nvme_bdev.
Hence based on the new naming rule, rename nvme_bdev_ns by nvme_ns.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I96a70213b29fb53437acd080a0787ec9f5a6759a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8379
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-07-13 08:57:33 +00:00
Shuhei Matsumoto
c710c9acbe bdev/nvme: Rename nvme_io_path by nvme_ctrlr_channel
We will name the lower level objects starting with nvme_* and the
upper level objects starting with nvme_bdev_*.

This object is a channel per ctrlr and another new channel will be
added on top of this object.

Rename nvme_io_path by nvme_ctrlr_channel based on the new naming rule.

nvme_io_path will be used for a new object which is used to find an
optimal I/O path and to reset multiple ctrlrs sequentially when
multipath is supported.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1d4fa6d4625de3413d629a1ff412e00de12dfaf4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8378
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-07-13 08:57:33 +00:00
Jacek Kalwas
1f433c4c32 bdev/nvme: prefer NGUID over UUID if supported
NVMe specification defines namespace identification descriptors i.e.
EUI64, NGUID, UUID.

BDEV abstracts NVMe specific details that is why only UUID is exposed,
however if NGUID is supported it is prefered to identify namespace
with NGUID over UUID.

If NGUID is not supported by NVMe Controller then fallback to UUID.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If51889a3664c0daa7cbe983048231793e3c502e0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8627
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-07-09 07:02:11 +00:00
Jim Harris
109af0bcb3 bdev/nvme: don't check spdk_nvme_ctrlr_free_io_qpair return
spdk_nvme_ctrlr_free_io_qpair now always returns 0, so
update the code to account for that.

Fixes issue #2012.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I61c78459472573adbfeb28052ae3379d7880567c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8660
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-07-07 07:27:40 +00:00
Ziye Yang
05dc895bea sock/posix: Fix the coredump when removing the sock from socks_has_data list
When entering the if case to order the list, there is bug should be
fixed. The original code does not address this.

The way this happens is when there is a connection left in the socks_with_data list
between polls and there are enough new events detected that it would exceed the
maximal number of events. A connection is left on this list between polls if it isn't
fully drained via reads by the upper layer on each poll loop.

Currently, the maximal socket event num is 32. Then we did not hit this issue
in our normal test cases. But when you use NVMe-oF tcp target to test which is
described in #2105, there are more than 32 active sockets, and it exceeeds
the maximal num of events of polling (32), so we will trigger this issue.

Fixes issue #2015

Change-Id: I9384476fdba8826f5fe55a5d2594e3f4ed3832ba
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8541
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-07-01 19:37:38 +00:00