Commit Graph

13001 Commits

Author SHA1 Message Date
Seth Howell
80dcb258e0 lib/bdev_nvme: fix attach_controller RPC.
This RPC was using snprintf which could potentially
truncate a bad argument silently without alerting the
caller.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I1795b2e4086cbaa45390bd11b189755818b5c9e7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3613
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-11 08:29:14 +00:00
Ziye Yang
65945c0296 bdev/rbd: Move bdev_rados_context_init to bdev_rbd_handle
According to customers's report, there still exists
the Rados related thread contention with SPDK's reactor thread.
So also meove bdev_rados_context_init into bdev_rbd_handle.

With this patch, QEMU + SPDK vhost + Bdev RBD 's performance
can be improved.

Change-Id: Ie26a140f8d2cfe1a98cd1737f4ff70e9319cdc11
Signed-off-by: Yaowei Bai <baiyaowei_yewu@cmss.chinamobile.com>
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3699
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>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-11 08:28:39 +00:00
Shuhei Matsumoto
49904470ba doc/iscsi: Add description about iSCSI login redirection
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idac2940bac28b3513bb38c4fd6768fdb38f7a715
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3494
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
d40a1b7eff doc/iscsi: Remove obsolete limitation of the hotplug feature
iSCSI hotplug should be pretty stable now.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie1a4fc167f75f4a1c9f079e53a78552f8ca9714d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3493
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
4ea197883c lib/iscsi: Add iscsi_target_node_set_redirect RPC
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I090f55debe4ecdc47459bcfe0571a937f064313b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3439
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
420b2353ea lib/iscsi: Inform initiator that target has temporary moved to a different address
If the portal group map of the target has a redirect portal,
iscsi_tgt_node_is_moved() fills the buffer by the redirected address
and returns true.

iscsi_op_login_check_target() calls iscsi_tgt_node_is_redirected() before
calling iscsi_tgt_node_access() because login redirection can be
checked before any or after all security check.

If iscsi_tgt_node_is_redirected() returns true, notify login redirection
to the corresponding initiator.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4573a69c0a32eafcfe48080a033c135e127da321
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3221
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
2c8309e00e lib/iscsi: Update redirect portal of public portal group
iscsi_tgt_node_redirect() updates redirect portal of the initial
portal iin a primary portal group for the target node.

Check if the specified portal group is a public portal group and is
mapped to the target node first.

Then if the passed IP address-port pair is NULL, clear the current
redirect setting. Public portal group and private portal group are
clearly separated and redirect portal must be chosen from a private
portal group. Hence this clear method is intuitive and simple.

If the passed IP address-port pair is not NULL, check if they are
valid, and are not in the specified portal group. Then update a
redirect portal of the portal group map.

Finally, send asynchronous logout request to all corresponding
initiators.

Besides, change allocating pg_map from malloc to calloc to initialize
redirect portal.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I79d826663f4c3d5a117add286f133adeb1ce07f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3222
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
651f6d6a3a lib/iscsi: Return portals only in public portal group for SendTargets
All redirect portals in private portal groups are temporary and so they
should be informed only by temporary login redirection response.

Then this patch changes SendTargets operation to return portals only
in primary portal groups.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic62ada749886290df2d1490377cc5ca883b3f47a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3492
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
10d6218444 lib/iscsi: Create portal group as public or private portal group
In SPDK iSCSI target, portal group works almost as identifier of
portal.

To support iSCSI login redirection, we need to have two types of
portal groups, public and private portal groups.

We need portals of public portal groups to redirect to a portal in
a private portal groups at login via temporary login redirection
funciton, and we need to make SendTargets return only portals in
public portal groups.

To do these simply, we mark primary or secondary portal group expicitly
at its creation by this patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iccf87a4b9dd1f4a8fbb857a399b8f2dbc7c0b3ab
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3491
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-08-11 08:27:43 +00:00
Shuhei Matsumoto
0f22282fc3 lib/iscsi: Check if IP address-port pair is valid as redirect portal
Add a helper function iscsi_parse_redirect_addr() to validate the
passed IP address-port pair.

