Commit Graph

16545 Commits

Author SHA1 Message Date
Michal Berger
1d269b072e doc/shfmt: Add note about minimal version of Bash
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Id480d98cfe29f6c7676a39c0bfaf777ba54a6049
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9371
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-10 23:11:41 +00:00
Changpeng Liu
ab8b25793b nvme/compliance: add a case to check NPWG and NWOS in IDENTIFY NS
Change-Id: Ie5ba6f86d7c99e20f56a11fc1623ce74bf5c6bc9
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10110
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-10 23:11:13 +00:00
Changpeng Liu
8d5204acab nvme/vfio-user: remove internal device list
The internal device list isn't used anywhere, and will cause ASAN
error because we didn't remove the entry from the device list when
destructing controller.

Change-Id: Ie97bf10ca44ff773a8bc5f0476611b3844ef901a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10109
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: Ben Walker <benjamin.walker@intel.com>
2021-11-10 23:11:13 +00:00
Michal Berger
ad672ce249 test/interrupt: Fix syntax
return was not used in proper context. Let the errexit do the job to
signal a failure.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I731545c913858286009168041030b4b362cebc32
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9987
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-10 20:30:23 +00:00
Maciej Szulik
864580073f nvmf: fix check for buffs num in nvmf_request_get_buffers
There is no need to sum SPDK_CEIL_DIV(length, io_unit_size) and
req->iovcnt as the later is always zero (assignment in spdk_nvmf_request_get_buffers).
Checking SPDK_CEIL_DIV(length, io_unit_size) is enough.

Signed-off-by: Maciej Szulik <maciej.szulik@intel.com>
Change-Id: I0fea1d86706d83e4dd9083e6f0ce09e4e4b033a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10089
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-11-10 20:25:35 +00:00
Changpeng Liu
d83b2ee4f4 nvme/compliance: add a test case for get log page
Change-Id: I31252b016ad64ba259807dee468adc69dd545138
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10094
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-10 20:23:37 +00:00
Changpeng Liu
7a2a588c62 nvmf/ctrlr: check offset parameter for get log page command
The specification says "host specifies an offset (i.e., LPOL and LPOU)
that is greater than the size of the log page requested, then the
controller shall abort the command with a status of Invalid Field
in Command."

Offset is used (if needed) to retrieve specific records of
Discovery Log Page, so we don't check it for Discovery Log Page.

Change-Id: I76ce929600b9f2ca9b69397d25f339d55729e6d3
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10093
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>
2021-11-10 20:23:37 +00:00
Changpeng Liu
69b6b6cc47 nvme/compliance: add a test case for CREATE IO CQ
Change-Id: I13d3b382e82a8fcdb2f783973df1358555ac88c0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10081
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-10 20:23:37 +00:00
John Kariuki
e18cd48cda scripts/nvmf_perf: fix matching result files
When I use a single json config to run 4k and 64k together, the IOPS
for the 4k test were lower than expected because the script is using
metrics from both the 4k_64_randrw_m_100_* and 64k_64_randrw_m_100_*
to calculate the average metrics because 4k_64_randrw_m_100_* is in
64k_64_randrw_m_100_*. Fixed issue by checking, if the result file
startswith the name of the fio config file.

Change-Id: I630385c34223b38694d7e2bb578779627c89866d
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10127
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2021-11-10 19:54:47 +00:00
Michal Berger
182adb70a7 scripts/vagrant: Add option to specify box version
From the CI perspective, this allows for proper binding of given
VM builds to specific tasks (e.g. use this image for LTS, this
one for release, etc.) since by default vagrant always uses the
"latest" version of given box.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I0cbd2a47e7dbdcbe83d18e3fc3100fd2a2400983
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10132
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2021-11-10 19:54:28 +00:00
Michal Berger
264e0a0a2b scripts/vagrant: Add option to force boot of given distro
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I1b437ee8f63e7cc15e60f611fe0c814542c73ece
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10131
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: Karol Latecki <karol.latecki@intel.com>
2021-11-10 19:54:28 +00:00
Jim Harris
1e2c5b1f3d nvmf: add dtrace probe for nvmf io path
This can be used for multipath validation.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iba62c5e90b22a9a85078fbc783d3a7273c029cde
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10137
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2021-11-10 19:53:32 +00:00
tanlong
0cedafeb63 bdev/nvme:Print multiple namespace attributes of nvme bdev in bdev_get_bdevs
Current code only print the last namespace of nvme bdev, fix the print
way to show all the namespace.

