From 4c9aad0299767cc13e6f2ee4904a45aaf43d3393 Mon Sep 17 00:00:00 2001 From: Ziye Yang Date: Wed, 8 Jul 2020 19:38:58 +0800 Subject: [PATCH] nvme/tcp: Report the free entries if sending_ack is set Previous we fix the same issue in this commit: cb98b2ab3e73664d205dd809efe2dca82a1b8128 But we forget to fix it here. And we also need to update here, otherwise we will still face the same issue described in commit: cb98b2ab3e73664d205dd809efe2dca82a1b8128 Signed-off-by: Ziye Yang Change-Id: I3660dbb6e97c92ea4cb347cfce4bf23c6dfe97ab Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3242 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Shuhei Matsumoto --- lib/nvme/nvme_tcp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/nvme/nvme_tcp.c b/lib/nvme/nvme_tcp.c index c689ebe821..34395ca3a2 100644 --- a/lib/nvme/nvme_tcp.c +++ b/lib/nvme/nvme_tcp.c @@ -846,7 +846,9 @@ nvme_tcp_c2h_data_payload_handle(struct nvme_tcp_qpair *tqpair, cpl.cid = tcp_req->cid; cpl.sqid = tqpair->qpair.id; nvme_tcp_req_complete(tcp_req, &cpl); - (*reaped)++; + if (tcp_req->ordering.send_ack) { + (*reaped)++; + } tcp_req->ordering.data_recv = 1; nvme_tcp_req_put_safe(tcp_req);