iSCSI login redirection will support only numeric IP address and
TCP port, and add AI_NUMERICSERV and AI_NUMERICHOST.

This function is almost same as nvme_tcp_parse_addr() and
nvme_rdma_parse_addr().

Besides, update error log in posix_sock_create() to use
gai_strerror(). gai_strerror() will provide more accurate
information as done by nvme_tcp_parse_addr() and nvme_rdma_parse_addr().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I65c6de81a64dcb26551ce796172d0458e1c298a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3357
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-11 08:27:43 +00:00
Tomasz Zawadzki
99d3695c2c lib/sock: bump SO_VERSION to 4.0
Following patch was merged while still having parent one
pointing before SPDK 20.07 release.
(61cd9d) lib/sock: Add option to enable or disable quick ACK

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1cbc0acfdd2a1a5403844167a107e0f63a2e213c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3709
Community-CI: Mellanox Build Bot
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>
2020-08-10 14:41:16 +00:00
Shuhei Matsumoto
61cd9d308e lib/sock: Add option to enable or disable quick ACK
TCP delayed ACK can be disabled or enabled by enabling or disabling
quick ACK, respectively.

The recently added spdk_sock_impl_opts is helpful for sock library
to control quick ACK.

Hence this patch adds and uses an option enable_quickack. The option
is effective only for the POSIX sock module.

We have spdk_sock_opts now too but spdk_sock_impl_opts will be better
for this case.

This option is not supported on FreeBSD. FreeBSD users can set the
option globally via sysctl if desired.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic89620267acce5872dc8ecaf7a99bb70ae97e993
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3603
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-10 11:29:20 +00:00
Michal Berger
a9337f72e0 test/common: Check exit status of NOT() execution more carefully
The NOT() function is meant to report a success when given test
fails. This negative testing is meant for specific cases, however,
there may be some circumstances where application failed, but not
for the reasons the tests was aiming for, e.g. upon receiving
signals from the kernel, like SIGILL, SIGSEGV, etc.

To make sure the test is aborted in such a scenario, check exit
status of the execution more carefully. If it matches any of the
defined signals make sure to fail the test. By default, all signals
which generate cores are looked up and SIGKILL which may be sent
out by the kernel as well (in case of the oom-killer).

Also, $EXIT_STATUS var is provided to specifically declare which
exit status NOT() should be looking for if process terminates with
a failure (i.e., for any other reason then receiving a signal).

Change-Id: I67b42ef038ef4553aceaf96d4da139858d819f22
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3448
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-10 11:29:02 +00:00
Michal Berger
20708f3531 scripts/pkgdep: Move distro independent parts to a common place
This will avoid adding similar components into multiple scripts
instead of just one.

Change-Id: I83cff1ad883f3a7054d0f21ec20210c81cb6b9c1
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3525
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-10 11:28:20 +00:00
Pawel Piatek
301b47e446 test/fuzz: fix autofuzz vhost all test
Add -g/--single-file-segments to vhost fuzz client
to allow pass autofuzz_vhost_all test

Fixes https://github.com/spdk/spdk/issues/1482

Signed-off-by: Pawel Piatek <pawelx.piatek@intel.com>
Change-Id: Ia25fe1f364fe6a11e2ad0ee0dc354f399f385e0e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3678
Community-CI: Mellanox Build Bot
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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-10 11:28:06 +00:00
Maciej Szwed
436fa2efae rocksdb: Update rocksdb code to work with spdk/rocksdb branch spdk-v6.10.2
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib907762e9124737a9ea7d4786903446e4ed61abb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3461
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-08-10 11:27:32 +00:00
Michal Berger
a44d06142b pkgdep/git: [QAT] Fix logic while checking qat_service status
Change-Id: I3ec62158234f1ab4e7bb462b9297c90b80828b69
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3515
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-10 11:27:23 +00:00
Michal Berger
95406c93c1 pkgdep/git: [QAT] Do the patching only on the tested driver
Make sure that we patch only a specific version of the driver that
we know works with given patches.

