nvme/tcp: Report that we have free entries if send_ack is set.

Without this patch, we will face the following warning code
when compiled with (--with-uring --enable-debug) while testing
big I/O size: 256KB, e.g.,

"nvme_qpair.c: 474:nvme_qpair_resubmit_requests: *ERROR*:
Unable to resubmit as many requests as we completed"

The reason is because the nvme_tcp_request structure is not freed yet
if send_ack is not set, so there will be no entries when there
are other requests submit again.

And this patch can mitigate such issue.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I4c7616fbd3c82a883b4e9facd257a1a4f66e876d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3123
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Ziye Yang 2020-07-01 00:39:13 +08:00 committed by Tomasz Zawadzki
parent a213592c89
commit cb98b2ab3e

View File

@ -1017,7 +1017,9 @@ nvme_tcp_capsule_resp_hdr_handle(struct nvme_tcp_qpair *tqpair, struct nvme_tcp_
assert(tcp_req->req != NULL);
nvme_tcp_req_complete(tcp_req->req, &cpl);
(*reaped)++;
if (tcp_req->ordering.send_ack) {
(*reaped)++;
}
tcp_req->ordering.data_recv = 1;
nvme_tcp_req_put_safe(tcp_req);