Commit e385cafa authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Tomasz Zawadzki
Browse files

nvme: Don't log an error when we can't resubmit all requests



In TCP NVME initiator with zero copy enabled requests might be
completed asynchronously - out of qpair_process_completions
context. At the same time we calculate requests completed
asynchronously so that generic NVME layer can resubmit
queued requests after calling qpair_process_requests (or
poll_group_process_requests).
But there is a time gap between async request complete and
qpair_process_completions and the user can submit new IO
thereby decrease the number of free TCP requests. That means
that there might be less free requests than we excpected when
we try to resubmit queued requests.
The solution is change ERRLOG to DEBUG log since it is not a
fatal case.

Change-Id: If045ecd331cc6693e8ef450d8e15432dfa5d8812
Signed-off-by: default avatarAlexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4859


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
parent 214b9847
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -667,7 +667,7 @@ nvme_qpair_resubmit_requests(struct spdk_nvme_qpair *qpair, uint32_t num_request
		STAILQ_REMOVE_HEAD(&qpair->queued_req, stailq);
		resubmit_rc = nvme_qpair_resubmit_request(qpair, req);
		if (spdk_unlikely(resubmit_rc != 0)) {
			SPDK_ERRLOG("Unable to resubmit as many requests as we completed.\n");
			SPDK_DEBUGLOG(nvme, "Unable to resubmit as many requests as we completed.\n");
			break;
		}
	}
+2 −0
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@ bool trace_flag = false;

#include "nvme/nvme_qpair.c"

SPDK_LOG_REGISTER_COMPONENT(nvme)

struct nvme_driver _g_nvme_driver = {
	.lock = PTHREAD_MUTEX_INITIALIZER,
};