Check if $DRIVER_LOCATION_QAT looks like something we know and
proceed with patching if it does.

Change-Id: I27d82793ecfd6ad4cfb625cf14fcdda9fe822856
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3507
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-08-10 11:27:23 +00:00
Michal Berger
f61b3fddf0 pkgdep/git: [QAT] Patch use of PCI/AER related function
The pci_cleanup_aer_uncorrect_error_status() was renamed to
pci_aer_clear_nonfatal_status() in kernel 5.7, details here:

git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=894020fdd88c1e9a74c60b67c0f19f1c7696ba2f

Change-Id: I233718e02d95f46ccef4d78a4d1f626950cd8503
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3506
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-08-10 11:27:23 +00:00
Michal Berger
ea0a034b07 pkgdep/git: [QAT] Patch use of timespec
timespec and other time related types were hidden in 5.6 kernel,
details here:

git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c766d1472c70d25ad475cf56042af1652e792b23
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=412c53a680a97cb1ae2c0ab60230e193bee86387

Change-Id: I02ed16f9047337c77cc9ad344bbb40c52b3202be
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3505
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-10 11:27:23 +00:00
Michal Berger
c7bd3cb4a9 pkgdep/git: [QAT] Extract all parts from the kernel version
This is done as a preperation for oncoming patches which will
require additional pieces of the kernel version to work with.

Change-Id: I365201d8254ee68a0201790dff29474545a4f50a
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3504
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-10 11:27:23 +00:00
Michal Berger
3bd213117a pkgdep/git: [QAT] Remove rdtscll patch
This patch is not needed for the newer version of the QAT driver which
vm_setup.sh installs - it successfully compiles against older kernels
(tested against 4.4.x sources).

Change-Id: Icd3e3171ddcdc1b5e4eb7c45736461cfcaa86cf7
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3503
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-08-10 11:27:23 +00:00
Seth Howell
a22f55658c lib/nvme: add timeout to fabric connect commands.
We can't afford to wait here blocking forever. Add a
reasonable timeout (1 second) to this command.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I7e373c5515d42a46403f03d7d09e72225f8910ff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3563
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@mellanox.com>
2020-08-10 11:27:16 +00:00
Shuhei Matsumoto
5682de86c4 lib/iscsi: Add iscsi_portal_grp_find_portal_by_addr() as a helper function
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ieec2b9871d931c7ee394bc16444f5a283a9655bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3438
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
f5ee7d9bd8 lib/iscsi: Factor out send target portals from iscsi_send_tgts() into a helper function
iSCSI login redirect will change SendTargets. To make the change
easier, factor out sending target portals from iscsi_send_tgts
into iscsi_send_tgt_portals() even if iscsi_send_tgt_portals() is
used only once.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic565421afc9b099a507aac59ef7c741b113efa8b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3443
Community-CI: Mellanox Build Bot
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: Ben Walker <benjamin.walker@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
1d08c96288 lib/iscsi: Remove unused the param iaddr from iscsi_send_tgts()
Previously we might have any possibility to need iaddr in
iscsi_send_tgts(), but it is highly unlikely now. Let's remove
the param iaddr from iscsi_send_tgts().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ide3405706b727a9d6ebaa92ed83509196ff675da
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3442
Community-CI: Mellanox Build Bot
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: Ben Walker <benjamin.walker@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
c15a6180cd lib/iscsi: Add pg_tag to the 2nd parameter of iscsi_conns_request_logout()
The upcoming new feature, iSCSI login redirection will requests
connections whose portal group tag matches to logout asynchronously.
Hence add pg_tag to the second parameter of iscsi_conns_request_logout()
and iscsi_conns_request_logout() checks if conn->pg_tag is equal to
the passed pg_tag.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iaea37f28046396404c5b4faed01d748f2944288c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3160
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
aa69140dba lib/iscsi: Remove unused the param conn from iscsi_append_text()
Previously we might have any possibility to need conn in
iscsi_append_text(), but it is highly unlikely now. Let's remove
the param conn from iscsi_append_text(). This patch includes a
minor simplification not to use rc but return directly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifa009c1374e878f8d3b9c0043ba0352f59010b59
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3157
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
c0d796d7f8 lib/iscsi: Use fixed size char array to parse string of portal address and port
Dynamically allocated string is not necessary, and use fixed size
char array for simplification instead.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iada118fbc81f24d0273269f4980bab28bd9c2c23
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3161
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:34 +00:00
Shuhei Matsumoto
92b28effd4 lib/iscsi: Abort queued R2T task before submitting abort request to SCSI layer
Previously iscsi_del_transfer_task() and iscsi_clear_all_transfer_task()
were called after SCSI layer completed abort request.

