71da42e953
A new API spdk_nvme_ctrlr_cmd_abort_ext() gets cmd_cb_arg as a parameter, and use it to abort requests whose cb_arg matches cmd_cb_arg. The caller can set the parameter qpair to NULL if it wants to abort requests on admin qpair. Hold ctrlr->ctrlr_lock throughout because abort request is submitted to admin qpair. The API is not critical for performance, and so initialize parent data first. The API is for a specific qpair, and so hold SQID in the parent, and it is copied to the children. On the other hand, CID is set to child when request to abort is found. Use an new helper function nvme_transport_qpair_iterate_requests() to add abort request for each outstanding request which has cmd_cb_arg as its callback context. The case is possible such that the request to abort is not outstanding yet but queued. Hence abort queued requests which has cmd_cb_arg as its callback context too, but it is done only if there is no error so far. If only queued requests are aborted and there is no outstanding request to abort, complete with success synchronously. If there is no outstanding or queued request to abort, return -ENOENT. When any abort request is submitted, the difference between success and failure is only bit 0 of CDW0 according to the NVMe specification. We cannot the existing helper functions nvme_request_add_child() and nvme_cb_complete_child() but can use nvme_request_remove_child(). nvme_qpair_submit_request() may use only nvme_request_remove_child() from these three helper functions. Hence we use req->parent as other types of request do. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I3a271c6542f8e2e6b425b3bf6151f41e924bc200 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2039 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> |
||
---|---|---|
.. | ||
accel | ||
bdev | ||
blob | ||
blobfs | ||
conf | ||
env_dpdk | ||
env_ocf | ||
event | ||
ftl | ||
idxd | ||
ioat | ||
iscsi | ||
json | ||
jsonrpc | ||
log | ||
log_rpc | ||
lvol | ||
nbd | ||
net | ||
notify | ||
nvme | ||
nvmf | ||
rdma | ||
reduce | ||
rocksdb | ||
rpc | ||
rte_vhost | ||
scsi | ||
sock | ||
thread | ||
trace | ||
ut_mock | ||
util | ||
vhost | ||
virtio | ||
vmd | ||
Makefile |