And this patch will be prepared for the next patch to show io path status for multipath, like: which one is the primary or the backup, and the old status and current status,etc.

Signed-off-by: tanlong <948985618@qq.com>
Change-Id: I4fca154df52c929b8d046198934db0e58586c378
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10140
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2021-11-10 19:53:15 +00:00
Alexey Marchuk
1421a35e44 rpc: Fix help message of nvmf_subsystem_listener_set_ana_state
Correct ANA state is non_optimized

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I48c79ab29e714bc93ae99cc552e9a8fcf1da3edd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9004
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-10 19:51:46 +00:00
Ben Walker
504edb1ea5 nvme: Update documentation for spdk_nvme_ctrlr_get_num_ns
Clearly indicate that the value returned by this function has been
misinterpreted so many times that it has been rendered worthless.

Instead, software can use the functions to iterate the active namespaces
as a replacement.

Change-Id: I355f123eac0d33d63716cc333dc674d2ef226dc4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10100
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-10 19:36:27 +00:00
Ben Walker
7ffc8833f6 examples/nvme/hello_world: Iterate only active namespaces
Avoid registering inactive namespaces in the example. They can't be used
for I/O.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I404ca48666b566fd3248a3f56b25ea6509fa8d38
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10099
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-10 19:36:27 +00:00
Ben Walker
6ccc8c1a39 test/nvme: Reset tool now only registers active namespaces
Only active namespaces can be used for I/O.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Idf63e9f5e03244c1671288038fed54831463c3eb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10098
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-10 19:36:27 +00:00
Ben Walker
2dbdb9945c test/nvme: Only test non-contiguous namespaces for NVMe 1.2 or higher
This wasn't supported before NVMe 1.2

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ibf19cd77e522eb11c2091a9f4956f5616876986b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10097
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-10 19:36:27 +00:00
Ben Walker
52e432dff2 test/nvme: Fix buffer zeroing math
This meant to zero the entire active namespace list.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I2da2293b53acd57d3480cf93b052eb1520de35d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10028
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-11-10 19:36:27 +00:00
Jim Harris
be2d126fd6 nvme/tcp: mark variable as potentially unused
nvme_tcp_build_iovs() calculates the plen for
the iovs, but only uses the calculated value in
an assert, so we get set-but-not-used errors in
release builds.  So mark the variable as unused
to squash those errors.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifdf72faa6182c0fba622da9e5e2a33e3c6bbaf86
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10125
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-11-09 05:05:29 +00:00
Changpeng Liu
bf190e2f52 nvmf/vfio-user: return NVMe compliance SC value when creating IO queues
CAP.CQR (Contiguous Queues Required) is always 1, so we should
return invalid field when PC bit is 1 and return Invalid Interrupt
Vector if Interrupt Vector is too big.

Also fix the issue that just creat/delete a CQ.

Change-Id: I7cc64a5946a1ed3161448fca8b433d08e5fee715
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10080
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2021-11-09 05:04:57 +00:00
Changpeng Liu
800e54530e nvme/compliance: add an IDENTIFY NS test case
Change-Id: Ibe62c57202549e13eeefbc2b911d2dbf79b622d7
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10079
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
2021-11-09 05:04:57 +00:00
Tom Nabarro
148a9ab0c0 env/dpdk: retry SO_RCVBUF if SO_RCVBUFFORCE fails
PCI event module currently requires use of SO_RCVBUFFORCE socket option
which is restricted to CAP_NET_ADMIN. Retry with SO_RCVBUF for non-root
(unprivileged) processes where this capability is not available.

Return -ENOSPC if receive buffer is not of sufficient size.

Fixes issue #2224

