Commit Graph

18835 Commits

Author SHA1 Message Date
Jim Harris
0c6a7b9153 env_dpdk: add dpdk_pci_device_copy_identifiers
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2821cbfc58829e2b7f71d2700e102e8fd6c6c322
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14544
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-09-22 12:38:25 +00:00
Jim Harris
dabd899365 env_dpdk: add dpdk_pci_device_get_devargs
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I54bdd891f99b53fbc3111f1a51c2f73f7a73b92a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14543
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-09-22 12:38:25 +00:00
Jim Harris
db531332cf env_dpdk: add dpdk_pci_device_get_name
This touches the rte_pci_device structure, so let's
make a separate accessor function just for that.

We will start putting the definitions for these
new dpdk_pci_device_xxx functions at the end of
pci.c.  At the end of this series, we will then
just lop off the end of pci.c containing all of
the dpdk_pci_device functions and move them to
a DPDK-dependent pci_22_07.c file.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I0323fc19b51d21d1bac899df21d6ebf4354ab339
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14542
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-09-22 12:38:25 +00:00
Jim Harris
ce63b017b8 env_dpdk: don't embed rte_pci_driver directly
struct rte_pci_driver will become private, and its
size may change between DPDK releases.  But we want
to keep the spdk_pci_driver structure generic.  So
allocate 256 bytes of space for the rte_pci_driver
structure, which is far more than the 104 bytes it
currently occupies.  We will keep a struct
rte_pci_driver pointer to this memory in spdk_pci_driver
which can be set up in the generic code.  This will
make it easier in future patches to make sure that
anything actually touching the rte_pci_driver
structure will be in the separate DPDK dependent
files.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I29aa7e71137da25a5480b34c71f2e0d5c9c02eae
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14541
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-09-22 12:38:25 +00:00
Xinrui Mao
4a9209bf1d lib/nbd: return nbd_poll idle or busy accordingly
The previous version missed the case of return value of _nbd_poll
equals to 0,and thus,when using nbd with no io,spdk_top shows high
cpu utilization.Return idle when _nbd_poll return 0.

Fixes #2697

Signed-off-by: Xinrui Mao <xinrui.mao@intel.com>
Change-Id: Ifa2ca3010e10250b5320a8282dfed3d97bea5105
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14615
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
2022-09-22 07:51:46 +00:00
MengjinWu
4c33c7ae20 nvmf/tcp: inline function 'nvmf_tcp_req_set_state'
Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: Ie3af436411da9e3f3ad1ec159f0fbf59c4901983
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14598
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
2022-09-22 07:45:56 +00:00
MengjinWu
1d7230285b nvmf/tcp: add hpda value check in 'nvmf_tcp_icreq_handle'
hpda value should be in range of 0 to 31.

Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: Ie1329c831af06ccc8943a562c3f6396b635be518
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14575
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-09-22 07:45:03 +00:00
MengjinWu
f8dd380b33 nvmf/tcp: eliminate function nvmf_tcp_set_in_capsule_data
This function is small and called only once.

Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: Ie4b11668e42a8920b3a9a11aa8cb83512f32942c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14576
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
2022-09-22 07:38:25 +00:00
MengjinWu
b5aeff1dba nvmf/tcp: 'nvmf_tcp_send_c2h_term_req' should set fes
Set the fes in nvmf_tcp_send_c2h_term_req.

Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: I457e102d9329e5624c738c5cf2e7fe411106f30b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14583
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-09-22 07:37:56 +00:00
Kozlowski Mateusz
be61c92a6d FTL: close ftl bdev in original thread
spdk_bdev_close should be called on the caller thread. Saving the thread
now for both unmap and get stats, and executing the close in the
appropriate context.

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I82192817d6012b0d41bbe2078fbd3f7dc01a7282
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14597
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-09-22 07:10:03 +00:00
Kozlowski Mateusz
691504a314 FTL: Fix error path for initializing mempools
If both allocation paths would fail, then the same mngt path would
execute rollback twice, leading to use after free error.

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I55c9ea5131faabc930fd8ff92ddd9f8d0fd9a0b0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14596
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-09-22 07:10:03 +00:00
Michal Berger
fc1c9aafe6 perf/vhost: Allow to only generate the fio configuration
This use case was missed during the initial refactor introduced via
008f8a8617. CI depends on it so allow to specify the target location
of the fio configuration and allow to skip call to the main perf
wrapper.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ie41f9db40769980047f42475ce74e61c374c364c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14590
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-21 22:51:24 +00:00
Michal Berger
370a63e2b9 pkgdep/git: Patch for ice targeting latest 5.19 kernels
Currently, fedora36 is shipped with the 5.19 kernel.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Ia575e5063aa98819ed0e66ffee1e0aaac995f4fa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14244
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>
2022-09-21 22:47:12 +00:00
Damiano Cipriani
3e917320b9 spdk_dd: Add data and hole management
A logic has been introduced to skip hole in files and
bdevs and so to copy only data. For files lseek is used, for
bdevs new bdev API spdk_bdev_seek_[data,hole].
Show progress function will display only affected size_unit

