Commit Graph

10103 Commits

Author SHA1 Message Date
Wojciech Malikowski
3b2993d101 CHANGELOG.md: zone bdev interface update
Change-Id: I43a6943bb441fe7f75a7ecef08a8073f21a8a7d2
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469101
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-10-04 15:15:23 +00:00
Jim Harris
c2b3c18b5c mk/spdk.common.mk: remove -std=c++0x
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>
2019-10-03 23:02:05 +00:00
Pawel Kaminski
617f17d814 rpc: Rename get_scsi_devices to scsi_get_devices
Change-Id: I6ebc7323835d192ef89dcb449be90529d63be46e
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468904
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-10-03 23:01:27 +00:00
Pawel Kaminski
bf15f51cef rpc: Rename set_vhost_controller_coalescing to vhost_controller_set_coalescing
Change-Id: Ic775a2397a2177c72ed8c42edf9ac0456a8aea1f
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469872
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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>
2019-10-03 23:00:40 +00:00
Pawel Kaminski
edb1897147 rpc: Rename remove_vhost_controller to vhost_delete_controller
Change-Id: I819cecbd8456f3f978cc3560f31e285bb2cbbe5d
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469863
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-10-03 23:00:25 +00:00
Seth Howell
eda1ec6932 vhost: fix vm_wait_for_boot arg check.
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>
2019-10-03 20:12:57 +00:00
Evgeniy Kochetov
338fcaac4e ut/nvmf/fc: Fix FC unit test build with RDMA
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: Iad219805fa8a4aff59d4d26460052fc9dd28c2b7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469478
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: Jim Harris <james.r.harris@intel.com>
2019-10-02 22:30:29 +00:00
Evgeniy Kochetov
3dfbf1fc50 nvmf/subsystem: Add handling of namespace resize event
When namespace resize is detected, NVMf target sends NS_ATTR_CHANGED
async event to NVMf initiators connected to affected subsystem.

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: I64d42dfae7a0ccfbd1e26ded52b71b8cc2ca920f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468544
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>
2019-10-02 22:30:29 +00:00
Evgeniy Kochetov
9522ed36f8 bdev: Add resize event
This patch adds RESIZE event to block device API.

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: Ic9fe359d19544fa0a48eed91216b858097e82995
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468543
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>
2019-10-02 22:30:29 +00:00
Evgeniy Kochetov
ba00bff251 bdev: Add mutex and reference counter to block device descriptor
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>
2019-10-02 22:30:29 +00:00
Maciej Szwed
3fb65d7b9d bdev/nvme: Separate nvme_ctrlr_create_bdevs from create_ctrlr
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>
2019-10-02 21:13:16 +00:00
Konrad Sztyber
c94ecfaedc lib/bdev: zoned info in get_bdevs RPC call
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>
2019-10-02 21:13:16 +00:00
Pawel Kaminski
724357e6c3 test: Shellcheck - correct rule SC2235.
Use { ..; } instead of (..) to avoid subshell overhead.

Change-Id: Ifc62a154a40ad961f8295faae39da29077a0faf1
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466537
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2019-10-02 15:51:32 +00:00
Ziye Yang
f76d16efe7 nvme/perf: enable the trace for nvme perf
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>
2019-10-02 15:35:59 +00:00
Evgeniy Kochetov
23975858e5 ut/bdev: Add tests for device close and unregister
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: Ia2615a00785c60e10fb893e75dd68198fbf84ff3
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469619
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>
2019-10-01 22:38:48 +00:00
Evgeniy Kochetov
437e54f7d2 ut/bdev: Move bdev open callbacks to other auxiliary functions
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>
2019-10-01 22:38:48 +00:00
Karol Latecki
f657669eaf test: don't create Python .pyc files
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>
2019-10-01 14:49:02 +00:00
Wojciech Malikowski
45b5808eba lib/bdev: Added spdk_bdev_zone_append()
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>
2019-10-01 14:48:54 +00:00
Wojciech Malikowski
42b287e661 lib/ftl: Make ANM device unregister asynchronous
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>
2019-10-01 14:47:50 +00:00
Chunyang Hui
984a11ad65 nvme: Add opal init process for nvme bdev
get_bdevs can see whether opal is supported.

Change-Id: I5339a23590fcb23438e0e513d209763cee6fdeb1
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462590
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>
2019-10-01 14:12:57 +00:00
Chunyang Hui
f74b33ad0b Opal: Small fixes
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>
2019-10-01 14:12:57 +00:00
Shuhei Matsumoto
6b05c10930 nvmf/rdma: Change iovpos of struct nvmf_rdma_request from int to uint32_t
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>
2019-10-01 14:04:19 +00:00
Shuhei Matsumoto
c8734543bc nvmf/tcp: Simplify spdk_nvmf_tcp_req_parse_sgl()
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>
2019-10-01 14:04:19 +00:00
Maciej Wawryk
b6af628671 test: Shellcheck - correct rule: "Tilde does not expand in quotes"
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>
2019-10-01 14:03:34 +00:00
Maciej Wawryk
6e03b6ba57 test: Shellcheck - correct rule: "Can't use =~ in [ ]"
Correct shellcheck rule SC2074: Can't use =~ in [ ]. Use [[..]] instead.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I34ae5e6d6fef37be3ad5d79efe4f06cf318aa696
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469825
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>
2019-10-01 14:03:34 +00:00
Maciej Wawryk
1dbe784a40 test: Shellcheck - include check "Don't use variables in the printf"
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>
2019-10-01 14:03:34 +00:00
Alexey Marchuk
131c9aad05 configure: Use -march=native for x86 architecture only.
Exclude -march=native parameter from build command for other architectures since it causes a compilation error in ARM.