Signed-off-by: Tom Nabarro <tom.nabarro@intel.com>
Change-Id: I0bed1b1eac0c7e8601d3d172d8027380ec8be391
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10126
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-11-08 16:05:51 +00:00
Changpeng Liu
fded6f0d6d nvme/compliance: add a case to create all IO queue pairs
Change-Id: I99768b4d9b1ef3c81431ea069af93e0a38b05746
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10013
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: Jim Harris <james.r.harris@intel.com>
2021-11-05 00:53:27 +00:00
Jim Harris
823388489b nvme/compliance: add test case for PROPERTY_GET
This is a reproduction vehicle for issue #2218.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ib52d959436550461cf787b918b8870218536a4c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10009
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: Changpeng Liu <changpeng.liu@intel.com>
2021-11-05 00:53:27 +00:00
Changpeng Liu
8f11535d70 nvmf: only process fabric commands when transport is fabric type
Fixes issue #2218.

Change-Id: I9298e4a8d16e7ddda7366aebc63b46c36ab54234
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10061
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: Jim Harris <james.r.harris@intel.com>
2021-11-05 00:53:27 +00:00
Changpeng Liu
46b355c0ef nvme: add an API to check existing transport type is fabric or not
We already provides the API `spdk_nvme_ctrlr_is_fabrics` to return
input controller is fabrics controller or not, but it needs a controller
data structure as the input, so here we add another API to do the same
thing and it takes the transport type as the input, with this change,
both nvme and nvmf library can use the API.

Also we should treat UINT8_MAX(255) as valid fabrics transport type.

Change-Id: Ib62e7d3eca3da1ddb1a4cc55b0b62e274522f1ce
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10059
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: Jim Harris <james.r.harris@intel.com>
2021-11-05 00:53:27 +00:00
paul Luse
fa9e703f4f examples: update pollers to use the expected enum values
Some were still using 0, -1 and/or count values.

Signed-off-by: paul Luse <paul.e.luse@intel.com>
Change-Id: Ic161b5436c55f229f1f1a557d29e395bf8d4f660
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8584
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: Jim Harris <james.r.harris@intel.com>
2021-11-03 23:12:25 +00:00
Krzysztof Karas
87435b7e53 spdk_top: fix column descriptions after window resizing
Currently we run into a visual issue with spdk_top after resizing
terminal, because we redraw all column descriptions, instead of those
in current tab.

Fixes #2219

Change-Id: I3a83a00b5ab03ba17ecdc2984b28da0aa498c6f5
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10087
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: Ben Walker <benjamin.walker@intel.com>
2021-11-03 18:31:18 +00:00
Jim Harris
92d31eb226 init: use strerror when conf file can't be loaded
This makes it more clear why reading a JSON
configuration file failed.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9dae907c839d48068044b09f34b89a2de51cd811
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10057
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: Changpeng Liu <changpeng.liu@intel.com>
2021-11-03 18:30:55 +00:00
Jim Harris
ec2ad00c92 test/unit/raid: fix set-but-not-used error
verify_io() keeps track of a buf pointer, but the
buf pointer never actually gets used.  So remove
this buf pointer.

Found by clang-13.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I79dfeac7f004b56f7d4404f41b2ff18b96968a20
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10056
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-11-03 18:30:55 +00:00
Jim Harris
ab19b5de9b ftl: fix set-but-not-used error
ftl_dev_dump_bands accumulates a total in a local
variable, but the final value never gets used.
So just remove the variable completely.

Found with clang-13.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7a92f6bfa4ae56fc4d8189c887bf0f6d4a05d759
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10055
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: Changpeng Liu <changpeng.liu@intel.com>
2021-11-03 18:30:55 +00:00
Swapnil Ingle
13e5be0b8d lib/nvmf: Set missing fields if OPTPERF is set
As per the nvme specs,
If OPTPERF is set to ‘1’ indicates that the fields
NPWG, NPWA, NPDG, NPDA, and NOWS are defined for this namespace and
should be used by the host for I/O optimization

Setting NPWA, NPDG, NPDA same as NPWG and NOWS same as MDTS

Fixes #2197

Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Change-Id: Ic769a21b6821fa731eeae83e7d30c380e8092e37
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10007
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
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-11-03 04:27:45 +00:00
Blachut, Bartosz
dc82055029 rpc: fix removing a listener with an empty trsvcid
If trsvcid is not set in the nvmf_subsystem_remove_listener call,
rpc client treats it as 'None' and sends "null" to the application,
which causes decode failure in SPDK.