Signed-off-by: Damiano Cipriani <damiano.cipriani@suse.com>
Change-Id: Ide2b0d825267603d45e00872ea719c8f0e82a60c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14363
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-21 19:54:37 +00:00
Damiano Cipriani
552a26d9d9 spdk_dd: Add check on block size
If passed as a parameter, block size must be a multiple of input
native block size, so a check to control this requirement has been added

Signed-off-by: Damiano Cipriani <damiano.cipriani@suse.com>
Change-Id: I38c41afd421083ba0864d5066d9978cb29bdaed6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14554
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-09-21 19:54:37 +00:00
MengjinWu
03843f73cb lib/nvme: disable multi c2hs crc32 offload at host
An example:
There are 3 c2h data PDUs for one read request. Data digest is
enabled, accel_poller is enabled. The first PDU will be offload
to accel_poller. Then the others will use CPU to calc the crc32c.
If the last PDU is calc done and the first PDU is not calc down,
SPDK will direct success the read request, and free some objects.
When accel_poller calc down, it will find the request is freed,
and abort the SPDK.

Disable multi c2hs async process to prevent this situation.

Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: I03c9e5b30622bbe84523c0836aa93cfed672896
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14079
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-09-21 17:01:46 +00:00
Krzysztof Karas
1819d49e4f sw_hotplug: run the hotplug in the background
Currently we run the remove_attach_helper() function
in the background and hotplug application in the
foreground - if hotplug hangs unexpectedly, the whole
script will freeze.

This patch pushes hotplug to run in background to ensure
the control over the whole test is on sw_hotplug.sh
script's side. This way we can enforce a timeout and
stop the execution.

Change-Id: I5ae5e4e029f65faf5d41e2f7e1d576823d30ac33
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13407
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-09-21 15:47:36 +00:00
Kamil Godzwon
a252cf7c59 dpdkbuild: disable LTO while using clang compiler
Disable LTO while using clang compiler due to unsupported
fat LTO objects error.

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I511e92144c974e8a55d503f58d2ae45bef62eb68
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14557
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-09-21 14:01:16 +00:00
Karol Latecki
92b643b0b2 scripts/nvmf_perf: get systems NIC numa node function
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I254bd86336a5effaa7c78559b2b654809a673712
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13513
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-09-21 14:01:06 +00:00
Karol Latecki
23e767c4a5 scripts/nvmf_perf: add workload offset option
Use fio "offset", "offset_increment" and "size" to
split target file into chunks, so that each fio
job clone (specified by "numjobs") gets it's own
part of the disk to work with.

This is especially helpful in case of sequential
workloads run with numjobs > 1 and helps to keep
the workload to being as close to sequential as
possible.

