Also cleanup some codes.
Change-Id: I45ff18cd2afcf38c50b073e80448ba5e267e3ef7
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472664
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
When initiating the io_u strcture from FIO, always
set the engine_data to NULL first as the io_u structure
is just malloced from FIO without specifically setting
to zero.
In the io_u free path, the engine_data field is checked
whether to NULL or not. To avoid mischeck issue, explicitly
set the engine_data to NULL at the beginning of the io_u
init path.
Change-Id: I52c8c251f36925650a44d14e35781bd8494ff358
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472916
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
After I review the function iscsi_conn_flush_pdus_internal,
I think that it may cause recursive function call issue. One of
the recursive calls in iscsi_conn_flush_pdus_internal
is:
spdk_iscsi_conn_free_pdu
spdk_iscsi_conn_handle_queued_datain_tasks
...
spdk_iscsi_task_cpl(&task->scsi);
...
process_read_task_completion
spdk_iscsi_task_response
iscsi_transfer_in
iscsi_send_datain
spdk_iscsi_conn_write_pdu
iscsi_conn_flush_pdus
iscsi_conn_flush_pdus_internal
So we have to create another list to solve this recursive issue
in the while loop. And we face the the similar issue in
NVMe/TCP before. With this patch, we can fix issues caused by
recursive calls.
Fixes #issue 1023
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I7150b962bfb30e74f53ba1a2a826fb78c73d8ea6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472999
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>
We don't use shebang for bash's scripts that are not executable.
SC2148: Add shebang to the top of your script.
Change-Id: I4bd6868a55ec88ae1edaf0883c8600b65fcdcce2
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472609
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>
Can only return 0-255. Other data should be written to stdout.
Change-Id: Idb8b387f438121e6b6afe62840ddee752872d7d7
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472605
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>
Fix: removed vhost_dir assigment in places where it is not needed.
Change-Id: Idd120099d8c5d28901437e13b5670209f7536568
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472603
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>
SC2153: Possible Misspelling: MYVARIABLE may not be assigned, but MY_VARIABLE is.
Change-Id: I6c06b82bb8de0ad42162d8fe8ee6aabcfb9534b5
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473141
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>
This patch adds support for hotplug / hotremove detection for devices
behind the VMD. The detection acts similarly to the one implemented for
regular PCIe devices, that is user has to periodically call probe
function. Additionally, for applications not using SPDK's event
framework, spdk_vmd_hotplug_monitor has to be called periodically as
well.
Change-Id: I9f6839560efcf16c839b01976639d835f119cb47
Signed-off-by: orden smith <orden.e.smith@intel.com>
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472741
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Use one function for VMD module initialization, regardless of whether
the initialization is performed via config or RPC. It'll allow the
module to perform additional steps during its startup that can be shared
between the config / RPC paths.
Change-Id: I1062545a9ea109bd69e01f759e701ca279d0d8de
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473271
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This will be used in a future patch.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie88daa20842f5f166b4a7a5abccafd6683d6da64
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473338
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
There's little use to the "Starting thread on core XX"
messages - they may have served a purpose at some point,
but the other messages showing where each controller
is associated is sufficient.
Also remove the "Attaching to..." message - the
"Attached to..." message is sufficient here too.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9543e8f3f6d7b6e28238cba27fc1e4194908f3b7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473337
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
The loop is intended to accept multiple socks when
available, but once accept returns NULL, there's no
reason to keep trying.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I896908d276da35bc3fff172c1c17e22abd2a5343
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473234
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
The core number may be 1 or 2 characters, and the
printf format wasn't accounting for that.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3c87466df1014fb6c0a4e7db1a9b6f6054559eae
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473065
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
When we specify a queue depth that may be higher than
the io_queue_size, we print a warning indicating this.
But it was also setting the g_warn flag which would
result in this message also getting printed:
WARNING: Some requested NVMe devices were skipped
But we don't actually skip any SSDs in this case. So
remove setting of that flag in this case.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic63209f1a96990dac9664ce245c6406c37248494
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473064
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This reverts commit 0b9931516d.
"cd $dir && ..." in single line does switch directory for
the following commands.
The patch being reverted, broke the nightly (autopackage.sh) tests.
It was only fixing couple of instances of SC2164,
which is being excluded either way.
https://github.com/koalaman/shellcheck/wiki/SC2164
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id4f134ad98953b92fdc69cd0d0b80c02660cf7a9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473220
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reinstating "shift" removed in commit a2ab5eb as it was actually
needed.
Change "cmd" command string to use $@ instead of $2 so that we're
able to use more than one additional param for vhost instance.
Change-Id: If656c4319d7acfecddd2ff73104d3c79b799689f
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472681
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Added info on new names of RPC.
Moved rest of the RPC section to the top to acompany it.
Change-Id: I3ee265ab2f163d0bf01b74ca87d4510835041c3a
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472991
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 the trap handler, iscsicleanup had been called after remove_backends.
This ordering found a bug in SCSI library but is not different from
normal path, and had created LVOL hotplug test unintentionally.
Fix the ordering first and consider an independent test case for
LVOL hotplug + iSCSI target separately later.
The failure which invoked the trap handler will be also investigated
regardless of this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6b2a0d7d38348fcbf7ccc272063dc8408f15315a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473156
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
All connections to a single LUN run on a single thread but
this thread may not be the same as the one which opened the backed
bdev. So hold pointer to the thread which opened the backed bdev
to struct spdk_scsi_lun and use it when calling spdk_bdev_close().
All resource of LUN are accessed on a single thread after getting
I/O channel, and so lock is not still necessary.
Fixes issue #1024.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifc1e238d333afcde0cdf9e9b4af3b56ef65a4f7d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473002
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
The ISA-L integrated in SPDK doesn't include aarch64's implementation/
optimization in pass 6 months, upgrade it to achieve better performance
on aarch64. The upgrade includes the commit f3993f5c0(crc: Fix dynamic
relocation link failure on Arm), without which there will be link errors
on aarch64. That's the reason for not upgrading to the latest released
version of ISA-L(2.28.0).
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: Ifbf2a3ccc3f88689e6ea11ab30fa7a771b13b5ec
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472762
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The startup tool needs more than 1s to finish in FreeBSD
OS. So disable this test for FreeBSD.
Change-Id: Ibd59cb7d8ed4e27b5df5171888676be9bc37fa8a
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472660
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
It's important to be able to recover full context from just
the PDU in the future.
Change-Id: I3d1f3c326299b1237b42dbe33d340a282c3bc5bb
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470531
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
This is always the request pointer, so rename it for clarity.
Change-Id: Ifbda7db7787c65f0deb190a1e94f0676b2c0d99a
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470530
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Use whatever size the socket layer thinks is best. In practice,
this is the same size as before.
Change-Id: I4820e16d8da6e566d1f8f078a75d345399f64ab5
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470511
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
These will be used from the posix sock layer.
Change-Id: I6427d9e9aee889e11ba7e36876112a5aba449e31
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471751
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Instead of manually implementing lists/queues, use the API provided by
sys/queue.h.
Change-Id: I06b9f5df2312ed0b6c1e35ecf857eabe5ba107c3
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472739
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Don't change the directory of the script if at all possible.
Change-Id: I5e20784694cb61fac2cf148628de566361e2673e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472650
Reviewed-by: yidong0635 <dongx.yi@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This patch moves around code related to unregister
flow. This is a preparation for upcoming changes.
It also changes IO device for NVMe bdev to
nvme_bdev_ctrlr to make code clearer.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ic97a5b1973923a0cf44ed6c2d51b707dd7628d2c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468980
Tested-by: SPDK CI Jenkins <sys_sgci@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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
If specific NVMe mode requires asynchronous bdevs
creation we cannot free probe ctx until all bdevs
are created.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ie758f2fa8068c4090b7ce76c73967483441166cd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468453
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
With this change the new callback create_bdevs_cb
is introduced. This callback may be used by future
NVMe controllers which require asynchronous creation
of bdevs. This will make future implementation easier
because we will only have to call callback function.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ib46a38cf71bc783db58be9021efd06fcd547c4d9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469699
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
According to my check, I found that we should
umount /dev/loop200p2. The name of the dev used in the
start.sh and stop.sh is not same.
Then there an issue reported in the script:
umount /dev/loop200
umount: /dev/loop200: not mounted.
I think that this is an issue happens in our every
test. And it may influence the further test.
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I10c460b4e7760f321fd1a1cd87caa69d2911037b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472514
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Add to permanently excluded in shellcheck:
SC2164: Use cd ... || exit in case cd fails.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ic8091de0cdc7bba441ea1715699ca5bd170ece59
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472176
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>
Also add functions to convert it to/from string.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I6f7964d832c308b815150fff39eb3dc5c5ae5853
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471079
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Both callers of raid0_submit_rw_request() perform the same error
handling. Put it inside the function and change its return value to
void. After that, raid0_get_curr_base_bdev_index() becomes unused, so
remove it.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ifbe88700e413c3af9bb513538b3026c19e857d74
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471077
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>
The raid_bdev_io_submit_fail_process() and
raid_bdev_base_io_submit_fail_process() functions both do essentially
the same thing, so remove the former and replace its usages and rename
the other.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I8eda933e23d4bc840a6740e21a48d9c411998f6d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471076
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>
Something similar will be re-introduced in the upcoming patches, but
remove this for now to simplify refactoring.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I6b520a63ecfe9a1ae0c855507601c8aeeca03e8a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471075
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>
The initial implemenation of the module used a unique crypto
session per operation. Later an optimization was made to use shared
session, 1 for encrypt and 1 for decrypt. The size of the session pool
and assocaited cache were not adjusted at the time. This patch reduces
the session pool size to just 2 and uses 0 for session pool cache size.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ief3e867ec6bf4ff9c90d8ea60427ed8b85345275
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471692
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>
Previously iSCSI task was created after allocating data buffer
and reading all data, and hence creating iSCSI task and processing
iSCSI task were not separated.
However, the recent refactoring separate PDU header handling and
PDU payload handling, and then inserted allocating data buffer and
reading data segment in the middle.
If any critical error occurs during allocating data buffer or
reading data segment, PDU payload handling is not done, and hence
created iSCSI task is left in PDU receive process.
If any critical error occurs, the current connection starts exiting
and there is no way to continue PDU receive process.
The task left in PDU receive process is never freed, and hence
LUN hotplug or exiting connection never complete.
This patch do the following:
- Consolidate freeing pre-allocated PDU to spdk_iscsi_conn_destruct()
because this is the only path to exit connection.
- Abort SCSI task of the task left in PDU receive process if found
when freeing pre-allocated PDU. If the task is not SCSI or Data Out,
remove it simply.
Fix issues #1018.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8a2464c446c43bf4cfb5afbc0cd78b5bdef7d080
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472896
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 reverts commit Iad6ecdc37493fa9f2d7ccab262a2c75dac2fcd48.
Both estimated cause and code change were wrong and didn't fix
the issue.
The next patch will fix the issue.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I00c8bb515ee39522c0e744dccfb839af15e946c4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472895
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>