Commit 27c2daff authored by Ziye Yang's avatar Ziye Yang Committed by Tomasz Zawadzki
Browse files

lib/sock: Make spdk_sock_flush do real work if sock does not belong to a group.



If the sock belongs to a polling group, we already have the mechanism
to do the write/flush work.

Change-Id: Ic15660717f4e83d873ec9f642ababd7fd9cda5eb
Signed-off-by: default avatarZiye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5442


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 5e65adcc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -451,6 +451,11 @@ spdk_sock_flush(struct spdk_sock *sock)
		return -EBADF;
	}

	/* Sock is in a polling group, so group polling mechanism will work */
	if (sock->group_impl != NULL) {
		return 0;
	}

	return sock->net_impl->flush(sock);
}