Revert "sock/posix: fix the socket pipe_has_data or socket_has_data."

This reverts commit 2cd948c4a6.
This commit caused drop in performance tests.
More info in issue https://github.com/spdk/spdk/issues/2158

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Id5d353535323c79e773e33377af388dae47238cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9510
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Maciej Wawryk 2021-09-15 09:02:24 +02:00 committed by Tomasz Zawadzki
parent 1fbeeb23b3
commit e588603d3e

View File

@ -883,7 +883,10 @@ posix_sock_read(struct spdk_posix_sock *sock)
#endif
sock->pipe_has_data = true;
sock->socket_has_data = false;
if (bytes_recvd < bytes_avail) {
/* We drained the kernel socket entirely. */
sock->socket_has_data = false;
}
return bytes_recvd;
}
@ -1376,7 +1379,6 @@ posix_sock_group_impl_poll(struct spdk_sock_group_impl *_group, int max_events,
if (!psock->socket_has_data && !psock->pipe_has_data) {
TAILQ_INSERT_TAIL(&group->socks_with_data, psock, link);
}
psock->socket_has_data = true;
}