Change-Id: I1ca88ae56136d22cf396f464d78b05eff5c07a2a
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13515
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-09-21 14:01:06 +00:00
Jim Harris
9633d482a7 nvmf: emit add_listeners RPCs after add_ns RPCs
When emitting the JSON-RPC text for saving the
current configuration, add the listeners last.

This is usually the preferred order when
configuring a new subsystem - it is better to have
all of the namespaces and hosts added to the subsystem
before adding the listener to allow hosts to connect
to it.  We support namespace hotplug but there's
no need to unnecessarily generate hotplug events
if we can avoid it.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I79e8a0a496eeb128efbb7e314ac835b6110d3cc8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14586
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-09-21 08:50:08 +00:00
Krzysztof Karas
dc43aae54d hw_hotplug: use all available GPIO lines
Prepare Beetles to use all available GPIO lines to
manage NVMe drives.

The two reasons are:
 + we want to test multiple NVMes instead just one
 + setting all GPIO will make it easier to physically
   connect NVMe connectors to Beetles

Change-Id: I0351dd2e7cfef0a75eff0692be3c746ad1b5664f
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13748
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2022-09-21 08:48:25 +00:00
Artsiom Koltun
f110891143 sma: use response message for DetachVolume rpc
Signed-off-by: Artsiom Koltun <artsiom.koltun@intel.com>
Change-Id: I8ae08b86d4fac0bc38ebfbfc8fd2126a11a5b11b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14585
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-09-21 08:19:05 +00:00
MengjinWu
00005ed8d5 nvmf/tcp: eliminate function 'nvmf_tcp_pdu_payload_insert_dif'
This function is called only once and can be eliminated.

Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: I0b3e80c025b60a816e2113f859907f95e96dd183
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14578
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-09-21 08:18:56 +00:00
MengjinWu
252c053e6f nvmf/tcp: insert dif after all payload received
'nvmf_tcp_pdu_payload_insert_dif' can be done after receiving
whole payload data as an optimization.

Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: I3054079427c25d102477ef8ec1b288631741d7a3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14577
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-09-21 08:18:56 +00:00
Ben Walker
712e8cb7ef accel: Refer to plugins as 'modules' instead of 'engines'
This is consistent with the use of terms in other parts of SPDK and fits
with the code living under module/

Change-Id: If182f7cf2d160d57443a1b5f24e0065f191b59b2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13919
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-21 08:17:48 +00:00
Krzysztof Karas
40cb3961ec hw_hotplug.sh: add -q option to grep to generate fewer logs
Change-Id: I24ab10a3021d52e71bb20cd2cdf748fa8713339c
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14523
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: Karol Latecki <karol.latecki@intel.com>
2022-09-21 08:17:16 +00:00
Shuhei Matsumoto
a2327b080d doc/nvme_multipath: Suggest transport_ack_timeout for fast error detection
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Icbdac9102920c004c2b88ef371d11488208727df
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14482
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-09-21 07:52:44 +00:00
Shuhei Matsumoto
2826ef13ce bdev/nvme: Fail reset sequence immediately if ctrlr is already removed.
After a controller was hot-removed, if a reset sequence started to
the controller, spdk_nvme_ctrlr_disconnect() failed and caused core
dump in debug mode.

When implemented, how to cause the failure and how to process the
failure were not clear. Hence assert was added to detect the
failure.

We know how we cause the failure now. Let's handle the failure
appropriately.

If spdk_nvme_ctrlr_disconnect() fails, we are on the nvme_ctrlr->thread.
Hence call bdev_nvme_reset_complete() with failure immediately.

Even if spdk_nvme_ctrlr_disconnect() completes synchronously, the
completion callback is executed asynchronously when polling an adminq.

Hence set the completion callback only if spdk_nvme_ctrlr_disconnect()
succeeds.

Fixes issue #2632

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I11f61853aba9eca2515592f964a291e59def7247
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13892
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-21 07:52:44 +00:00
Shuhei Matsumoto
6439abc0d8 bdev/nvme: Ignore failure of I/O qpair creation if reconnect and retry are enabled
By a recent improvement, failure of I/O qpair creation is ignored
if the nvme_ctrlr is being reset or scheduled to reconnect.

