sock/posix: fix the zero copy enabling in initiator.
When zero copy is enabled in initiator, there could be the case that a socket connection does not belong to a polling group, i.e, the application does not use socket polling group. Then we should actively call _sock_check_zcopy in posix_sock_flush function when zero copy policy is enabled. Signed-off-by: Ziye Yang <ziye.yang@intel.com> Change-Id: Idceaa7557eb265daa878db40c922494c3de35ea8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5423 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
b1687cd456
commit
48b2ac7a13
@ -842,9 +842,17 @@ _sock_flush(struct spdk_sock *sock)
|
||||
}
|
||||
|
||||
static int
|
||||
posix_sock_flush(struct spdk_sock *_sock)
|
||||
posix_sock_flush(struct spdk_sock *sock)
|
||||
{
|
||||
return _sock_flush(_sock);
|
||||
#ifdef SPDK_ZEROCOPY
|
||||
struct spdk_posix_sock *psock = __posix_sock(sock);
|
||||
|
||||
if (psock->zcopy && !TAILQ_EMPTY(&sock->pending_reqs)) {
|
||||
_sock_check_zcopy(sock);
|
||||
}
|
||||
#endif
|
||||
|
||||
return _sock_flush(sock);
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
|
Loading…
Reference in New Issue
Block a user