Commit c72a1643 authored by Alexey Marchuk's avatar Alexey Marchuk Committed by Jim Harris
Browse files

nvme/tcp: Fix check of completion number during icresp handling



The current approach checks "rc == 0". It worked before adding
polling of poll group since a single qpair should return 1
completion for its own icreq while poll group can return
several completions for all qpairs attached to this poll
group (but .e.g not for those qpair who is waiting for the
completion).

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 344bb693
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1668,7 +1668,7 @@ nvme_tcp_qpair_icreq_send(struct nvme_tcp_qpair *tqpair)
			rc = nvme_tcp_qpair_process_completions(&tqpair->qpair, 0);
		}
	} while ((tqpair->state != NVME_TCP_QPAIR_STATE_RUNNING) &&
		 (rc == 0) && (spdk_get_ticks() <= icreq_timeout_tsc));
		 (rc >= 0) && (spdk_get_ticks() <= icreq_timeout_tsc));

	if (tqpair->state != NVME_TCP_QPAIR_STATE_RUNNING) {
		SPDK_ERRLOG("Failed to construct the tqpair=%p via correct icresp\n", tqpair);