From 7db282dc266e2fb5536314a4a729264840b6048b Mon Sep 17 00:00:00 2001 From: Konrad Sztyber Date: Mon, 6 Feb 2023 16:44:24 +0100 Subject: [PATCH] tcp: add note about default case in qpair_abort_request() Signed-off-by: Konrad Sztyber Change-Id: I2f3741596be2f06b36894306203214a4ef096d1a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16694 Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Tested-by: SPDK CI Jenkins --- lib/nvmf/tcp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/nvmf/tcp.c b/lib/nvmf/tcp.c index c9744942a..b78f79c50 100644 --- a/lib/nvmf/tcp.c +++ b/lib/nvmf/tcp.c @@ -3323,6 +3323,12 @@ _nvmf_tcp_qpair_abort_request(void *ctx) break; default: + /* Requests in other states are either un-abortable (e.g. + * TRANSFERRING_CONTROLLER_TO_HOST) or should never end up here, as they're + * immediately transitioned to other states in nvmf_tcp_req_process() (e.g. + * READY_TO_EXECUTE). But it is fine to end up here, as we'll simply complete the + * abort request with the bit0 of dword0 set (command not aborted). + */ break; }