numam-spdk/lib/nvmf
Shuhei Matsumoto 72eedc578d nvmf/tcp: 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 both tqpair->group->group.pending_buf_queue and
the queue per state.

If the state is AWAITING_R2T_ACK, the request is queued to the
queue per state.

Dequeueing from the queue per state is done in
nvmf_tcp_req_set_state(). Hence explicit dequeuing only when the
state of the request is NEED_BUFFERING.

Most abort operation is common between two cases. We can use fallthrough
in switch-case but factor out the common operation into a helper
function nvmf_tcp_req_set_abort_status() instead because we may use
the helper function in future and using helper function is easier to
read than fallthrough.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I1695b084d5d1f2537fbdd512bc3cd136e0f6a65b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3009
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-07-14 07:54:42 +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 lib/nvmf: Add nvmf_transport_qpair_abort_request() 2020-07-14 07:54:42 +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: Abort request whose CID matches if it is pending 2020-07-14 07:54:42 +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