This isn't really needed, and actually hinders
things like Seastar which use more recent C++
variants.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7ce3d0578d6832a5d2b26c661bf7a7e2119bcac5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470079
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This was changed recently to enable a shell coding style checker, but $*
does not represent the number of arguments supplied to the function,
rather it is an alternative version of $@ that stores all arguments in a
single string. So we should be checking against an empty string and not
0.
By checking against 0, every time we passed 0 into vm_wait_for_boot, we
tried booting every vm in that directory. This causes errors on nightly
tests and intermittent failures during per-patch testing.
Change-Id: I1850ea73ea59fdc244de1a91e4c6de1b4505e518
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470087
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch adds reference counter and gurading mutex to bdev_desc
structure to keep track of in-flight messages and avoid release of
descriptor until all of messages has been processed. With reference
counter existing remove_scheduled field in descriptor structure is not
needed anymore.
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I97f78955362b04131abf202ba04e6d60343f3faf
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469620
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Separating these two functions will make possible to use
create_ctrlr function for othe NVMe bdev types in the
future.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I3d503a3bf0d317f77beeb827c761b93d66a643ea
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468593
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>
Zoned bdev properties were added to the result of the get_bdevs RPC
call:
- zoned: indicates whether the device is zoned or a regular
block device
- zone_size: number of blocks in a single zone
- max_open_zones: maximum number of open zones
- optimal_open_zones: optimal number of open zones
The "zoned" field is a boolean and is always present, while the rest is
only available for zoned bdevs.
Change-Id: Ib82b39d4ab20543d0a754dbc4c0317885fb831d1
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467144
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The puprose is to print some trace info. We support
it in nvme identitfy. Also -L is occupied by other usage,
so we use -T instead.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I29f018c2a5951e5e3aad04dbeaa7ee74a2d7e3f4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469919
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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>
Next commits in the series will need these callbacks in other tests
that are closer to the beginning of file.
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I55e346f273f169c7894f662dcfa1f57a02024577
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469708
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Python byte code files are created with root ownership
if autotest.sh is run with sudo. This can cause permission
problems when doing "rm" or "git clean".
Change-Id: I0a099dcd94732bb293aea1bf0278656db0afba5f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469864
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
spdk_bdev_zone_append() allows writing to
open zone from multiple threads or from
single thread with queue depth greater than
one. Zone first logical address and number of
blocks to be written are provided by user.
Logical block address of written data is
returned in completion callback.
Change-Id: I4da994d72b7e0fe6621962e3b0f2380940ec3b45
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461614
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>
We need to wait for ANV event completions when
unregistering device.
Change-Id: I872297da98405f16804a6fa1eb1149f0ee55b00c
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468600
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
1. Log level change to info when checking support
2. Delete new lines
3. Enlarge the timeout seconds to 10min for revert
TPer as it sometimes need 6-7min for this operation.
Change-Id: I1b7e32917bd99c859f1515b07f2530669418f0db
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468915
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: Paul Luse <paul.e.luse@intel.com>
The type of iovcnt of struct spdk_nvmf_request is uint32_t, and so
change the type of iovpos of struct spdk_nvmf_rdma_request from int
to uint32_t.
iovpos of struct spdk_nvmf_rdma_request is only incremented and
accessed. It is not used for comparison.
So to avoid rerunning CI, this fix is appended to the patch series.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I65fc5dfb7067f6e8f7cb1e555f010b246a72ec32
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469660
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
By passing the pointer to struct spdk_nvmf_transport_poll_group
to spdk_nvmf_tcp_req_parse_sgl(), we can remove spdk_nvmf_tcp_req_fill_iovs()
and inline spdk_nvmf_request_get_buffers() into spdk_nvmf_tcp_req_parse_sgl().
Pointers to struct spdk_nvmf_request are used in many lines of
spdk_nvmf_tcp_req_parse_sgl(). Caching and using them simplifies and
improves readability a little for spdk_nvmf_tcp_req_parse_sgl().
We can pass pointer to not struct spdk_nvmf_tcp_transport but struct
spdk_nvmf_transport to spdk_nvmf_tcp_req_parse_sgl().
Ordering the pointer to struct spdk_nvmf_tcp_req first in parameters
of spdk_nvmf_tcp_req_parse_sgl() matches the function name.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9f0d33b48383800c3b0a738eb24b11ffed7e6e60
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469640
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Correct shellcheck rule SC2088: Tilde does not expand in quotes. Use $HOME.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Iea1eeaafc414c153f60634aaa39b0ab3272c9c48
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469836
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Remove from shellcheck excluded SC2059: Don't use variables in the
printf format string. Use printf "..%s.." "$foo".
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ibe44ed313cc31ddc346752de19ed4759c207bb01
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469824
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Create dpdk_lib_list_to_libs and dpdk_env_linker_args
functions to generate the library filename list and the
linker arguments respectively. Use these functions
internally as well.
These will be useful as part of the Seastar work, where
Seastar pkg-config includes a bunch of the DPDK libraries,
and SPDK needs to just add a few more.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaa6b49a8e1defacf63b3f6b414cd2e947670f8eb
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469751
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>
Have each sock implementation free the group_impl itself.
This allows C++ based sock implementations like Seastar
to release the group_impl memory using delete rather
than free.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If40a91e8bc93a531701fc30d847ab28fa11858ab
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469618
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>
The tailq and the requests all belong to the generic layer, might as
well put the queueing code there for better encapsulation.
Change-Id: Id5f08f798121b50a21044cfc61856999c50ca227
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469758
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>
This was being ignored, and can cause some problems when trying to reset
a defunt controller over a fabric.
Change-Id: I32c11a0e2df0e140e20f870fe0fb5b9045a567b3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469638
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>
Previously we would just sit forever. preventing us from properly
attempting reconnects and timing out.
Change-Id: Id7386ab95cf75fd9ac972b44afa2719aad412f49
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469021
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>
This enables us to create a single file descriptor and a single event
channel to poll for completions. With that accomplished, we can easily
poll for events on the admin qpair each time we check it for
completions.
Change-Id: I8b901252510744a956bef12594d1e045715e002e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467549
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>
This prevents us from failing a reset and then trying to double put the
rqpair->cq which ends up causing seg faults.
Change-Id: If3e14a3d039b4b19cc587a7482157f4b23f8ee32
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469609
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
In most places, we are passing NVME_TIMEOUT_INFINITE as the
timeout_in_ms argument to nvme_ctrlr_set_state, presumably in an attempt
to specify an infinite timeout. However, nvme_ctrlr_set_state only
checked against 0 when setting the actual timeout, and we didn't have
any logic to check for overflow so we just ended up setting random
timeout_tsc values which changes the behavior of the
nvme_ctrlr_process_init function in several places.
So, change NVME_TIMEOUT_INFINITE to 0, and add some integer overflow
checking to nvme_ctrlr_set_state.
Change-Id: Ic9d0cc57ed153df30c3b20313c3742072a5f992d
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469485
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ib9bb2de327a3461081f5f0dfc359b53f61019e28
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468133
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: Paul Luse <paul.e.luse@intel.com>
nvmf_rdma_fill_wr_sge() gets pointer to iovec at its head, but
nvmf_rdma_fill_wr_sgl() can pass it to nvmf_rdma_fill_wr_sge()
simply.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I16176d5d36ca9daf57640bfcbc49dfbf997afe54
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469639
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Pointers to struct spdk_nvmf_request and struct ibv_send_wr are
used in many lines of spdk_nvmf_rdma_request_parse_sgl().
Caching and using them simplifies and improves readability a little
for spdk_nvmf_rdma_request_parse_sgl().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib000c9d4e7fb7bb415f4ac4622b32b12cc787c80
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469537
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
We can merge two loops of req->buffers and req->iov into a single
loop and merge two variables, req->num_buffers and req->iovcnt into
a single variable. For the latter, use req->iovcnt because it is
also used for in-capsule data.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia164f2054b98bbcb00308791774e3ffa4fc70baf
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469489
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This follows the good practice of FC transport.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Change-Id: I84a6bb28a27b529335f100c8cab12d642bc156ff
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469488
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>
spdk_nvmf_request_get_buffers()/_multi() may return not only -ENOMEM
but also -EINVAL, but spdk_nvmf_rdma_request_fill_iovs() and
nvmf_rdma_request_fill_iovs_multi_sgl() had returned -ENOMEM
regardless of the actual return value. Fix them in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic19593ffa9c0731f63d198d4ae16feb3bb47f57c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469378
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>