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: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ib2a510b6d26d1622950437d81e0a40f6b15d6b54
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7049
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
This commit is contained in:
Ben Walker 2021-03-24 13:17:24 -07:00 committed by Tomasz Zawadzki
parent 6b86039fd9
commit 42b47742de

View File

@ -1661,9 +1661,11 @@ nvme_tcp_qpair_process_completions(struct spdk_nvme_qpair *qpair, uint32_t max_c
uint32_t reaped;
int rc;
rc = spdk_sock_flush(tqpair->sock);
if (rc < 0) {
return rc;
if (qpair->poll_group == NULL) {
rc = spdk_sock_flush(tqpair->sock);
if (rc < 0) {
return rc;
}
}
if (max_completions == 0) {