72eedc578d
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> |
||
---|---|---|
.. | ||
ctrlr_bdev.c | ||
ctrlr_discovery.c | ||
ctrlr.c | ||
fc_ls.c | ||
fc.c | ||
Makefile | ||
nvmf_fc.h | ||
nvmf_internal.h | ||
nvmf_rpc.c | ||
nvmf.c | ||
rdma.c | ||
spdk_nvmf.map | ||
subsystem.c | ||
tcp.c | ||
transport.c | ||
transport.h |