Commit 03233d3d authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

sock/uring: Remove incorrect check against recv_pipe during reap



If a socket has no recv_pipe it should still be reported as pending
recv.

Change-Id: Idada57e17c033b8e237ddac91bc3663708ae5343
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18102


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 6ab04a00
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -1216,15 +1216,13 @@ sock_uring_group_reap(struct spdk_uring_sock_group_impl *group, int max, int max
			break;
		}

		if (spdk_unlikely(sock->base.cb_fn == NULL) ||
		    (sock->recv_pipe == NULL || spdk_pipe_reader_bytes_available(sock->recv_pipe) == 0)) {
		/* If the socket's cb_fn is NULL, do not add it to socks array */
		if (spdk_unlikely(sock->base.cb_fn == NULL)) {
			assert(sock->pending_recv == true);
			sock->pending_recv = false;
			TAILQ_REMOVE(&group->pending_recv, sock, link);
			if (spdk_unlikely(sock->base.cb_fn == NULL)) {
				/* If the socket's cb_fn is NULL, do not add it to socks array */
			continue;
		}
		}

		socks[count++] = &sock->base;
	}