Commit 98aa25f6 authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Tomasz Zawadzki
Browse files

nvme/tcp: force qpair poll only when there are queued reqs



Completing an accel crc32 data digest calculation might cause a request
to be completed outside of the context of process_completions().  In
this case, a qpair needs to be put on the needs_poll list to make sure
that any queued requests are resubmitted.  There's no point in doing so
if there are no queued requests, so the condition was changed to reflect
that.

Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I0000fe509fe62179180f6b0b4e56ae78e2214c05
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/19265


Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benwalker@nvidia.com>
parent d662413e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1287,7 +1287,9 @@ nvme_tcp_accel_recv_compute_crc32_done(void *cb_arg, int status)
	tqpair = tcp_req->tqpair;
	assert(tqpair != NULL);

	if (tqpair->qpair.poll_group && !tqpair->needs_poll) {
	/* We need to force poll the qpair to make sure any queued requests will be resubmitted, see
	 * comment in pdu_write_done(). */
	if (tqpair->qpair.poll_group && !tqpair->needs_poll && !STAILQ_EMPTY(&tqpair->qpair.queued_req)) {
		pgroup = nvme_tcp_poll_group(tqpair->qpair.poll_group);
		TAILQ_INSERT_TAIL(&pgroup->needs_poll, tqpair, link);
		tqpair->needs_poll = true;