Spdk/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: allow libisal and libisal_crypto 2023-03-28 07:07:06 +00:00
bdev lib/bdev: fixed potential dereferencing of NULL pointer 2023-03-28 07:03:56 +00:00
blob blob: set rc to -EINVAL when esnap len too long 2023-05-09 17:58:11 +08:00
blobfs so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
conf so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
dma so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
env_dpdk env_dpdk: omit huge-related options when --no-huge specified 2023-05-09 17:58:11 +08:00
env_ocf ocf: fix env_ticks_to_{msec,usec,nsec} precision & accuracy 2023-03-21 19:08:59 +00:00
event event: Nest the thread's spdk_fd_groups in interrupt mode 2023-04-04 17:38:22 +00:00
ftl so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
idxd lib/idxd: Removed SPDK_IDXD_FLAG_PERSISTENT flag 2023-03-03 11:20:03 +00:00
init subsystem: Gather list changed conditions. 2023-05-09 17:58:11 +08:00
ioat so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
iscsi iscsi: Return if conn->sock is NULL when updating connection params 2023-05-09 17:58:11 +08:00
json so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
jsonrpc freebsd: return negated error from getaddrinfo() 2023-03-10 16:44:37 +00:00
log so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
lvol lvol: pass non-NULL lvs and lvol to dev_create 2023-04-05 19:18:17 +00:00
mlx5 so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
nbd so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
notify so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
nvme nvme: only prefetch req's stailq when req != NULL 2023-03-31 17:41:35 +00:00
nvmf nvmf: retry QID check if duplicate detected 2023-05-09 17:58:11 +08:00
rdma so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
reduce deprecation: Remove support for PMDK 2023-01-26 15:16:19 +00:00
rocksdb rocksdb: remove spdk_thread 2022-11-23 08:22:04 +00:00
rpc so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
scsi so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
sock sock: Allow flushing even if the socket is in a poll group 2023-01-24 18:18:33 +00:00
thread thread: Move get/put calls into .c file 2023-05-09 17:58:11 +08:00
trace so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
trace_parser so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
ublk lib/ublk: use page aligned data buffer 2023-03-28 10:20:50 +00:00
ut_mock so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
util util/pipe: Simplify some null checks 2023-05-09 17:58:11 +08:00
vfio_user so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
vfu_tgt so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
vhost lib/vhost: Rename rte_vhost_slave_config_change() 2023-03-24 07:23:19 +00:00
virtio lib/virtio_vfio_user: use VIRTIO_PCI_VRING_ALIGN aligned vring address 2023-02-09 11:31:39 +00:00
vmd so_ver: increase all major versions 2023-01-24 08:37:21 +00:00
Makefile ublk: add configure and event/subsystem 2023-01-20 07:48:25 +00:00