However, SCSI layer waits until all target requests are aborted or
completed anyway.

So the timing to call iscsi_del_transfer_task() and
iscsi_clear_all_transfer_task() were not effective.

Hence for ABORT TASK, call iscsi_del_transfer_task() before
iscsi_op_abort_task(), for ABORT TASK SET and LUN RESET, call
iscsi_clear_all_transfer_task() before iscsi_op_abort_task_set().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7c22b7305499e6e7d7335b7b5616a3abac0252c4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3149
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:34 +00:00
Seth Howell
0b81c11ab8 module/bdev: add a function to remove trid from ctrlr.
This will allow us to further develop the ecosystem for multipath
failover support.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I24a8cf13e60e6cc0d5b6374da33c8a4e5b6c499a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3069
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-07 15:06:01 +00:00
Seth Howell
1973d10b59 bdev/nvme: modify attach_controller rpc to also add multipath trids.
This allows us to avoid creating a separate rpc just for multipath TRIDs.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I4e83167eaf16e50a72efbd513333a4d09c52be61
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2884
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@mellanox.com>
2020-08-07 15:06:01 +00:00
Seth Howell
e4cc49bc95 bdev/nvme: add failover option to bdev_nvme_reset
When we fail to process admin completions on a controller
attempt to failover to a previously registered trid

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I547bd010f4b339b2af7f2b33027cddad4b4926bc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3045
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-07 15:06:01 +00:00
Seth Howell
eafae9ae89 bdev/nvme: pass nvme_bdev_ctrlr struct to adminq.
We are about to instrument some checks in this function
that will access the nvme_bdev_ctrlr struct directly so
pass that directly since the ctrlr is still accessible from
the nvme_bdev_ctrlr struct.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I4e0d0d6c433149368e84275426362f8283903027
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3340
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-08-07 15:06:01 +00:00
Seth Howell
0c6979e29b bdev/nvme: add a function for specifying a multipath trid.
This is part of a larger series enabling failover at the bdev
layer for NVMe.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ic5c128244699c1a47275145ca7e41aa5f1366259
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3044
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@mellanox.com>
2020-08-07 15:06:01 +00:00
Seth Howell
d88915f5ff bdev/nvme: rename ctrlr trid parameter to connected_trid
This patch paves the way for introducing a tailq containing
multiple alternative paths to the same controller.

Change-Id: I13d30c12b8e0ce38eae687f9e76740be1d11e4d1
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3259
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-08-07 15:06:01 +00:00
Shuhei Matsumoto
a4b5041cd0 lib/nvmf: Fix return type to be alone on a line for _nvmf_ctrlr_destruct()
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0af1bf6fa8dc5dec0263ea799f166632c10078ca
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3624
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-06 23:33:00 +00:00
Shuhei Matsumoto
d49d316e63 doc/nvmf_tgt_pg: Update the description about assigning the created qpair to a poll group
The operation to assign the created qpair to a poll group has been
moved from event library to nvmf library. Update the corresponding
part slightly.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I80b9b8257b84ba92004baa36a057d1a8cee387bb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3623
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>
2020-08-06 23:33:00 +00:00
Ziye Yang
4ba5e90176 nbd: Add the O_DIRECT flag when opening the file.
To eliminate the cache issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Id67fabb901de9666e6bad04c9df74a538bdbc659
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3662
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Sun Zhenyuan <sunzhenyuan@baidu.com>
2020-08-06 22:43:20 +00:00
Ziye Yang
7bac9b06f1 nvme TCP: Make the control related pdu also allocated from the SPDK DMA memory
Purpose: To make the pdu management consistent with other PDUs, then
we can easily adapt our code into some hardware offloading solution.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic4a2847fd1b6cacda4cbaa52ff12c338f0394805
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3588
Community-CI: Mellanox Build Bot
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-04 18:28:08 +00:00
Ziye Yang
cca62c633f bdev/uring: Do not use IORING_SETUP_IOPOLL.
Because of the Linux kernel has limitation, IORING_SETUP_IOPOLL is only
used for local devices (e.g., local files, pcie NVMe SSDs etc.). However,
it does not work for devices atttached from the remote. So in order to
make bdev uring generic, Let's do not use IORING_SETUP_IOPOLL to create the
uring.

