Spdk/test/unit/lib
Jim Harris c12d468d02 nvmf: retry QID check if duplicate detected
A host will consider a QID as reusable once it disconnects
from the target.  But our target does not immediately
free the QID's bit from the ctrlr->qpair_mask - it waits
until after a message is sent to the ctrlr's thread.

So this opens up a small window where the host makes
a valid connection with a recently free QID, but the
target rejects it.

When this happens, we will now start a 100us poller, and
recheck again.  This will give those messages time to
execute in this case, and avoid unnecessarily rejecting
the CONNECT command.

Tested with local patch that injects 10us delay before
clearing bit in qpair_mask, along with fused_ordering
test that allocates and frees qpair in quick succession.
Also tested with unit tests added in this patch.

Fixes issue #2955.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I850b895c29d86be9c5070a0e6126657e7a0578fe
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17362
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
2023-05-09 17:58:11 +08:00
..
accel accel/dpdk_cryptodev: Remove queued_cry_ops 2023-05-09 17:58:11 +08:00
bdev UT/bdev/bdev.c:add bdev_compare test 2023-05-09 17:58:11 +08:00
blob blob: hotplug new back_bs_dev 2023-03-28 03:57:35 +00:00
blobfs update Intel copyright notices 2022-11-10 08:28:53 +00:00
dma Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
env_dpdk update Intel copyright notices 2022-11-10 08:28:53 +00:00
event thread: use spdk_thread_get_app_thread instead of _spdk_get_app_thread 2023-02-24 12:46:27 +00:00
ftl update Intel copyright notices 2022-11-10 08:28:53 +00:00
idxd update Intel copyright notices 2022-11-10 08:28:53 +00:00
init subsystem: assert all subsystems initialized on app thread 2022-11-23 08:22:04 +00:00
ioat update Intel copyright notices 2022-11-10 08:28:53 +00:00
iscsi iscsi: fix segfault when r2t 2022-11-29 17:21:18 +00:00
json json: add spdk_json_write_named_double 2022-11-22 10:01:43 +00:00
jsonrpc update Intel copyright notices 2022-11-10 08:28:53 +00:00
log log: add deprecated tracking API 2022-12-07 17:45:53 +00:00
lvol lvol: do not open esnaps during bs_load 2023-04-05 19:18:17 +00:00
notify update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme nvme: Add unit test for nvme_ctrlr_disable() and _poll() 2023-03-09 23:31:15 +00:00
nvmf nvmf: retry QID check if duplicate detected 2023-05-09 17:58:11 +08:00
rdma rdma: Maintain per device PD which is persistent across reconnect 2022-08-12 08:59:43 +00:00
reduce bdev/compress: Port to use accel_fw instead of compressdev 2023-01-20 10:26:21 +00:00
rpc update Intel copyright notices 2022-11-10 08:28:53 +00:00
scsi update Intel copyright notices 2022-11-10 08:28:53 +00:00
sock sock: change min recv/send buf sizes to 4 KiB 2023-04-04 07:36:23 +00:00
thread thread: Move iobuf code to a separate compilation unit. 2023-05-09 17:58:11 +08:00
util util/pipe: Track full condition with a separate bool 2023-04-05 19:19:21 +00:00
vhost UT/vhost/vhost.c:add the test of spdk_blk_construct 2023-05-09 17:58:11 +08:00
json_mock.c virtio_blk: add dump opts 2023-01-20 18:57:38 +00:00
Makefile build: rely on configure to select which unit tests to build 2023-03-28 06:57:40 +00:00