Trsvcid is described as optional and should be treated this way.
For such a listener removal call with an empty trsvcid, "" should be
sent as trsvcid instead of "null" in the json request.

Signed-off-by: Blachut, Bartosz <bartosz.blachut@intel.com>
Change-Id: Ic26907c22a2600c9618354ce8ff63e93e00aec09
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9659
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: Jacek Kalwas <jacek.kalwas@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-11-02 15:24:21 +00:00
Tomasz Zawadzki
ed8be4ad05 dpdk: update submodule to allow using meson >= 0.60.0
This patch moves submodule forward to include patch below:
22e79be44f

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4f2139325cfa7a186fdea24fb2a119f3871c7398
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10053
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-10-28 16:28:58 +00:00
Swapnil Ingle
ed21f81ff1 nvmf/vfio_user: use configurable max_qpairs_per_ctrlr
User may configure opts.max_qpairs_per_ctrlr, so use
opts.max_qpairs_per_ctrlr instead of using fixed default
NVMF_VFIO_USER_DEFAULT_MAX_QPAIRS_PER_CTRLR.

Also do not allow users to configure max_qpairs_per_ctrl >
NVMF_VFIO_USER_DEFAULT_MAX_QPAIRS_PER_CTRLR.

Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Change-Id: Id9f1f796559f3bb8b2d3f5031606050470681b99
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9994
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: John Levon <levon@movementarian.org>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-28 11:34:13 +00:00
Jim Harris
9cb78e1a46 nvmf: change some ERRLOGs to DEBUGLOGs
We generally shouldn't do ERRLOGs based on bad
inputs from the host, so change some of these to
DEBUGLOGs instead.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id42a8e51964e0238cd2841be8ac1d4ccaa1d150d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10037
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dong Yi <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-28 11:33:45 +00:00
Jim Harris
4c5774fd6f scheduler/dynamic: add bpftrace script
This will allow runtime observation of the
dynamic scheduler in a release build.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7436b5dbcaa0df1529f828ef75f4e9335a092893

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9672
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-28 11:33:32 +00:00
Alexey Marchuk
31a1b193a2 perf: Add check that io_size is a multiple of ns sector size
It is possible to specify io_size which is not a multiple
of sector size and in that case real IO will have size
of g_io_size_bytes/sector_size. It is integer division, so
IO will be less than requested by the user. At the same
time performance statistics are reported using io_size
specified by the user (which is bigger than real IO size)
so we have wrong statistics (e.g. we can see BW higher
than NIC line rate).
To avoid this confusing situation, add a check that
user's io_size can be evenly divided by ns sector size.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ie63b5b7b3d99b5c51c10ec09e084fd30d6cb33dd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9733
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: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2021-10-28 11:33:14 +00:00
Michal Berger
089cbda8bf autobuild: Adjusting crypto build for latest DPDK (21.11)
Details of the changes here:
918fd2f146.

They mainly target the aesni_mb driver which was moved to ipsec_mb and
bump the minimal supported version of the ipsec to v1.0.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: Ica3b4fd66684751939159511845eb6ac6f7d5205
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10003
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2021-10-28 07:08:26 +00:00
Shuhei Matsumoto
85c77ec183 bdev/nvme: Add "multipath" to the bdev_nvme_attach_controller to enable multipath
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I57aad8ffe9e60d8535e523de55f88649bfffdb39
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9869
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-27 11:53:31 +00:00
Shuhei Matsumoto
84ac18e545 bdev/nvme: Update ANA state if I/O failed by ANA error
If I/O got ANA error, ANA state may be out of date. So in this case
read ANA log page and update ANA states. Mark nvme_ns to be updating
to avoid using while updating ANA state.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia43d38b3a589c84d6d0479dedcced033e76fb194
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9458
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-27 11:53:31 +00:00
Shuhei Matsumoto
f3fec96c20 bdev/nvme: Protect ANA log page from concurrent reads by using an new flag
If an I/O failed by ANA error, the corresponding ANA state might be
out of date. In the following patches, for this case, read the latest
ANA log page and update the ANA state. Such reading ANA log page may be
done on multiple threads concurrently including AER ANA change.
Hence protect ANA log page by adding an new flag ana_log_page_updating
to struct nvme_ctrlr and using it.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8bb84091d50a5fdc0d9893b585be972dfd31c0f1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9526
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-27 11:53:31 +00:00
Shuhei Matsumoto
1e79d21967 bdev/nvme: Use bitfields to pack a few flags of struct nvme_ctrlr
This will enable us to add more flags without creating any extra hole.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I166e2bd3d116c8cebf75bfe4f290b390d9e3888e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9851
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2021-10-27 11:53:31 +00:00
Shuhei Matsumoto
43adb646b8 bdev/nvme: Retry failed I/O up to retry_count times
Add bdev_retry_count to spdk_bdev_nvme_opts and retry_count to
nvme_bdev_io, respectively.