Change-Id: I6aea1ff222a8a0d67ab040ada75aa0ef6730e725
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3587
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-04 18:27:56 +00:00
Alexey Marchuk
864d93c053 nvmf: Add check for bidirectional xfer type
RDMA target can't handle bidirectional xfer type, in debug build
it throws an assert in nvmf_rdma_setup_wr function. NVMF controller
performs checks od opcodes, but the failure happens before this
check. Add similar validation in TCP transport.

Change-Id: I14400b9c301295c0ae1d35a4330189d38aeee723
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3436
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-04 18:27:45 +00:00
WANGHAILIANG
8f7cb5e6dd script/pkgdep: fix pip-3 to pip3
Change-Id: Ibda02ab0efcd333d0623a6efe9c540ddd65b0af2
Signed-off-by: WANGHAILIANG <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3627
Reviewed-by: Changpeng Liu <changpeng.liu@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: Mellanox Build Bot
2020-08-04 16:57:22 +00:00
Darek Stojaczyk
4e0208001c json_config: fix static analyzer false-positive
The variable can't be uninitialized, but gcc complains:

json_config.c:415:3: error: ‘params_len’ may be used uninitialized in
this function [-Werror=maybe-uninitialized]
   spdk_json_write_val_raw(w, cfg.params->start, params_len);

Change-Id: I845dcc19fa18c3583c420e66c16c11a3fdf99ad4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3626
Reviewed-by: Pawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-08-04 16:57:08 +00:00
Seth Howell
ab3a465554 lib/bdev: fix potential mem leak in part.c
The way this is written currently, there is a
(very very unlikely) chance that the first strdup
fails and the second one succeeds. Just clean that
up.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I5ca1106c713753448a2bf988166a2d79ab9fa86d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3610
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@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>
2020-08-04 16:56:42 +00:00
Seth Howell
305d64589e lib/virtio: fix heap use after free issue.
fixes 79c7744efb

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ia7919b8922de7e99b0a9f5266a96940f05f4865c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3609
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-08-04 16:56:42 +00:00
Jacek Kalwas
beb468e9c7 nvmf: fix cc.en and csts.rdy setting during shutdown
CC.EN, CSTS.RDY should not be modified during shutdown.
It doesn't make much sense (against nvme spec) and nvmf spec 1.1
doesn't mentioned it (4.6) either.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I7014b10b0217db61c3d380d5c0843808e54577cd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3477
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-04 16:56:22 +00:00
Jacek Kalwas
aedcec8a0c nvmf: disconnecting io qpairs during shutdown handling
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Iaee05abead7c685989d91f965133ee6b9e221f89
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3476
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-08-04 16:56:22 +00:00
Tomasz Zawadzki
809ab045b0 version: 20.10 pre
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I337b43bcf75b00b78081ca6f252bbd74a7f4abfa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3621
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>
2020-07-31 16:08:17 +00:00
Tomasz Zawadzki
6042d4e9ec changelog: remove spdk_env_get_primary_core change
Patch (e12a4f6) reverted the addition of spdk_env_get_primary_core().
The changelog no longer needs to contain this info.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9ad339f13557b9eec989a806638cb59a8b203355
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3598
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>
2020-07-31 16:08:17 +00:00