The quirk can only be applied when not exceeding mqes. Given codition
is not enough as DEFAULT_IO_QUEUE_SIZE can be equal mqes + 1. In such
case driver is unable to create io queues.
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I72de37ee413788ffd3483e814eded21ea05997c9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1456
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: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Add process_blk_task to replace the common codes
of the process_vq and submit_inflight_desc for making
code simple.
Change-Id: I5ff146e904874714dd59249f5191a3606e523c3e
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1348
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>
PSDT 00b also need to check the metadta alignment.
Change-Id: I117f524c61bc4c712b46c91e4d51549825d06f6c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1353
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>
We only set the flag to false when the controller reports SGL supported
and can use byte contiguous buffer. Also check the data block's alignment
for hardware SGL.
Change-Id: Id936c49823963000d0543fc95fbb6edba3118feb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1352
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Dword alignment and granularity are required for the data blocks when
the controller reports this capability.
Change-Id: I6b6300515a528acb34a032050ceedf673a4b326c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1315
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Fix the vdev->name to vsession->name for making it
same with the process_vq.
Change-Id: Ie0e9733bdbfbddbbf7e665b8c9431bfdbcb8a569
Signed-off-by: Jin Yu <jin.yu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1367
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Not context passed to vhost_dev_for_each_session() but struct
spdk_vhost_session had been passed to the callback to
vhost_dev_for_each_session() by mistake.
This patch fixes the bug. Besides, rename ctx by ev_ctx to avoid
potential future degradation.
Fixes issue #1306.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8ceed4e1bb7c0c27fb75516527e3bad91a054b02
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1432
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Collect elapsed time of each SPDK thread and add it to output of
framework_get_reactors RPC.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9e2f0487de81720327428cda5738284a4ce2c557
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1278
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This patch updates reactor to count thread run time correctly
on multiple SPDK threads per CPU core configuration by using
the refined spdk_thread_poll().
Add tsc_last to struct spdk_reactor to use the end time of the
last thread as the start time of the next thread.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I21042867885d289ff0c23bf2a9ba6a8076a59673
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1256
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: Changpeng Liu <changpeng.liu@intel.com>
Update spdk_thread_poll() to count SPDK thread stats correctly on multiple
SPDK threads per reactor configuration.
spdk_thread_poll() gets start time and reads TSC at end as end time,
and then gets delta between them as run time. Run time is added to idle
time or busy time according to the result of polling.
Reactor overhead is included into the next thread which calls
spdk_thread_poll() now.
spdk_thread_poll() saves the end time to the current thread to use it
as the start time of the next thread.
Unit test framework for this patch and the next patch need to access
thread->tsc_last. In the next patch, reactor will use the end time of
the current thread to the start time of the next thread in reactor_run()
to realize the idea.
Hence add an new API spdk_thread_get_last_tsc(). The corresponding
variable is named as tsc_last and it is good and is aligned with
DPDK (DPDK has used tsc_start and tsc_end as variable name). But
last_tsc will be better as API name because the last TSC value is
easier to understand.
Then add necessary unit test and update the unit test framework.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5e465e9283c032acb427576d0c90f9e1414f2271
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1048
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Actually we can just use one API to finish the requirement.
Change-Id: Ia0d3d589755e8c92f636d3d090ec642299511401
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1280
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>
The revert asynchronous API doesn't run as the *real* asynchronous
way, because the drive can only support synchronous module and only
1 session is supported. The reason why we added this API is that
RPC call has the default timeout value here, while the revert may
take over several minutes, the API itself doesn't short the revert
action, so just remove it and use the synchronous API instead.
The revert action will erase all the users data and bring the drive
back to the factory state, it should run in the synchronous mode,
so just remove the asynchronous API and we can increase the timeout
value when using RPC to call this API.
Change-Id: I08a082edea6385e378399423bbb229d05f8bc262
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1232
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>
The APIs even don't have a chance to be called if the drive can't
support OPAL feature, so just remove the NULL check, and we will
store level 0 discovery descriptors after initialization, so
spdk_opal_cmd_scan() isn't necessary here, remove it as well.
Change-Id: I24f12f2c352996d9ebe76dc015cd0b7502798359
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1231
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>
The previous erase locking range API didn't take the real
erase action, it's kind of secure erase, so rename it with
another name and add the real erase support.
This method is used to cryptographically erase user data within
a specific LBA Range and to reset the access control Locking
of that LBA Range.
The TPer SHALL reset the ReadLockEnabled, WriteLockEnabled,
ReadLocked, and WriteLocked column values to False for the
Locking object on which the method is invoked.
Change-Id: I0c83df589382b0a2f189642d8119e389aa4bc559
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1210
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>
There are maximum 8 locking ranges per TPer, so we don't need to use
calloc() for each range.
Change-Id: Ie9d96ba28736dd7a91cb615ece99ebcefa695fc8
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1209
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>
Both spdk_opal_key and opal_common_session are used in the same context,
so we don't need to save spdk_opal_key pointer in opal_common_session,
juse use the stack value.
Change-Id: I24b64711b45f09a60f9aca1175319e32de4c7e10
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1193
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>
For active key we don't need to store in the calloc() data
structure, because we'd better not to store any password
related structure, and it's only used in specific context,
so just use stack variable instead.
Change-Id: I4711e279ffe9a97d471f0db0b625b95a36b55d38
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1192
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 will help with making the _spdk_blob_persist_write_extent_pages()
batch all writes of extent pages.
No functional change occurs with this patch, this is just refactor
for future change.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8c93b1d6473db660f7ad5e04c8ec9f3331b2055c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/986
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>
super->clean value signifies if blobstore was unloaded
cleanly.
If it was not, then during bs_load the _spdk_bs_recover()
procedure if called.
Meanwhile bs->clean is always set to 1 after load, causing very first
blob_persist to also re-write super block with the super->clean
set to 0. To signify that md has changed and possibly trigger
the recovery if clean bs unload does not occur.
When the re-write of super block succeeds the bs->clean is set to 0,
because further re-writes of super block are not needed on next
blob persist.
This patch resolves issue when:
1) reading super block fails - execution should backoff, to prevent
writing an empty buffer as super block !
2) writing super->clean = 0 to the super block fails - execution
again should fail, and bs->clean should not be set to 0. It will
cause next persist to attempt re-write again.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia07cc5c6c107310059b50886edb7283c176b9169
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1164
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>
In general it is not possible to delete snapshot when
there are clones on top of it.
There is special case when there is just a single clone
on top that snapshot.
In such case the clone is 'merged' with snapshot.
Unallocated clusters in clone, are filled with the ones
in snapshot (if allocated there).
Similar behavior should have occurred for extent pages.
This patch adds the implementation for moving EP from
snapshot to clone along with UT.
The UT exposes the issue by allowing delete_blob
to proceed beyond just unrecoverable snapshot blob.
Fixes#1291
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib2824c5737021f8e8d9b533a4cd245c12e6fe9fa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1163
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>
If nvme_rdma_qpair_submit_sends() returns -ENOMEM,
nvme_rdma_qpair_process_completions() returns immediately.
In this case, nvme_rdma_qpair_process_completions() does not
poll CQ.
However, nvme_rdma_qpair_process_completions() can poll CQ even
when there is no free slot in SQ.
Hence move nvme_rdma_qpair_submit_sends() and
nvme_rdma_qpair_submit_recvs() after the loop to poll CQ.
nvme_rdma_qpair_submit_sends() and nvme_rdma_qpair_submit_recvs()
output error log and so checking return code of them is not
necessary and is removed in this patch.
This fixes part of the github issue #1271.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icf22879c69c3f84e6b1d91dc061b6f44237eedd1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1342
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This is another preparation to extende spdk_thread_poll() to update
thread stats correctly on multiple SPDK threads per CPU core
configuration as an new function spdk_thread_poll_ext().
As another preparation, factor out main loops of spdk_thread_poll()
to _spdk_thread_poll(). _spdk_thread_poll() will be called in
spdk_thread_poll_ext() in the next patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie006359c00afc2e9b90e15f918f76cf1af0b7ce1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1255
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Subsequent patches will extend spdk_thread_poll() to update
thread stats correctly on multiple SPDK threads per CPU core
configuration as an new function spdk_thread_poll_ext().
Thread stats will be updated separately by spdk_thread_poll() and
spdk_thread_poll_ext(), but updating thread stats itself is
the common operation.
Hence as a preparation, factor out updating thread stats operation
from spdk_thread_poll() to _spdk_thread_update_stats().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I93c40eb0363ca34f2150299b09c49f1401583832
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1242
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
The shutdown flag is only used when resubmitting the AER, and it will not
be updated when hot remove happened, so rename it to is_destructed.
Change-Id: Iafc27bd6cb23a851ed6c96470a2a45546a399c88
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1254
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This patch does drop in replacement of SN32_LT and SN32_GT by
spdk_sn32_lt and spdk_sn32_gt, respectively.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5df1e461d2b25a2f20222e823fb1ec68ced049ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1347
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
spdk_jsonrpc_begin_result() was changed to always return non-NULL
a while ago. Most of the checks were removed from SPDK, but this
one must have been omitted because to its unusual structure.
Change-Id: If305d7a27d8e6bd4dae1aa8221efabba50db1982
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1330
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
There's no reason not to publish those. Especially if
they're needed in other public headers.
Change-Id: I7dfc6922fcc0dfc46822ad8a16a375f997b98e84
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1041
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
NVMe specification in ch.7.6 "Controller Initialization" suggests to
use only Set Features "Number of queues" command and says nothing
about Get Features. All required information is available after Set
Num Queues step.
Fixes#1270
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: Ide38ba9c7f063f1d6b13bfce4232c588cc906784
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1271
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Compiling raid5 has a direct dependency on rte_hash,
which was only built if vhost was built.
The following didn't work:
./configure --with-raid5 --without-vhost
Change-Id: Id36a7d4a21c2e0db00b0641581542e244c4cbbb4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1013
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>
We used to link with rte_vhost only if it was present as a file,
which doesn't make much sense - we should try to link with it
when we think it's needed.
Change-Id: I9609972d419fdf6e8d3b4644eff3f5dba83abe42
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1325
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>
the nvme, nvmf, and thread libraries have all had public APIs
removed or changed since the API was changed to 2.0 and
backported to 20.01.1 we should rev these so versions to make
that distinction obvious.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Id48454b8d0451794abad4db452b5c4e337b23c0b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1269
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 will allow us to keep track of compatibility issues on a
per-library basis.
Change-Id: Ib0c796adb1efe1570212a503ed660bef6f142b6e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1067
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 previous patch ce6b8a1313
added a wrong assumption that every WC of RDMA_WR_TYPE_DATA
type must point to rdma_req with IBV_WC_RDMA_READ opcode since
RDMA_WRITE operations are non-signaled. However it is wrong
since in the case of error all WRs will have WCs. Revert part
of the problematic patch.
Change-Id: I8d270c5313ebfe1ec44a338820a62f085996eb8f
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1334
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>
The next patch will create poll group threads dynamically for
NVMe-oF target, and will need to wait for completion of poll group and
I/O channel destroy. This is a preparation for the next patch.
Add callback function and its argument to spdk_nvmf_poll_group_destroy(),
and to struct spdk_nvmf_poll_group, respectively.
The callback has not only cb_arg but also status as its parameters even
if the next patch always sets the status to zero. The reason is to follow
spdk_nvmf_tgt_destroy's callback and to process any case that the status
is nonzero in future.
spdk_nvmf_poll_group_destroy() sets the passed callback to the passed
poll group.
Then spdk_nvmf_tgt_destroy_poll_group() calls the held callback in the
end.
This change will ensure all pollers are being unregistered and
all I/O channels are being released.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ifb854066a5259a6029d55b88de358e3346c63f18
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/495
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
iSCSI target got segmentation fault if connection is being exited
between spdk_iscsi_conn_write_pdu() and its callback
iscsi_conn_login_pdu_success_complete() are executed.
This was caused by recent asynchronous socket write feature.
Fixes issue #1278.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Idffd90cd6ee8e6cb4298fe3f1363d8d5c5a3c49d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1275
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: wanghailiang <hailiangx.e.wang@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Not doing thsi was causing me to hit an assert in this funciton that was
caused by us erroneously calling into it from the error path of
_nvme_qpair_submit_request.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: I46a4d9ec543281d756cc4447d3e880a98f341092
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1121
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: Aleksey Marchuk <alexeymar@mellanox.com>
This gives us a more standard path in the create_io_qpair path. Eventually
this will allow us to bring the connection commands out to the generic layer
in alloc_io_qpair. Then we can split the calls to create and connect at the
generic level making it possible to add rdma qpairs to a poll group in a meaningful
way.
Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Ib1b125f834c3c39a2b5050ff4a9bc4a053b95c99
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1119
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: Aleksey Marchuk <alexeymar@mellanox.com>
This allows it to fit on three cachelines instead of four.
Change-Id: I2510b50ffcefb77fa570e738b2c6588749f30a00
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1143
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: Aleksey Marchuk <alexeymar@mellanox.com>
The current implementation doesn't log WC status. Remove independent
logs by WR type, use common error log. Besides that add a minor cleanup
in checking of WC opcode for RDMA_WR_TYPE_DATA type - it is always
RDMA_READ
Change-Id: Ifdfc295e804ab3246ec54327afc8a5a37aca1d55
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1160
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This reverts commit ea5ad0b286.
This code is moving from the nvmf target to the posix sock
layer in this series.
Change-Id: I333bdf325848e726ab82a9e6916e1bbdcd34009c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/446
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 reverts commit d50736776c.
This code is moving from the nvmf target to the posix sock
layer in this series.
Change-Id: I7cf477333f2a3fa4a0089394d5fa28142b262a7f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/445
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 reverts commit 5e7b8d18f3.
This code is moving from the nvmf target down into the posix
sock layer in this series.
Change-Id: Iea9a7cef5bedd6a34edf7b4c87825897279829c3
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/444
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 will be used by upcoming spdk_top application.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I9ffcc3f2e36b8044bbc394938fc7a1dca1dc6892
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1211
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>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>