nvmf/tcp: make request state values explicit

It makes it easier to read the logs, as the state values are printed as
integers.

Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I70a9e8860401c18e9305a5fc5771df0bc564d337
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10800
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Konrad Sztyber 2021-12-14 08:59:47 +01:00 committed by Tomasz Zawadzki
parent b542979620
commit 43f23e3d15

View File

@ -66,46 +66,46 @@ enum spdk_nvmf_tcp_req_state {
TCP_REQUEST_STATE_FREE = 0,
/* Initial state when request first received */
TCP_REQUEST_STATE_NEW,
TCP_REQUEST_STATE_NEW = 1,
/* The request is queued until a data buffer is available. */
TCP_REQUEST_STATE_NEED_BUFFER,
TCP_REQUEST_STATE_NEED_BUFFER = 2,
/* The request is waiting for zcopy_start to finish */
TCP_REQUEST_STATE_AWAITING_ZCOPY_START,
TCP_REQUEST_STATE_AWAITING_ZCOPY_START = 3,
/* The request has received a zero-copy buffer */
TCP_REQUEST_STATE_ZCOPY_START_COMPLETED,
TCP_REQUEST_STATE_ZCOPY_START_COMPLETED = 4,
/* The request is currently transferring data from the host to the controller. */
TCP_REQUEST_STATE_TRANSFERRING_HOST_TO_CONTROLLER,
TCP_REQUEST_STATE_TRANSFERRING_HOST_TO_CONTROLLER = 5,
/* The request is waiting for the R2T send acknowledgement. */
TCP_REQUEST_STATE_AWAITING_R2T_ACK,
TCP_REQUEST_STATE_AWAITING_R2T_ACK = 6,
/* The request is ready to execute at the block device */
TCP_REQUEST_STATE_READY_TO_EXECUTE,
TCP_REQUEST_STATE_READY_TO_EXECUTE = 7,
/* The request is currently executing at the block device */
TCP_REQUEST_STATE_EXECUTING,
TCP_REQUEST_STATE_EXECUTING = 8,
/* The request is waiting for zcopy buffers to be commited */
TCP_REQUEST_STATE_AWAITING_ZCOPY_COMMIT,
TCP_REQUEST_STATE_AWAITING_ZCOPY_COMMIT = 9,
/* The request finished executing at the block device */
TCP_REQUEST_STATE_EXECUTED,
TCP_REQUEST_STATE_EXECUTED = 10,
/* The request is ready to send a completion */
TCP_REQUEST_STATE_READY_TO_COMPLETE,
TCP_REQUEST_STATE_READY_TO_COMPLETE = 11,
/* The request is currently transferring final pdus from the controller to the host. */
TCP_REQUEST_STATE_TRANSFERRING_CONTROLLER_TO_HOST,
TCP_REQUEST_STATE_TRANSFERRING_CONTROLLER_TO_HOST = 12,
/* The request is waiting for zcopy buffers to be released (without committing) */
TCP_REQUEST_STATE_AWAITING_ZCOPY_RELEASE,
TCP_REQUEST_STATE_AWAITING_ZCOPY_RELEASE = 13,
/* The request completed and can be marked free. */
TCP_REQUEST_STATE_COMPLETED,
TCP_REQUEST_STATE_COMPLETED = 14,
/* Terminator */
TCP_REQUEST_NUM_STATES,