numam-spdk/lib
Jim Harris 15b7d3bacc nvme/pcie: defer bad vtophys to completion context
The pcie layer can't always detect bad addresses
in the request at submission time - for example,
the transport may not have any trackers available
and the request gets queued at the generic
nvme level.

So this means that we might detect vtophys failures
during submission time, or in a process_completions
context - the latter happening when we complete
one request which triggers submitting a new request.

Currently if the vtophys failure happens during
submission context, we return -EFAULT to the
caller *and* call the completion callback.  Nowhere
else in the driver do we do both - the intention
has always been that you get one or the other.

So make all of this consistent by tagging the
tracker and the qpair with a flag if we hit a vtophys
error in the submission path.  Return 0 to the caller,
who will then later get a completion callback for the
bad request when the qpair is next processed for
completions.

I considered a separate TAILQ to hold these 'bad'
trackers, but that would have required duplicating
quite a bit of the tracker completion code for this
one case.  The flag on the pqpair is already in the
hot cacheline, so it's cheap to check it.  We will
only interate the outstanding_tr list when that flag
is set, so this should have zero impact to performance.

Fixes issue #2085.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I60b135fb32d899188e51545b69feb1b27758fd7f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9234
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2021-08-20 07:27:09 +00:00
..
accel accel_engine: Fix the crc destnation address 2021-07-30 08:22:48 +00:00
bdev bdev: Add extended versions of readv/writev 2021-08-20 07:26:10 +00:00
blob blobstore: calculate correct num_md_clusters in bs_recover 2021-08-09 08:39:42 +00:00
blobfs lib/trace: record string arguments as (const char *) 2021-06-28 16:17:35 +00:00
conf so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
dma dma: Introduce memory domain 2021-08-20 07:26:10 +00:00
env_dpdk mk: Enable build of mlx5_pci compress PMD 2021-08-16 08:48:31 +00:00
env_ocf lib/ocf_env: Force struct list 64 bytes alignment 2021-07-28 07:02:14 +00:00
event lib/event: do not set interrupt mode when eventfd is not supported 2021-08-13 07:21:33 +00:00
ftl lib/trace: don't format arg's name while registering a tpoint 2021-06-10 10:58:05 +00:00
idxd lib/idxd: pre translate the completion address for batch entries 2021-08-12 12:57:07 +00:00
init util: Add macro SPDK_SIZEOF_MEMBER to get size of a member of a struct 2021-07-15 07:16:22 +00:00
ioat ioat: fix potential double free problem in ioat_channel_start() 2021-06-16 09:00:37 +00:00
iscsi net: Remove library 2021-07-13 08:57:58 +00:00
json json: add the spdk_json_write_uint128 function 2021-07-22 13:46:50 +00:00
jsonrpc jsonrpc: use SOCK_NONBLOCK in socket() calls 2021-05-05 13:31:10 +00:00
log log: add an API to return syslog level based on SPDK's log level 2021-08-12 12:57:39 +00:00
lvol so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
nbd lib/nbd: hot remove will be correctly handled 2021-07-26 08:56:23 +00:00
notify so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
nvme nvme/pcie: defer bad vtophys to completion context 2021-08-20 07:27:09 +00:00
nvmf nvmf/vfio-user: refactor map_admin_cmd_req() 2021-08-13 01:25:07 +00:00
rdma include: remove util.h include from queue_extras.h 2021-04-14 07:25:21 +00:00
reduce util: Add macro SPDK_SIZEOF_MEMBER to get size of a member of a struct 2021-07-15 07:16:22 +00:00
rocksdb Fix Rocksdb db_bench build's Linker issue. 2021-07-13 08:59:24 +00:00
rpc so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
scsi util: Add macro SPDK_SIZEOF_MEMBER to get size of a member of a struct 2021-07-15 07:16:22 +00:00
sock socket: Remove deprecated enable_zerocopy_send 2021-07-23 10:30:25 +00:00
thread thread: print notice on changing intr mode 2021-07-30 08:21:43 +00:00
trace trace: fix the snprintf warning issue. 2021-07-12 14:06:43 +00:00
ut_mock so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
util lib/util: optimize base64 encode and decode using ARM SVE intrinsics 2021-08-06 07:31:06 +00:00
vfio_user libvfio-user: update submodule 2021-06-22 23:42:02 +00:00
vhost spdk_top: fix vhost poller name issue 2021-08-10 08:19:33 +00:00
virtio env: only pass failing address to spdk_pci_error_handler 2021-06-15 08:34:28 +00:00
vmd so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
Makefile dma: Introduce memory domain 2021-08-20 07:26:10 +00:00