Set type of both to int because we want use -1 for infinite retry.

Set the default value of bdev_retry_count to zero for the backward
compatibility.

bdev_retry_count is configurable by the RPC bdev_nvme_set_options.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9bc746fcea54aa8722c76f79c70c2ae2b375aa53
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9864
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: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-27 11:53:31 +00:00
Shuhei Matsumoto
4495bda43f rpc/bdev_nvme: Deprecate retry_count and add transport_retry_count instead
retry_count of struct spdk_bdev_nvme_opts controls the number of retries
in the transport layer, and is set to transport_retry_count of struct
spdk_nvme_ctrlr_opts.

The next patch will add bdev_retry_count to struct spdk_bdev_nvme_opts
to control the number of retries in the bdev layer.

For clarification, rename retry_count to transport_retry_count of
struct spdk_bdev_nvme_opts. Then deprecate the retry_count parameter
and add and use an new parameter transport_retry_count instead for
the RPC bdev_nvme_set_options.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0689c54aa1c96ee99d24236e8ff1a594ad7208e4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9924
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-10-27 11:53:31 +00:00
Changpeng Liu
9024562463 vbdev_delay: fix wrong usage of spdk_for_each_channel()
We can't call spdk_io_channel_iter_get_channel() in the
completion callback of spdk_for_each_channel(), the value
is always NULL.

Change-Id: I65bc972da8a7ab309f3cab438432196a59f26bd4
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9983
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-10-27 07:31:15 +00:00
Changpeng Liu
534e2e7c04 nvmf: only change CSTS RDY and SHN after no connected IO queues
When doing controller reset and shutdown, we may change the
CSTS.RDY and CSTS.SHN even there are pending IOs in the IO
queues, so here we add a timer in the reset and shutdown
callback, it will change the status when there are no
connected IO queues.

Fix #2199.

Change-Id: I3a54d30b257973661b269ad5e37637490f9390f4
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9908
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
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2021-10-27 07:31:15 +00:00
Alexey Marchuk
3d8904c66b nvmf: Add discovery filtering rules
SPDK nvmf target reports all listeners on all subsystems
in discovery pages, kernel target reports only subsystems
listening on a port where discovery command is received.

NVMEoF specification allows to specify any addresses/
transport types. Ch 5: The set of Discovery Log entries should
include all applicable addresses on the same fabric as the
Discovery Service and may include addresses on other fabrics.

To align SPDK and kernel targets behaviour, add filtering
rules to allow flexible configuration of what should be
listed in discovery log page entries.

Fixes #2082

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: Ie981edebb29206793d3310940034dcbb22c52441
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9185
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2021-10-25 22:57:48 +00:00
Jim Harris
e40bd53175 nvme/pcie: only set qpair state from qpair's thread
The qpair's state member is only 3 bits of a uint8_t,
and the in_completion_context bit is another bit in that
same uint8_t.

We know that the qpair's state is only ever updated by
one thread, but it is possible that the state could
be modified by one thread, while another thread
is modifying in_completion_context.

in_completion_context is only modified by the thread
that is polling the qpair (or the qpair's poll group).
But with async mode, another thread that has a qpair
on the same PCIe controller could poll its adminq and
reap the SQ completion for the qpair that's owned by
the other thread.

So do *not* set the generic qpair state to CONNECTED
from the SQ completion callback.  Instead just set
the pcie_state to READY, and let the thread that owns
the qpair detect the qpair is READY and set the state
to CONNECTED itself.

Fixes issue #2157.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9efc0c954504f1841e1c3890ae78211ad0d1990e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9975
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.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>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
2021-10-25 19:53:14 +00:00