Commit Graph

18835 Commits

Author SHA1 Message Date
Jim Harris
79c9b1e5df idxd: rename internal header file to idxd_internal.h
This avoids confusion with the public idxd.h
header file which causes problems with abidiff.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7910c93d9d95b99c82f4dfdba845e6804e1b6568
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13729
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-21 07:03:26 +00:00
Changpeng Liu
6abb4764ad nvmf: check interleaved metadata size when adding NS
When doing DIF insert and strip, we will reserve extra
buffer in block device layer to save DIF information,
so when attaching one device to Namespace, we will
check the value first so that the reserved buffer
size isn't smaller than metadata size.

Change-Id: Id9272886ce8a7c01271279686730af4e5b24f35a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12188
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@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
2022-07-19 12:31:59 +00:00
Changpeng Liu
c650b7eae3 bdev: increase metadata buffer size to 64
Many SSD drives can support up to 64 bytes of metadata
size, so here we define a macro in bdev.h and set the
default size to 64.

Change-Id: Ie30831d61cd66b8f5904daa38101d1a77141214e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12355
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: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-19 12:31:59 +00:00
Changpeng Liu
a438718fc2 nvmf: don't report E2E Protection Capabilities to client
When `dif_insert_or_strip` is enabled, NVMf library will do
DIF insert and strip automatically, client isn't aware of
it, when `dif_insert_or_strip` is disabled, we will report
Namespace E2E Protection Capabilities to client, but we
don't process PRACT and PRCHK flags in NVMf library, so
here we don't report the capabilities to client and leave
the use of extended LBA buffer to users.

