Process IO retries on IO channel poller. This patch
replaces retry queue associated with device with the
queue associated with IO channel. This patch also adds
putting IO write request on retry queue in case write
buffer is full instead thread message sending.
Change-Id: Iec9c9a4e858c90f1fe344bb298ff13ed0e13397f
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/543
Reviewed-by: Konrad Sztyber <konrad.sztyber@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>
Do not complete user IO writes immediately but put them to IO
channel completion queue. This allow to complete IO requests in
batches and reduce need of unnecessary message sending in bdev layer.
Change-Id: I1bd1e076ff31e9e5faef70f9d0b3512d8f3a31b7
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/542
Reviewed-by: Konrad Sztyber <konrad.sztyber@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>
Given enum was not aligned with spec. This status can be reported when
size equals 0.
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: If51f6b051c13880c1fd4e6bb0a02f134b28b5a88
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/928
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
It is memory optimisation as transport id is 'heavy'. As a side effect
simpler handling of listen and stop_listen on transport specific layer.
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I4e9d0e0c5eee2d570ec4ac9079270c32d5afb8db
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/626
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This patch fixes condition used to change zone state.
Zone write pointer is an offset from disk beginning and
was wrongly used as an offset from zone.
Change-Id: I6cd42c6db78003812ec6d6bc75550bb7a5b067ca
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/954
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
We've now supported ZCOPY io type and Malloc bdev will use
ZCOPY for the read/write operation. Add the support for the
test case of Malloc with ZCOPY operation.
Change-Id: I291fc9ef82b1eae800c97c5a6b7a0c810c357fe0
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/540
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Add flag for pmem dependencies needed by reduce and pmdk components.
Also add missing libpmem in Ubuntu section.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I596a1e6660f8b6f92bdab81046fa3533ae78fca3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/599
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: Aleksey Marchuk <alexeymar@mellanox.com>
Add information about missing dependencies for Ubuntu versions smaller than 19.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I776d93e156c07c618df9cb5eeb99c0ca8f78e388
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/598
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Add information about missing dependencies for Ubuntu versions smaller than 19.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Id48b462be35a761fd9fad4bdc48c1757cf5a7580
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/597
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Vbdev module should use the base channel, not the vbdev channel.
fixes#1195
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I7e426a2fc1735213c986ba55dc17623bc3ce948e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/791
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Startup RPC only to avoid issues trying to switch while in use.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I7f1801905de0927f3610c4065182dd8fa88cdfdd
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/660
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>
* Moved code around in accel framework as the sw implementation
is included in the same file (it's always present) so that its
easier to differentiate framework functions from sw accel
* Renamed some functions for the same reason
* Added/edit comments to clarify things
All in prep for extending the API to more functions.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I465ee743d999999df4c06e3f68feddcd73c6e6a4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/580
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>
The copy engine library, modules and public APIs have been renamed.
Use of the word `copy` has been replaced with the word `accel`
short for accelerator in preparation for adding new capabilities
in the future. Additionally, APIs for what was previously called
the `memcpy` engine have been renamed to identify the engine as a
software accelerator.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ia607aa718416146fbba1e6792b8de0f66bd8a5de
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/576
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This will come in handy in the new poll group API.
Change-Id: I9cf14082270b28b35f4a440c5cb2471c81e374ba
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/578
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This will be useful in the upcoming spdk_nvme_poll_group api.
Change-Id: Id83340a2ce9887817312f5aac38db4de8c588974
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/577
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: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
CMSG_FIRSTHDR could theoretically return NULL. Check it for the
peace of mind.
CMSG_FIRSTHDR() returns a pointer to the first cmsghdr in the
ancillary data buffer associated with the passed msghdr.
It returns NULL if there isn't enough space for a cmsghdr
in the buffer.
Change-Id: I6c7e1eb59121b59c568d3ad7f5eda649a49026f4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/771
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
MD026 Trailing punctuation in header
This rule is triggered on any header that has a
punctuation character as the last character in the line
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3ab4894092ef6b5f920d89b74e43c2e46e9581c0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/657
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>
MD022 Headers should be surrounded by blank lines
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I768324b00fc684c254aff6a85b93d9aed7a0cee5
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/656
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>
MD003 - Header style
Triggered when inconsistent header styles are used accros file.
Also adjust other headers in file to fix
MD022 - Headers should be surrounded by blank lines
MD025 - Multiple top level headers in the same document
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I1937abc0d29dc8a21a8eac54d0af2427ebf95bdc
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/653
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>
1 warning generated.
LIB libspdk_nvmf.a
iscsi_subsystem.c:1285:25: warning: Result of 'calloc' is converted to a pointer
of type 'struct spdk_iscsi_sess *', which is incompatible with sizeof operand type 'void *'
g_spdk_iscsi.session = calloc(1, sizeof(void *) * g_spdk_iscsi.MaxSessions);
^~~~~~ ~~~~~~~~~~~~~
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ieb8dcac8ec172405c5ca97a4867582ff9bfaa569
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/827
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>
Dry run processing in iscsi_parse_portal() now only checks if
portal string is not NULL. Portals are managed not by fixed size
array but linked list now. Hence dry run processing is not needed
itself now.
So remove the dry_run parameter from iscsi_parse_portal() and
the dry run loop in iscsi_parse_portal_grp().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib7cb444b51581b8ee603388aad34bc58d1cc9023
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/493
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>
Global session pool had been freed immediately after starting
connection shutdown. iSCSI connection shutdown is asynchronous.
It will be safe to free global session pool after completion of
all connections shutdown. Hence move free(g_spdk_iscsi.session)
from spdk_iscsi_fini() to _iscsi_fini_dev_unreg().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I4c16930a0e861a190115049cba3739ec01f0a8a2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/494
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>
Login acceptor still runs on one of the default reactor threads,
but we move iSCSI poll group from the default reactor threads to
dedicated threads created at startup.
At startup, use reference count to detect completion and
move to the next step. By returning completion message to the init
thread, we can avoid using any atomic operation.
At shutdown, we can use spdk_for_each_channel() conveniently. Put
voluntary spdk_thread_exit() calls into the callback to
spdk_put_io_channel().
Moving login acceptor to a dedicated thread is another task.
To maintain the original behavior, number of threads created is
the number of cores that SPDK app uses.
Change-Id: Ifd1de9343ac0183254ca608d1fd8faa94acc254e
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/492
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 a preparation to the next patch. We don't have to pass
iscsi_parse_configuration() as an argument of
initialize_iscsi_poll_group(). We can refer iscsi_parse_configuration()
directly in initialize_iscsi_poll_group() instead.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I96715399e68ebfa0d292c0b4591d271e975e1a04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/491
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>
The next patch will create a SPDK thread for each poll group at
startup. Hence iSCSI connection will be created or destroyed on
these threads. On the other hand, logout request to the active
connection will be still invoked by the default thread.
This unmatch will hit assertion such that poller is unregistered
different thread that registered it.
Fix this unmatch by sending message to the thread explicitly to
request logout and wait for the logout process to start.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iff361e78b9ba077230e38d9586f7187968e33314
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/490
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>
The next patch will create a SPDK thread for each poll group at
startup. Hence iSCSI configuration management will be done by
different thread from these poll group threads.
Hence send message explicitly to add connection to poll group even
at startup. We can do this for the current master branch.
Remove some code related with SPDK thread framework from unit tests
for iSCSI portal group because thread management is moved to
connection.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I40cacdb2066f65866f7ef83cf3b3e4e8b8cd322e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/489
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>
qpair might be deleted with incomplete requests (e.g. when NIC
is removed or when huge amount of qpair are being destroyed
simultaneously), this reduces the capacity of the transport
buffers pool. Check that qpair qd is nonzero and process
requests whose state is not FREE. Processing of requests
when qpair is being deleted leads to their release.
Change-Id: I0e42b5cb78f35add9f37942db77781db72c1e59c
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/676
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>
Some of variables have types which don't match their
usage in code
Change-Id: Ic2bd5fd6561c70143dde436ce9cddc0be4d3b0d0
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/521
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 field is not used in data path, so move it to "cold" data
Change-Id: I25f2fdb3aff613f9e16a2e13b2b06f8180a60fb2
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/520
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 allows to avoid calculation of ioccsz bytes on each request
and removes access to "cold" ctrlr structures in data path.
Add UT to check validness of calculation
Change-Id: I55ceff99eb924156155e69a20f587a4f92b83f0b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/519
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>
These data buffers can't later be freed and need to be carefully
managed by the host. Also, this is very likely slower.
Change-Id: I0d205c0c7136e0aa972e927361bd88e765d218c6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/784
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
If the transport doesn't define one, don't call it.
Change-Id: I8b83132f9fc0accbd4faa8fa0fc17a6bd11e543e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/783
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>