15b7d3bacc
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> |
||
---|---|---|
.. | ||
accel | ||
bdev | ||
blob | ||
blobfs | ||
conf | ||
dma | ||
env_dpdk | ||
env_ocf | ||
event | ||
ftl | ||
idxd | ||
init | ||
ioat | ||
iscsi | ||
json | ||
jsonrpc | ||
log | ||
lvol | ||
nbd | ||
notify | ||
nvme | ||
nvmf | ||
rdma | ||
reduce | ||
rocksdb | ||
rpc | ||
scsi | ||
sock | ||
thread | ||
trace | ||
ut_mock | ||
util | ||
vfio_user | ||
vhost | ||
virtio | ||
vmd | ||
Makefile |