Change-Id: Ic610dc65fef210a7799c6ab693d89138b99e1193
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12165
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-19 12:31:59 +00:00
Konrad Sztyber
7f83361553 sock: add sock_impl_opts to sock_opts
Some of the options in sock_impl_opts could be different for different
sockets (even if they're using the same impl).  However, outside of a
few selected options (recv_buf_size, send_buf_size), there was no
interface to change them.

This change will allow users to change impl_opts on a per-socket basis
when creating a socket.  Sockets created through accept() inherit
impl_opts from the listening socket.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I7628ae19def25cef6ffa62aa54bd34e446632579
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13661
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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2022-07-19 09:35:03 +00:00
Konrad Sztyber
cfe2d76db2 sock: remove zerocopy_threshold from spdk_sock
Now that spdk_sock has impl_opts, we no longer need to store a copy of
impl_opts.zerocopy_threshold in spdk_sock.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I96377e330351b1afb57811578acfadf05d53f49c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13660
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2022-07-19 09:35:03 +00:00
Konrad Sztyber
50afaf1ee8 sock: store impl_opts in socket structure
It'll make it possible to change some of the impl_opts options on a
per-socket basis, as well as make it easier to use fields common to all
implementations in the generic layer.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Id3b5e0a0b302fdecc2387d07fb87b75b487dc5c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13659
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>
2022-07-19 09:35:03 +00:00
Alexey Marchuk
36589e1e44 bdev_nvme_rpc: Update bdev_nvme_get_io_paths RPC
This RPC prints only cntlid, to identify a controller
it is needed to issue bdev_get_bdevs and find more info
using cntlid. Printing the controller's trid helps to
identify the controller faster.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I97325b822528ef9e71afbe2ff1c30b3bce2ae203
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13655
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 <smatsumoto@nvidia.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-07-19 08:05:07 +00:00
Michal Berger
269737b902 scripts/fio-wrapper: Simplify check for bdev devices
While testing fedora35 under 5.18 kernel it was noticed that the
sysfs dir structure changed comparing to older versions of the
kernel. To make sure proper devices can be found regardless of
the kernel version simplify the process by just looking up
the model of the ctrl given nvme block device is connected to.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I7ff55c8d8c50acd2a117bed2a31ddb9890615e18
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13674
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-18 13:00:17 +00:00
Artur Paszkiewicz
b71eebd85a ftl: mngt: pass status and ctx directly to completion cb
Also remove ftl_mngt_get_status() because it won't be necessary now.

Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I335831cb1c506379e9afeb0bf87f1f873033073d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13668
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-07-18 12:54:48 +00:00
Kamil Godzwon
10abf16de2 vagrant: add Fedora36 support
Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Iced5b9d20671f27c5fad975cded0e44beff74f4f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12996
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2022-07-18 11:51:23 +00:00
Karol Latecki
8f4be72ee9 pkgdep/git: suppress werrors during nvme-cli building
Suppress werrors when building nvme-cli as they are
redundant for SPDK in general

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I173eae198db5cfc26cbc6b75aa36b0aad8077a79
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12229
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-18 11:51:23 +00:00
Kamil Godzwon
ac3f864830 pkgdep/git: remove cherry-picking for 21.04 in refspdk
Those lines are needed no more due to no 21.04 support

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Ia53b04ce6953fed0fbb19779199382f63801380b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13498
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
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>
2022-07-18 11:51:23 +00:00
Kamil Godzwon
1ca5b341e5 pkgdep/git: update QEMU vanilla version to 7.0.0
Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: Iee62082b7ec6be57373495bdff84c99bf53f1345
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13644
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-18 11:51:23 +00:00
Kamil Godzwon
ea98ada0e5 pkgdep/git: disable werrors while QEMU compilation
Disable werrors during QEMU compilation because
it doesn't matter for SPDK in general.

Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I55f68a585c3540192732883f42fae98f269e0022
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13645
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Michal Berger <michal.berger@intel.com>
2022-07-18 11:51:23 +00:00
Jacek Kalwas
0adabc9eb1 lib/nvmf: rm nvmf_poll_group_add_transport from internal header
it is impl and used only in nvmf.c source file

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I1236f9ede28c5da313d118ce73e1da64381379c5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13664
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-07-18 10:18:19 +00:00
GangCao
0b92da6c48 NVMe/TCP: explicitly initialize the cpl structure
To fix the Klocwork issues.

Change-Id: Ib9e490cd3f2140a1c2f86300979efd604054b972
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13695
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2022-07-18 10:16:29 +00:00
Alexey Marchuk
3512714b3f nvme_fabrics: Lock mutext when prcessing set/get regs
That is possible to get/set registers from any thread,
during regs processing we are polling admin qpair to
get a completion. At the same time, another thread
can also poll admin qpair and that can lead to
undefined behavior.

This patch fixes an issue when bdev_nvme is configured
with io_timeout. If remote target becomes unresponsive
(e.g. due to link down), IO timeout occurs and bdev_nvme
tries to get csts registers in timeout_cb. At the same
time another thread can process adminq, so we may have
2 simultaneous adminq polls. If admin qpair is disconnecting
at that time (RDMA transport) we may destroy resources
twice from different threads.

We don't see a problem with set_regs function but it
won't be redundant to lock mutex in set_regs as well.

Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I7ec3984d25d0249061005533d13b22315b44ddf2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13687
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>
2022-07-15 16:06:54 +00:00
Krishna Kanth Reddy
6f338d4bf3 bdev : xNVMe BDEV module implementation
This implementation of xNVMe BDEV module supports the char-device / ioctl-over-uring,
along with the "regular" io_uring, libaio, POSIX aio, emulated aio (via threadpools) etc.

Code changes done :
a. Addition of xNVMe submodule to SPDK
b. Modification of RPC scripts to Create / Delete xNVMe BDEVs
c. Implementation of xNVMe BDEV module

Signed-off-by: Krishna Kanth Reddy <krish.reddy@samsung.com>
Change-Id: If814ca1c784124df429d283015a6570068b44f87
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11161
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Changpeng Liu <changpeng.liu@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-07-15 12:52:13 +00:00
GangCao
8f2ca281ec Bdevperf: properly handle and display the IO failure
Fix issue: #2568

Related test case is also updated.

A summary of the handling as following:

--json (json file used) and -f (continue_on_failure is set), the test case will run until end
--json (json file used) and as long as there is 1 Bdev met IO error, the test case will end when error happened

-z (wait_for_tests is set, means by RPC perform_tests) and -f (continue_on_failure is set), the test case will run until ctrl-c is triggered and will not end when run time is over as we could send RPC (perform_tests) several times
-z (wait_for_tests is set, means by RPC perform_tests) and as long as there is 1 Bdev met IO error, the test case will end when error happened

Change-Id: I886fc5cbd836f3bc5db618e7143cd3a556ea5e7b
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13490
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: <qun.wan@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-07-15 12:51:52 +00:00
Jim Harris
9cb5f885df nvmf: decrement mgmt_io_outstanding for all AER cases
We cannot count AERs as outstanding IO for purposes
of subsystem pause, because we cannot expect them
to be completed. Previously we would account for this
in nvmf_ctrlr_async_event_request() by decrementing
the counter, but this did not consider cases in the
calling function (nvmf_ctrlr_process_admin_cmd) where
an AER might complete with error before this function,
resulting in the counter getting stuck indefinitely
with a >0 value.

Rather than adding a decrement in all of those
error cases, do a single check at the beginning
of nvmf_ctrlr_process_admin_cmd, and remove the
one from nvmf_ctrlr_async_event_request.

Fixes issue #2215.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ica969f116d80dfba0168369ff2fba9a4a42fc076
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13678
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-07-15 12:51:31 +00:00
Michal Berger
7cd8de9c2b test/vhost: Avoid globbing in the vm_exec() argument
Since the command including * was being passed unquoted, the actual
pattern was being expanded on the host side. This became problematic
when multiple nvme drives were installed inside the host, e.g. the
command on the VM side was looking for a specific ctrl which didn't
exist there. Fix that by passing the full command as a literal string.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I3a3d578c735b9a07abb6e0bcefd6db0c343fc27b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13675
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-15 12:24:23 +00:00
Konrad Sztyber
030bbebeb2 sock: extract copying impl_opts to a function
Both get_opts and set_opts use very similar macros to achieve almost the
same thing, so it makes sense to extract it to a separate function.
Additionally, it'll be also useful in subsequent patches introducing
per-sock impl_opts, as there will be more places when we want to copy
impl_opts.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I8ab27298d62ea0118463ee945c708acd91aa5104
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13658
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@nvidia.com>
2022-07-14 09:48:25 +00:00
Konrad Sztyber
38f82ecf1e sock: move (get|set)_opts up
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I9ddbfb1018d23117582b947058fcd6c322c2ef6b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13657
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@nvidia.com>
2022-07-14 09:48:25 +00:00
Shuhei Matsumoto
2b78ecf34c example/nvme_identify: Calculate and use active ns count to allocate ANA log page
get_log_page() had used cdata->nn as active ns count to allocate a
ANA log page. However,  cdata->nn might be larger than the real active
ns count. Fix this potential issue.

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ic71b29ad920f8393da7d7db0dab45e10e3268aec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13654
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: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-07-14 09:47:41 +00:00
Shuhei Matsumoto
81e92f6bca bdev/nvme: Calculate and use active ns count to read ANA log page
nvme_ctrlr_init_ana_log_page() had used cdata->mnan as active ns count
to allocate a buffer and read a ANA log page into the buffer.

However, cdata->mnan was larger than the real active ns count and caused
an issue when the corresponding NVMe-oF target set the bit 18 of the SGL
support field in the Identify Controller Data structure.

We still need to use cdata->mnan to allocate the buffer because
number of namespaces may be increased dynamically after initialization.

Hence, rename nvme_ctrlr::ana_log_page_size to
nvme_ctrlr::max_ana_log_page_size and calculate and use the active ns
count to read the ANA log page. Check if the current ana_log_page_size
is not larger than nvme_ctrlr->max_ana_log_page_size.

Fixes issue #2584

Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ieb10b9c793c4f48ffd88d517c0e9a55184b7d935
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13653
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@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-14 09:47:41 +00:00
KanKuox123
f97f8032d1 UT/sock:add test case for the struct sock_net_impl
Signed-off-by: KanKuox123 <kuox.kan@intel.com>
Change-Id: Ib7394b553544bd07b7ac5b14922e752b60ca0d43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13528
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-14 09:47:29 +00:00
yidong0635
256bfe7685 raid/concat: update bdev readv/writev to ext API.
Other parts have changed these since readv and writev
support ext_opts.
And change corresponding unittest.

Signed-off-by: yidong0635 <dongx.yi@intel.com>
Change-Id: I79260a7e6110aa46df2016e579f1da5c241c9844
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13620
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 <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2022-07-14 09:46:56 +00:00
Michal Berger
2c65d55675 pkgdep/git: [dpdk_kmods] Patch for changes in use of pci_ API
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I202d60bcd721c11d1729731f01e1a4133e0c1a24
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13450
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-14 09:46:31 +00:00
Michal Berger
8d29a9b701 pkgdep/git: [QAT] Use $jobs to speed up the build
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Iaffb19535b4896b68e34691bf083d8f5c1b8a2a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13643
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-14 09:46:31 +00:00
Michal Berger
189961d9d7 pkgdep/git: [QAT] Patch for recent changes in kobj_type struct
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Idccb0aa83fdd3665d222c48d142665fa5483464e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13642
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-14 09:46:31 +00:00
Michal Berger
0b6b6d4152 pkgdep/git: [QAT] Patch for changes in use of pci_ API
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=c726c62db857d375800af7e82eb1c6f639e87631

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I9d5aea3391eff9277109d3a7d35070dacb82ae76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13641
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-14 09:46:31 +00:00
Michal Berger
fe31d16c82 pkgdep/git: [ICE] Patch for incompatible-pointer-types raised in ice driver
This has been spotted while testing fedora36 builds
and fedora35 with the newest >=5.17.x kernels.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Signed-off-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Change-Id: I012e293d2e6be65f9de80109f4e180ccbc1cd668
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12232
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-14 09:46:31 +00:00
Michal Berger
0a25fa3b31 pkgdep/git: cherry-pick dpdk fixes to release and LTS checkouts
This brings commit targeting fixes for the pu macros usage under
latest freebsd (13.x).

Also, group cherry-picks into cherry_picks() and apply them
together before the build starts.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: Id49aa3d6eb065d8bb92f48402304c4f11f3c047f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13544
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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: Kamil Godzwon <kamilx.godzwon@intel.com>
2022-07-14 09:46:31 +00:00
Michal Berger
f4e0fc096e pkgdep/git: Use $kernel_ver in global scope
Preparation for incoming patches in the series.

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I46a9c68b89034793083f536b8d3b20f68ad1482e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13640
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Kamil Godzwon <kamilx.godzwon@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-14 09:46:31 +00:00
Konrad Sztyber
c61554bb68 sock/uring: mark non-listen sockets as blocking
Instead, we pass MSG_DONTWAIT flag to all recvmsg()/sendmsg() calls.
That way, the IOs remain non-blocking, but the socket is marked as
blocking allowing us to pass flags like MSG_WAITALL, which only make
sense if a socket is in blocking mode.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: Ic52162e84aa14efaf6ad0fb3343d289822758e81
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12592
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 <smatsumoto@nvidia.com>
2022-07-14 09:45:54 +00:00
Konrad Sztyber
466f9e8b20 sock: extract prepping iovs for a single req to a function
It'll make it possible to reuse this code for asynchronous read
requests.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I2c2c44feee0821c972aa2a43d8a8ec81f3ce4ef4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12591
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-07-14 09:45:54 +00:00
Konrad Sztyber
6d3506d893 sock/uring: extract advancing req's offset to a function
It'll make it possible to reuse this code for asynchronous read
requests.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I56dab62587884e2e37fad11b5f0d12df92e175ea
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12590
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 <smatsumoto@nvidia.com>
2022-07-14 09:45:54 +00:00
Konrad Sztyber
f34ce6fb07 sock: add spdk_sock_request_complete
Extracted the code that completes requests to a separate function.  This
will make it possible to use it with read requests, which aren't using
request queues.

Change-Id: I101f36bab6def753d548d766acd17020b504873e
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12173
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 <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-14 09:45:54 +00:00
Konrad Sztyber
6453cbe783 sock/uring: rename sock_complete_reqs -> sock_complete_write_reqs
This function processes and completes asynchronous write requests, so it
makes sense to rename it.  This is done in preparation for handling
asychronous read requests.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I3f36631dc24a3170204aaaba56f4968be0672fe5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12172
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 <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-14 09:45:54 +00:00
Konrad Sztyber
98b3ff5656 sock/uring: rename recv task to errqueue
This task is used to receive the socket's error queue to check for
completed zero-copy write requests.  The rename is done in preparation
for adding a read task that will actually receive the data from the
socket.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I61bf45e210bb09bd89f3161a75478b41bd8eb070
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12171
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 <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-14 09:45:54 +00:00
Konrad Sztyber
3e47d7fa22 sock: asynchronous readv interface
This patch defines a new function, spdk_sock_readv_async(), which allows
the user to send a readv request and receive a callback once the
supplied buffer is filled with data from the socket.  It works simiarly
to asynchronous writes, but there can only be a single outstanding read
request at a time.

For now, the interface isn't implemented and any calls will return
-ENOTSUP.  Subsequent patches will add support for it in the uring
module and as well as emulation in the posix module.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I924e2cdade49ffa18be6390109dc7e65c2728087
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12170
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 <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-14 09:45:54 +00:00
BinYang0
20cd4841f1 lib/nvmf: set low water mark in NVMe/TCP target to 1 byte
In NVMe/TCP target, the socket low water mark is set to
sizeof(struct spdk_nvme_tcp_common_pdu_hdr), which is 8 bytes.
In corner test, there might be 4 bytes data packet sent to
NVMe/TCP target, after that, if there is no more data sent to
the same socket, the 4 bytes won't be read by NVMe/TCP target
qpair thread. Because of this, there is a IO request didn't
complete in initiator. Then, if manual call the readv function to
read the 4 bytes for the pdu in target, the io request complete
normally in initiator. It seems like the pdu might be split,
and in the situation, the IO request will not complete until
new IO request reach.

After set low water mark in NVMe/TCP target to 1 byte, just
like iscsi target done, the issue disappear immediately.

Signed-off-by: BinYang0 <bin.yang@jaguarmicro.com>
Change-Id: I59d3d900f0b25632d786ef25ab096eabe43476bd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13633
Reviewed-by: <chuanwei.ji@jaguarmicro.com>
Reviewed-by: Qingmin Liu <qingmin.liu@jaguarmicro.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-13 07:28:52 +00:00
GangCao
57f867162e Bdevperf: add a new g_start_tsc for starting the test
Change-Id: Ie88fbf24d5e6559a4add3a34be368efb1b20f803
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13556
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2022-07-12 07:52:26 +00:00
Karol Latecki
474da9ea4f doc: SPDK NVMe Bdev 22.05 Performance Report
Add doc section with URL to 22.05 SPDK NVMe Bdev report.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: If022b4df2b44b3e71a3d1db40b76ddb3eaa4f1ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13617
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-07-12 07:26:35 +00:00
Jim Harris
f3dd8f7e0d bdev: allow NULL md_buf for md-related APIs
It is a nicer API to allow users to use an
md-related API such as spdk_bdev_read_blocks_with_md
passing md_buf as NULL to mean "don't read metadata".
This avoids the need for an if-statement in the users
code to check if the md buffer is NULL before deciding
which API needs to be called.

This basically requires two changes:
1) only check if the metadata is separate for the bdev
   if the md_buf != NULL
