numam-spdk/include
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
..
linux vhost: update virtion_config.h and virtio_ring.h 2019-12-20 10:04:27 +00:00
spdk nvme/pcie: defer bad vtophys to completion context 2021-08-20 07:27:09 +00:00
spdk_internal lib/event: remove get/enable/disable turbo API from governor 2021-07-19 08:05:19 +00:00
Makefile build: Copy headers to build/include on build 2020-06-15 15:27:16 +00:00