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> |
||
---|---|---|
.. | ||
ctrlr_bdev.c | ||
ctrlr_discovery.c | ||
ctrlr.c | ||
fc_ls.c | ||
fc.c | ||
Makefile | ||
nvmf_fc.h | ||
nvmf_internal.h | ||
nvmf_rpc.c | ||
nvmf.c | ||
rdma.c | ||
spdk_nvmf.map | ||
subsystem.c | ||
tcp.c | ||
transport.c | ||
transport.h | ||
vfio_user.c |