2) do not fail if the buffer is specified but the
   md buffer is not (we only need to fail the case where
   the md buffer is specified but the data buffer is not)

Note that spdk_bdev_readv/writev_blocks_ext was already
allowing the metadata buffer to be NULL, but change
those functions too to match the others on how we check
if the data buffer isn't allocated.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I764cf49b9f573fccb19e73876a376fd231cc3580
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13612
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2022-07-11 22:41:35 +00:00
Konrad Sztyber
ee3ec3f7c2 vhost/rpc: return errno from virtio_blk_create_transport
This will allow the code calling this RPC to interpret the error and
check whether the transport already exists (-EEXIST) or some other error
occurred.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I8c4af84763ddba908c59ff881b09834a439186a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13577
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@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
2022-07-11 07:41:22 +00:00
Changpeng Liu
ac31590b37 nvme: make spdk_nvme_ctrlr_free_io_qpair multi-process safe
In the multi-process case, a process may call `spdk_nvme_ctrlr_free_io_qpair` on
a foreign I/O qpair (i.e. one that this process did not create) when that qpairs
process exits unexpectedly.

The variable `qpair->poll_group` isn't multi-process safe, we can't use it
in `spdk_nvme_ctrlr_free_io_qpair` and related transport poll group APIs.

Change-Id: Ic13a6a2c7d760477be5be5a56a45caa2b5518717
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13573
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@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
2022-07-11 07:41:09 +00:00
MengjinWu
427cbb46a3 lib/nvmf: optimize the performance for h2c handle
It will not find the h2c related reqs in the tailq now.
We can get it from tqpair->reqs directly.

Signed-off-by: MengjinWu <mengjin.wu@intel.com>
Change-Id: I25f0900e875b054d7617450477e9719e7a59aa18
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12861
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2022-07-11 07:40:53 +00:00
Thanos Makatos
caadae6c10 nvmf/vfio-user: briefly explain live migration
Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com>
Change-Id: I08d3aa90ec4f3e29bece820919bd39d20c74c6cf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/11745
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: John Levon <levon@movementarian.org>
2022-07-11 07:38:04 +00:00