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: Ziye Yang <ziye.yang@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5442 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
5e65adcc7d
commit
27c2daff1d
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user