However, failure of I/O qpair creation is not ignored if a new I/O
channel is allocated. It is normal to allocate a new I/O channel
when a nvme_ctrlr is being reset or scheduled to reconnect.

Fix this bug by relaxing the condition to ignore the result of
bdev_nvme_create_qpair() to if reconnect_delay_sec is non-zero and
bdev_retry_count is non-zero.

If reconnect_delay_sec is non-zero, reconnect will be tried sooner
or later, and if bdev_retry_count is non-zero, submitted IOs will be
queued until it succeeds.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Icf26e1ea65d292f9b8d24966abe25907d2cc33ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14446
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-09-21 07:52:44 +00:00
Changpeng Liu
7ad783c8a3 nvmf: declare new added migration APIs are experimental
Change-Id: If40b6ec81035bbd8d5e61748c3ff47f928930f74
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14587
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: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-09-21 07:52:22 +00:00
Michal Berger
ea741a29bd autopackage: Limit LTO build to nightly unittest-based jobs
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I568c181745b093fcd48b71788e52b9ee4b6c68da
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14556
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-09-21 07:49:50 +00:00
Jaroslaw Chachulski
c8630869c4 test/compress: change environment variable to "NET_TYPE=virt" in
nigthly tests

It will allow tu use veth devices for TCP transport

Signed-off-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com>
Change-Id: Ia3d945b9ff3e7eb9f4cd8489d933757704f51ef2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14579
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-09-21 07:49:41 +00:00
MengjinWu
e4569bd421 test/nvme_tcp: Correct the psh_len in nvme_tcp unittest
psh len is not the same with header len.

Add an assert in nvme_tcp.c to prevent this happen again.

Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: Ibc250752bedf3da8994f79c51fb01577a222d364
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14521
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-09-20 20:29:40 +00:00
MengjinWu
0b7f5a57ac nvme/tcp: remove unnecessary if check in nvme_tcp_read_pdu
This "if" is of no use here.

The state machine has the "NVME_TCP_PDU_RECV_STATE_AWAIT_PDU_CH"
state means the pdu does not receive enough length of header.

Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: Id50943f77b570fd337e2bb4e3b45281018d159e4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14504
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-09-20 20:29:40 +00:00
Aleksey Marchuk
bf41b46c4e nvmf: Don't reg additional MRs
RDMA transport registers MRs for in-capsule
data buffers, commands and completions. Since
these structures are allocated using huge pages,
MR for these buffers are already registered, we
only need to translate addresses.

Signed-off-by: Aleksey Marchuk <alexeymar@nvidia.com>
Change-Id: I90c53d8276d72077f7983e9faf9160e9ede52a7d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14430
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-09-20 20:27:52 +00:00
Aleksey Marchuk
c66b68e94e nvme/rdma: Inline nvme_rdma_calloc/free
These functions used to allocate resources
using calloc/spdk_zmalloc depending on the
g_nvme_hooks pointer. Later these functions
were refactored to always use spdk_zmalloc,
so they became simple wrappers of spdk_zmalloc
and spdk_free. There is no sense to use them,
call spdk memory API directly.

Signed-off-by: Aleksey Marchuk <alexeymar@nvidia.com>
Change-Id: I3b514b20e2128beb5d2397881d3de00111a8a3bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14429
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-09-20 20:27:52 +00:00
Aleksey Marchuk
77aef307fd nvme/rdma: Don't reg MRs for cmds and rsps
Since now cmds and rsps buffers are allocated
from huge pages, there are already registered
MR for this memory. In that way  we can avoid
registering 2 additional MRs per qpair, just
perform memory translation to get lkey.

