My recent changes that introduced batching to queued request
resubmission also introduced a regression that can lead to reordering
requests before submitting them to the drive. This change prevents that.
We wait until inside the internal _nvme_qpair_submit_request function to
check for queued entries to avoid queueing a request that has children.
If a request that has children gets queued, when we process completions
and resubmit the parent, it will result in the children being submitted.
Since we only account for the number of requests we completed in the
last iteration, some of the child requests may be requeued out of order,
or worse, none of the child requests will end up being submitted to the
transport and they will all be queued behind previously queued requests.
Change-Id: I58e1c458c25fbf3f9f75364f05b1076b166a6212
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470890
Reviewed-by: Ziye Yang <ziye.yang@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: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
In-capsule data transfer can only be supported by NVME drives with SGL memory layout
Add test to examine new behaviour
Change-Id: Iaef6564c8e5c96c1c5af16ab41d6e3827f6a82b6
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/+/470469
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>
When we ran out of child_iov space, ensure the iovs to be aligned
with block size. However the calculation was wrong.
(to_next_boundary_bytes % blocklen) meant not to_last_block but to_next_block.
So calculate to_last_block_size by reducing to_last_block_size from blocklen.
The data was collected when the issue occured. So add unit test
by using the data.
Fixes#979
Reported-by: Geoffrey McRae <geoff@hostfission.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I62a50bada450288ea7c60aec0e557c2a53cd8916
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470806
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This function has not been tested, add test in nvme_ctrlr_cmd_ut.c
to increase code coverage rate.
Change-Id: Ibe5c98924d9e2f3239d782e7a32b828caaddb04a
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470718
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>
blobfs_bdev module may contain functions related to
FUSE which will utilize libfuse3.
By default, it is diabled to compile blobfs_bdev module
with FUSE related functions. Running './configure' with
option '--with-fuse' can enable it.
Change-Id: I6552a6c04cc3412c739691630a7a481e0ae6b59c
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470712
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: Changpeng Liu <changpeng.liu@intel.com>
Add a new parameter "-C" to allow to send I/Os to all specified
bdevs from all allocated cores. This means any bdev will get I/Os
from all specified cores. This is same logic together with the "-T"
parameter to specify one bdev.
Change-Id: I1e38d49824afe8084fcad72b18649657eb5c50cd
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470805
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
If number of bdev is smaller than number of configured
cores, the bdevperf tool will exit abnormally.
Change-Id: I88e08d1bc71af8b927c701c80f6ddd2bf22c659c
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469669
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
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>
Added Initiator configuration option to point to the
fio source directory used when compiling SPDK with the --with-fio
option and run SPDK test with the fio plugin.
Signed-off-by: John Kariuki <John.K.Kariuki@intel.com>
Change-Id: I097cb17691a72d7c2a0e198dccd12cf3d1c3474c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468890
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This shouldn't be necessary - the RPCs shouldn't complete until the
bdevs are fully created. But testing a theory as to why another patch is
failing.
Change-Id: I72c471547a7dfbb57d695bf8a3a6fb8428a2ebcd
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469624
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>
In a couple of docs and a .py file, saw while reviewing name changes.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I6a8b579ca692cdf6df1024e42eee76de5bde1227
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467715
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>
Use semicolon or linefeed before 'done' (or quote to make it literal).
Change-Id: I90c01e643fae41dd9961f2314a076a0bac1e6aff
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466904
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>
Patch b6af628 while addressing Shellcheck 2088,
broke the pathing to integrity_vm.sh within VM.
Originally tilde was used within quotes so it didn't expand,
since cmd was executed as root the path was correct on VM.
After the change the path was changed to $HOME, making it
actually expand on the host system (not VM). Path was made
incorrect.
Since we already scp to /root/, it shouldn't
be an issue to use that path in explicitly when executing.
This fixes recent nightly run failures.
Change-Id: I2e0ac767cbf77a71841db260e602b568b1f510a1
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470624
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
va_list is not passed in logfunc, so the user-provided log call can't
get the arguments corresponding to the format string.
This patch fixes it and replaces log func pointer in spdk_app_opts
with logfunc.
Change-Id: I7f7806f47c4fd8f36f3234aa5a8c877db0fc7140
Signed-off-by: Yang Fan <fanyang@smartx.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469828
Reviewed-by: Feng,Li <fengli@smartx.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Due to upcoming change we cannot use the same count
pointer in rpc call and bdev creation function.
With async bdev creation there will be a problem
when freeing context.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I98da89481d7f506161d8adf5a1b2365907385a13
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468463
Community-CI: Broadcom SPDK FC-NVMe 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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This also requires change of type for count field
in rpc_bdev_nvme_attach_controller_ctx structure
and argument type in spdk_bdev_nvme_create function.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ifc679558b0744ada021f5ce367beb83b35f30b3a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470135
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>
OCSSD NVMe will use separate RPC call to create bdevs
so don't call bdev_nvme_create_bdevs for it.
Additionally change bdev_nvme_create_bdevs arguments
to take nvme_async_probe_ctx structure to simplify
future changes.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I07ad8034058d8b3a0c78627db1fd0ba3db5a211b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468223
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 is required to use spdk_bdev_nvme_create function
for other NVMe modes.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I47dcb41689c7ec696ca6e76c35c81b497655d29a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468342
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>
This change will make possible to use connect_attach_cb
function with other NVMe bdev types. Changing
bdev_nvme_create_and_get_bdev_names function name
to more suitable.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I0bf79aba65914b4ac1826200f7d049e1c26276f4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468594
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>
Making this structure available from the ctrlr allows us to call the
remove callback when the controller is failed/removed on transports
other than pcie.
Change-Id: I2c66dfef12b039c0d6daf7df83da745757818006
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469636
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 paves the way for doing multiple reconnect attempts before failing
the controller.
Change-Id: I1ff4ee6d41a5ffb47dd186d76793d670287c4783
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469934
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: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
By moving the contents of spdk_nvme_ctrlr_reset to a new internal
function, I am paving the way for providing two reset paths. One, which
can be used by the user as an external API function and which provides
the same legacy behavior. Specifically, that it will always fail the
ctrlr after an attempted reset, and a second, internal path, which will
be used by the qpair reconnect code which will defer failing the qpair
to the qpair code.
Change-Id: I9ec9df55c1fecc2f00476c175bcf988207c31257
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469933
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
spdk_reactors_fini() is unconditionally called in spdk_app_fini()
at the end of every application and it currently throws a ton
of warning messages if the reactors weren't initialized yet [1].
Let's silence those warnings.
[1] $ spdk_tgt -c invalid.conf
[...]
*WARNING*: Called spdk_reactor_get() while the g_reactors array was NULL!
*WARNING*: Called spdk_reactor_get() while the g_reactors array was NULL!
*WARNING*: Called spdk_reactor_get() while the g_reactors array was NULL!
*WARNING*: Called spdk_reactor_get() while the g_reactors array was NULL!
*WARNING*: Called spdk_reactor_get() while the g_reactors array was NULL!
(Apparently SPDK_ENV_FOREACH_CORE iterates through 128 cores
if the dpdk env framework wasn't initialized. SPDK calls
spdk_reactor_get() on each core and that's what generates the
warnings)
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: Ic3a2355ef6d2e0d0e1cc125ba21cc6a802b355bc
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470736
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>
In SPDK applications, spdk_app_start() is always followed
by spdk_app_fini(), so remove all global-state cleanup from
app_start() and let it be done by app_fini().
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: Id9fda9fda92f16cc59565691489d4a5ab4c577a5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470735
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>
Set g_spdk_app.config early in the app init function,
so that the subsequently called spdk_app_fini() will
free it. So far the dynamicaly allocated config object
would be just leaked.
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: I19ffc8bc80858d954166649f825e573f83b4bf53
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470734
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>
Remove from shellcheck excluded SC2039: In POSIX sh, something is undefined.
This warning is not actually present in any of spdk/spdk scripts.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I473e9307d909695184969563ef082720fa593759
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470732
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>
Correct shellcheck rule SC2035: Use ./*glob* or
-- *glob* so names with dashes won't become options.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: If41cc6c4571b78ab7533a8156239bc879fab0216
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470731
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>
Remove from shellcheck excluded SC2031: var was modified in
a subshell. That change might be lost.
This warning is not actually present in any of spdk/spdk scripts.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I17ec872ee5571089bbe40e8d51b06d70be70feb2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470729
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>
Remove from shellcheck excluded SC2030: Modification
of var is local (to subshell caused by pipeline).
This warning is not actually present in any of spdk/spdk scripts.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I3bcf6857a9fa5edfcdfa1b7f13eb704ac552d3f7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470645
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>
Let test application "mkfs" adopt spdk_blobfs_bdev_create
function in module blobfs_bdev directly.
Change-Id: I7ba95df099d6e42a52b3399e5c8fdae1ccb2689d
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469081
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: Paul Luse <paul.e.luse@intel.com>
Following test/blobfs/mkfs case, add it as one RPC
method to let build a new blobfs on given block
device.
Change-Id: I0ffbb1add95dfbc8655e0238ed6f3cd519dd945b
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466485
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>
Add module blobfs_bdev as a general module to simplify
the operations of blobfs on bdev. Then its functions
can be utilized by other libraries or apps.
blobfs_detect can be used to detect whether there is
one blobfs on given bdev.
Change-Id: Ib425574816061dc945fb652b539f791a44097a43
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466486
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: Changpeng Liu <changpeng.liu@intel.com>
In iscsi_conn_flush_pdus(), call iscsi_conn_flush_pdus_internal()
only when the connection state is RUNNING or INVALID.
Besides, we can remove the iscsi_conn_flush_pdus() call from
iscsi_conn_sock_cb() because the connection state is already EXITING.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9e1029ffa555e5e43aade53f61e942e98343006d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469801
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>
Request logout to the initiator asynchronously when exiting the
running connection from the target.
Based on this patch, the next patch will make flushing PDUs possible
only when the connection is RUNNING (or INVALID) and remove the
tight loop in iscsi_conn_flush_pdus().
Set timeout of logout request as 30 seconds. 30 seconds is as same as
NOP timeout and will be reasonable for now.
Add and use logout_request_timer to check the timeout.
When the connection gets internal a logout request, move the connection
to EXITING state if the connection is in INVALID state, request logout
to initiator and start 30 seconds timer if the connection is in RUNNING
state and logout is not requested yet, or do nothing otherwise.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I43192be9fd7112ad444152c0dd88f99a14aa8d30
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470705
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>
Change logout_timeout() not to call spdk_iscsi_conn_construct() but
to move conn->state to EXITING. Then spdk_iscsi_conn_destruct() will
be called by the poller of iSCSI poll group, iscsi_poll_group_poll()
soon.
This will improve the maitainability slightly.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I78046ae5ad7992ad6c7509884f964d2eff6ced76
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470704
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>
The connection state is mainly for flushing PDUs. ISCSI_CONN_STATE_LOGGED_OUT
was as same as ISCSI_CONN_STATE_RUNNING for this point.
Replace ISCSI_CONN_STATE_LOGGED_OUT state by a is_logged_out flag
and use the latter to reject any incoming PDU after sending logout
response.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3426a3ecbd241db402b1a2f7b3914a18e3591591
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470703
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>
Previously When the connection is in login processing, flushing PDUs
had been done by tight loop. Login processing will not fill out
send buffers but we can use poller to flush PDUs as same as when the
connection is running iscsi_conn_flush_pdus().
Hence change the check condition to include INVALID state to use
poller in iscsi_conn_flush_pdus().
This change is necessary because the subsequent patches will change
iscsi_conn_flush_pdus() not to flush PDUs when the connection is not
invalid or running.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I543a912bf1aa957df7033184ce5989ac92367e49
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470702
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>
We can remove the declaration of iscsi_conn_stop() by moving
the related functions before the caller to iscsi_conn_stop(),
_iscsi_conn_check_shutdown() and _iscsi_conn_destruct().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia86f6685c9e90692d8dae744495bd6f8fc310990
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470556
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>
USE_RANDOM is not defined anywhere in SPDK since long ago. Hence
remove the code included if and only if USE_RANDOM is defined in
lib/iscsi.c.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0481f938fef2df21af49a2755b3c1fe0dbcaee36
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470554
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>
The subsequent patches will merge spdk_iscsi_read_pdu(),
spdk_iscsi_execute(), and iscsi_conn_handle_incoming_pdus() into
a single function by introducing state machine.
Current ordering will create unnecessary function declaration.
Hence move spdk_iscsi_read_pdu() down to the next to
spdk_iscsi_execute() to avoid it.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I289ebcfc20d90753545ab9500b64fd93ca9dfb6d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470284
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>