Spdk/test
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 examples/accel/perf: add support for xor 2023-02-21 08:33:18 +00:00
app llvm_vfio_fuzz: detach io ctrlr in new thread 2023-02-17 12:52:59 +00:00
bdev test/blockdev: Use regualr RPC socket for mlx5 config 2023-05-09 17:58:11 +08:00
blobfs add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
blobstore add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
common test/common: Merge pkgdep/dnf into pkgdep/yum 2023-05-09 17:58:11 +08:00
compress bdev/compress: Port to use accel_fw instead of compressdev 2023-01-20 10:26:21 +00:00
cpp_headers update Intel copyright notices 2022-11-10 08:28:53 +00:00
dd add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
dma test/dma: call spdk_thread_exit() 2022-11-23 08:22:04 +00:00
dpdk_memory_utility add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
env add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
event autotest: unify style for test/ and ./test/ 2023-02-14 09:07:09 +00:00
external_code tests: Run make clean only when SPDK was configured 2023-02-02 09:05:56 +00:00
ftl test/ftl: add cases line to cover RPC bdev_ftl_unload 2023-01-17 20:32:58 +00:00
fuzz test/fuzz: Don't gather coverage under short-fuzz job 2023-01-19 14:41:54 +00:00
interrupt Add SPDX header to various files 2022-11-29 08:27:51 +00:00
ioat add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
iscsi_tgt bdev/pmem: Removing bdev pmem - updated tests 2023-03-09 09:21:23 +00:00
json_config test/json_config: detach virtio controllers before shutdown 2023-03-28 06:58:38 +00:00
lvol autotest: unify style for test/ and ./test/ 2023-02-14 09:07:09 +00:00
make autotest: unify style for test/ and ./test/ 2023-02-14 09:07:09 +00:00
nvme test/nvme: add doorbell_aers test app 2023-03-31 17:41:35 +00:00
nvmf test/nvmf: Reload irdma driver only when e810 test was requested 2023-05-09 17:58:11 +08:00
ocf bdev/ocf: Update OCF to 22.6.1 2023-04-06 14:40:39 +00:00
openstack add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
packaging test/packaging: Don't install DPDK RPMs from the remote by default 2023-03-13 07:27:43 +00:00
rpc lib/trace: add trace_get_info RPC 2022-12-05 09:50:38 +00:00
rpc_client add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
rpc_plugins autotest: Use rpc_cmd() for rpc plugin-based tests 2021-04-02 08:22:42 +00:00
scheduler test/scheduler: Merge cppc_cpufreq into acpi-cpufreq check 2023-03-22 07:08:22 +00:00
setup test/setup: Lower per_node_2G_alloc to per_node_1G_alloc 2023-03-30 07:01:43 +00:00
sma test/sma: limit number of vhost-blk devices to 2 2023-03-13 21:02:27 +00:00
spdkcli vhost_rpc:add sessions information for vhost_get_controllers 2023-03-13 07:59:08 +00:00
thread thread: test SPDK spinlocks in an application 2022-12-06 21:20:17 +00:00
ublk test/ublk: add parameter for num devices 2023-01-25 10:52:36 +00:00
unit nvmf: retry QID check if duplicate detected 2023-05-09 17:58:11 +08:00
vfio_user test/vfio_user: use 2048MiB static memory size for bdevperf 2023-01-16 08:22:08 +00:00
vhost test/vhost: Use --force for all mkfs and wipefs calls 2023-03-27 10:48:46 +00:00
vmd add (c) and SPDX header to bash files as needed 2022-11-29 08:27:51 +00:00
Makefile update Intel copyright notices 2022-11-10 08:28:53 +00:00
spdk_cunit.h update Intel copyright notices 2022-11-10 08:28:53 +00:00