Change-Id: Ida22ea4b3afba9759102d2e2203fc9e6e312c3ba
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Evgenii Kochetov <evgeniik@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469390
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>
2019-10-01 14:02:40 +00:00
Jim Harris
916f3d1471 env_dpdk: add functions to define dpdk_env make variables
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>
2019-10-01 14:01:58 +00:00
Jim Harris
685cbeebd4 sock: do not free group_impl in generic layer
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>
2019-10-01 14:01:58 +00:00
Pawel Kaminski
a5a296dc9f rpc: Rename delete_target_node to iscsi_delete_target_node
Change-Id: I94c77c1f897ed780fcb7465776d39782c5320b3e
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467491
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
2019-10-01 14:00:30 +00:00
Pawel Kaminski
3650a73353 rpc: Rename get_tpoint_group_mask trace_get_tpoint_group_mask
Change-Id: I65f8d75e0968b16dca3e379022da82bc52042411
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469142
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>
2019-10-01 13:59:37 +00:00
Pawel Kaminski
ecca55c996 rpc: Rename disable_tpoint_group to trace_disable_tpoint_group
Change-Id: I3a41353ca8ff44163efcf1d0ee07a4332ba3ac85
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469137
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>
2019-10-01 13:59:37 +00:00
Pawel Kaminski
dd29bd7e8d rpc: Rename enable_tpoint_group to trace_enable_tpoint_group
Change-Id: I1f9948ceacc615a9f0156c45de4c45cbe23ae9b0
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469135
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-10-01 13:59:37 +00:00
Maciej Wawryk
378ad60b88 RPC: rename get_subsystem_config to framework_get_config
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ia0d20a04cf2dd5b23ad201d2ae9677a703ec92f3
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468682
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: Paul Luse <paul.e.luse@intel.com>
2019-10-01 13:57:36 +00:00
Maciej Wawryk
8710b60062 RPC: rename get_subsystems to framework_get_subsystems
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Iaeaf20e2a16b41796cb89a92fadd99cb1d341720
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468670
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: Paul Luse <paul.e.luse@intel.com>
2019-10-01 13:57:36 +00:00
Seth Howell
7630daa204 nvme: move queueing requests to the generic layer
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>
2019-09-30 21:17:47 +00:00
Seth Howell
fd892b333d nvme_ctrlr: when reconnecting admin queue, check rc.
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>
2019-09-30 21:17:47 +00:00
Seth Howell
13fb1b690e nvme_rdma: add a timeout for spinning on cm events.
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>
2019-09-30 21:17:47 +00:00
Seth Howell
37152dc56d test/nvmf: isolate bdevio and nvmf_tgt cores.
These shouldn't compete for cores.

Change-Id: I9793cec0561d7991e603c57d65b0359338dfedce
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469763
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>
2019-09-30 21:17:47 +00:00
Seth Howell
5ac814e36c nvme_rdma: share the cm_event channel between qpairs.
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>
2019-09-30 21:17:47 +00:00
Seth Howell
f12e6bc041 nvme_rdma: in qp_disconnect, set resources to NULL
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>
2019-09-30 21:17:47 +00:00
Seth Howell
06746448c1 nvme: fix confusion around nvme_ctrlr_set_state
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>
2019-09-30 21:17:47 +00:00
Maciej Wawryk
a10d0ce79c RPC: rename context_switch_monitor to framework_monitor_context_switch
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I6de7bf824b5f57e535168afaafca55f4c758fc94
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468667
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-30 21:13:41 +00:00
Maciej Wawryk
fb3918a0ca RPC: rename wait_subsystem_init to framework_wait_init
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>
2019-09-30 21:13:41 +00:00
Maciej Wawryk
e85d47123c RPC: rename start_subsystem_init to framework_start_init
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I44a96f87f5565b3984f0a6919bf7f276207637a3
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468130
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-09-30 21:13:41 +00:00
Shuhei Matsumoto
68ee93aac7 nvmf/rdma: Pass pointer to iovec directly to nvmf_rdma_fill_wr_sge()
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>
2019-09-30 21:11:52 +00:00
Shuhei Matsumoto
91f9c6f376 nvmf/rdma: Simplify nvmf_rdma_request_parse_sgl() by cached pointers
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>
2019-09-30 21:11:52 +00:00
Shuhei Matsumoto
063c79d13c nvmf: Optimize nvmf_request_get_buffers by merging buffer and iovec loops
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>
2019-09-30 21:11:52 +00:00
Shuhei Matsumoto
e1f72b2cd2 nvmf/rdma: Include nvmf/transport.c into UT code and remove copied functions
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>
2019-09-30 21:11:52 +00:00
Shuhei Matsumoto
fda0e558a1 nvmf/rdma: Return rc simply when spdk_nvmf_request_get_buffers/_multi fails
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>
2019-09-30 21:11:52 +00:00