Signed-off-by: Aleksey Marchuk <alexeymar@nvidia.com>
Change-Id: I2cb39a15e5d224698c293ac18af00a909840eaa8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14428
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-09-20 20:27:52 +00:00
Kozlowski Mateusz
0991dfd449 ftl: Remove unnecessary bdev_nvme_detach_controller from test
The target application is shutdown shortly afterwards anyway. This
prevents an intermittent failure in the lvol layer in the meantime.

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I8913dff33bea985400c85fc477c6d2a7876593d3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14574
Reviewed-by: Michal Berger <michal.berger@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-09-20 19:24:26 +00:00
Kozlowski Mateusz
920c1cca18 ftl: Change metadata to use structure packing
Don't rely on compiler for metadata packing to 4KiB size and add
reserved fields manually. For compatibility reasons against metadata
relying on automatic padding the reserved fields are also added in-between
existing fields as needed.

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I5e342d5bf5948c213d455590d09597ae120b3c62
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14307
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-20 19:24:26 +00:00
Kozlowski Mateusz
c332181331 FTL: Move base device sb to LBA 0
Moving the superblock of the base device to sector 0, in order to
prevent other bdevs (e.g. GPT or blobstore) from potentially hijacking
the base device during startup (if their metadata by 'luck' manages to
find itself at sector 0 of band 0, which depending on the order of
operations could be very likely).

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I8a6eb3c89a229f443ef23d975a8ff0880ba65b08
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14143
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-20 19:24:26 +00:00
Kozlowski Mateusz
759e176927 lib/ftl: Don't retry on write failure
Retrying on write errors is generally not needed, by default FTL will
fail now in such cases. If retry is preferable, an additional build flag
must be supplied.

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I8ed1fe140564f08905bdf7fc6d6aa86a7585693a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14114
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-20 19:24:26 +00:00
Artur Paszkiewicz
d1dd6ca814 ftl: check structure sizes for future ABI compatibility
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ic32f6fe085d94b00d025b6cab7e5073341169a73
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13677
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-20 19:24:26 +00:00
Kozlowski Mateusz
4759b0b6a6 ftl: Add explicit values to the ftl_layout_region_type
This should prevent accidental reordering/removal of regions from
causing problems after loading against such changed metadata.

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I75c62810157db4bb0de4dfc84f5656fd187befde
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13614
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-20 19:24:26 +00:00
Kozlowski Mateusz
7f5a982f3c FTL: Update documentation
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I78141ecf086d8ace07f9d8194c8eb9f64201a939
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13393
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-20 19:24:26 +00:00
Artur Paszkiewicz
63b2fecb3f ftl: nv cache write throttling
Adds user write throttling - since writing to cache must be balanced
against the ability to compact the data to the base device, this
throttling mechanism allows for a smoother, more stable performance
levels - tying the user write speed to the compaction drain speed.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: Ia85efeb387f17c6c080b23ae4e658a6d7e47a2fb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13392
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-20 19:24:26 +00:00
Artur Paszkiewicz
8a76d5500d ftl: I/O tracing
Adds tracepoints in FTL.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I661703e42b8b531822a2ba74a09cdc716daa1c46
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13391
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-20 19:24:26 +00:00
Artur Paszkiewicz
1790ee8a8d ftl: I/O statistics
Add gathering of some performance counters and RPC for printing them.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I2e77d37fb66459240ff2e241f2b1f77c60f4eef4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13390
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-09-20 19:24:26 +00:00
Kozlowski Mateusz
d748bc41e2 ftl: Add layout upgrade to management path
Execute the upgrade management path during startup. Will attempt to
update metadata and verify layout validity.

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I2cff15cbe87836ca8b7700d0e3f4eee0f331ac56
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14450
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-20 19:24:26 +00:00
Kozlowski Mateusz
8c41c40331 ftl: Add md upgrade templates for P2L/Band/Chunk from version 0 to version 1
Since P2L, Band, Chunks start at version 1, adding some code blocking the loading
of version 0 for them.

Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I4f5d3a8bb3ed1e39bea18803ffb8ba319a815ae8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13387
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-20 19:24:26 +00:00