Commit 42b47742 authored by Ben Walker's avatar Ben Walker Committed by Tomasz Zawadzki
Browse files

nvme/tcp: Only flush socket if not part of poll group



If the qpair is part of a poll group, the socket will get
flushed as part of polling that group already. We only need
to explicitly flush to handle the case where the qpair is
not in a poll group.

Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Change-Id: Ib2a510b6d26d1622950437d81e0a40f6b15d6b54
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7049


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
parent 6b86039f
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1661,10 +1661,12 @@ nvme_tcp_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_c
	uint32_t reaped;
	int rc;

	if (qpair->poll_group == NULL) {
		rc = spdk_sock_flush(tqpair->sock);
		if (rc < 0) {
			return rc;
		}
	}

	if (max_completions == 0) {
		max_completions = tqpair->num_entries;