Spdk/lib/nvmf
Shuhei Matsumoto c1305e71b6 nvmf/rdma: Abort request whose CID matches if it is pending
If the request is queued and is not in completing, we can abort
it safely.

If the state of the request is NEED_BUFFERING, the request is
queued to tqpair->group->group.pending_buf_queue.

If the state of the request is DATA_TRANSFER_TO_CONTROLLER_PENDING,
the request is queued to rqpair->pending_rdma_read_queue.

If the state of the request is DATA_TRANSFER_TO_HOST_PENDING,
the request is queued to rqpair->pending_rdma_write_queue.

According to the current state, dequeue from the corresponding
queue, and then call an new helper function
nvmf_rdma_request_set_abort_status().

Using helper function will be easier to read.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id0327f4d2c4728a11b3b6bbc7c2252f0b35263cf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3012
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-07-16 07:29:46 +00:00
..
ctrlr_bdev.c lib/nvmf: Add nvmf_bdev_ctrlr_abort_cmd() to call spdk_bdev_abort() 2020-07-14 07:54:42 +00:00
ctrlr_discovery.c lib/nvmf: remove spdk_ and _spdk prefix from functions. 2020-06-01 09:21:14 +00:00
ctrlr.c lib/nvmf: Add nvmf_transport_qpair_abort_request() 2020-07-14 07:54:42 +00:00
fc_ls.c nvmf: Remove new_qpair callback from transport accept function pointer 2020-06-18 07:29:41 +00:00
fc.c lib/nvmf: Add nvmf_transport_qpair_abort_request() 2020-07-14 07:54:42 +00:00
Makefile mk/nvme/nvmf: Add deps for RDMA libs 2020-06-18 07:28:04 +00:00
nvmf_fc.h nvmf: Remove new_qpair callback from transport accept function pointer 2020-06-18 07:29:41 +00:00
nvmf_internal.h lib/nvmf: Add nvmf_ctrlr_abort_request() to call nvmf_bdev_ctrlr_abort_cmd() from transport 2020-07-14 07:54:42 +00:00
nvmf_rpc.c lib/nvmf: add an acceptor_backlog transport opt. 2020-07-08 07:57:04 +00:00
nvmf.c pollers: Fix pollers to return correct busy status 2020-07-07 07:29:31 +00:00
rdma.c nvmf/rdma: Abort request whose CID matches if it is pending 2020-07-16 07:29:46 +00:00
spdk_nvmf.map nvmf: add util to get id from ctrlr 2020-07-08 07:55:03 +00:00
subsystem.c lib/nvmf: remove spdk_ and _spdk prefix from functions. 2020-06-01 09:21:14 +00:00
tcp.c nvmf/tcp: Wait until request is abortable if it is transferring 2020-07-16 07:29:46 +00:00
transport.c lib/nvmf: Add nvmf_transport_qpair_abort_request() 2020-07-14 07:54:42 +00:00
transport.h lib/nvmf: Add nvmf_transport_qpair_abort_request() 2020-07-14 07:54:42 +00:00