Spdk/include/spdk
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.h accel: move spdk_accel_get_memory_domain() to accel.h 2023-03-13 21:02:27 +00:00
assert.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
barrier.h barrier: LOONGARCH memory barriers 2023-01-06 15:54:46 +00:00
base64.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
bdev_module.h bdev: track IOs doing memory domain pull/push 2023-03-13 21:02:27 +00:00
bdev_zone.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
bdev.h bdev: accel sequence support for write requests 2023-03-13 21:02:27 +00:00
bit_array.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
bit_pool.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
blob_bdev.h blob_bdev: fix doc for spdk_bs_bdev_claim 2023-05-09 17:58:11 +08:00
blob.h lvol: do not open esnaps during bs_load 2023-04-05 19:18:17 +00:00
blobfs_bdev.h build: compile API functions with missing deps 2022-11-18 08:40:05 +00:00
blobfs.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
conf.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
cpuset.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
crc16.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
crc32.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
dif.h misc: Fix spelling mistakes 2022-12-09 08:16:18 +00:00
dma.h dma: add "virtual" accel memory domain 2023-01-09 12:37:37 +00:00
endian.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
env_dpdk.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
env.h env: expose function to get main core 2023-01-31 10:31:04 +00:00
event.h lib/env_dpdk: Add support for vfio-vf-token parameter 2022-12-12 09:41:25 +00:00
fd_group.h util: Add spdk_fd_group_nest() and spdk_fd_group_unnest 2023-04-04 17:38:22 +00:00
fd.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
file.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ftl.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
gpt_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
hexlify.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
histogram_data.h histogram_data: check bucket_shift when merging 2022-12-21 09:32:40 +00:00
idxd_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
idxd.h lib/idxd: Removed SPDK_IDXD_FLAG_PERSISTENT flag 2023-03-03 11:20:03 +00:00
init.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ioat_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
ioat.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
iscsi_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
json.h json: add spdk_json_write_named_double 2022-11-22 10:01:43 +00:00
jsonrpc.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
likely.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
log.h log: make macro parameters lowercase 2023-02-22 08:09:26 +00:00
lvol.h lvol: add support for external snapshots 2023-04-05 19:18:17 +00:00
memory.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
mmio.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nbd.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
notify.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme_intel.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme_ocssd_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme_ocssd.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvme_spec.h lib/nvme: include dword 13 field to extendable command structure 2023-03-09 23:22:41 +00:00
nvme_zns.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
nvme.h lib/nvme: restore spdk_nvme_ctrlr_get_registers 2023-03-31 17:41:35 +00:00
nvmf_cmd.h nvmf: add spdk_nvmf_request_copy_*_buf() 2023-02-13 13:50:51 +00:00
nvmf_fc_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvmf_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
nvmf_transport.h nvmf: retry QID check if duplicate detected 2023-05-09 17:58:11 +08:00
nvmf.h nvmf: introduce async transport create 2023-02-16 16:45:08 +00:00
opal_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
opal.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
pci_ids.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
pipe.h util/pipe: Fix documentation on spdk_pipe_create 2023-05-09 17:58:11 +08:00
queue_extras.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
queue.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
reduce.h bdev/compress: Port to use accel_fw instead of compressdev 2023-01-20 10:26:21 +00:00
rpc.h lib/rpc: add RPC allow list 2022-11-15 08:31:02 +00:00
scheduler.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
scsi_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
scsi.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
sock.h sock/uring: Flushing a socket not in a group still attempts to send 2023-01-19 17:34:01 +00:00
stdinc.h env_dpdk: fix check for AMD iommu 2022-11-15 08:31:13 +00:00
string.h util: Add spdk_strcpy_replace() to replace substrings 2023-01-10 13:12:05 +00:00
thread.h thread: Move get/put calls into .c file 2023-05-09 17:58:11 +08:00
trace_parser.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
trace.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
tree.h util: rename RB_ROOT into _RB_ROOT 2021-06-04 22:46:40 +00:00
ublk.h ublk: add configure and event/subsystem 2023-01-20 07:48:25 +00:00
util.h util: add spdk_iov_xfer_*() API 2023-01-30 16:28:35 +00:00
uuid.h uuid: add spdk_uuid_generate_sha1() 2023-02-28 08:57:01 +00:00
version.h version: SPDK 23.05 pre 2023-01-20 22:03:09 +00:00
vfio_user_pci.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
vfio_user_spec.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
vfu_target.h lib/vfu_target: add missed comments to vfu_target.h 2022-12-02 10:44:51 +00:00
vhost.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
vmd.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
xor.h update Intel copyright notices 2022-11-10 08:28:53 +00:00
zipf.h update Intel copyright notices 2022-11-10 08:28:53 +00:00