Re: [PATCH] io_uring/zcrx: requeue multishot receives stopped by a local resource

From: Pavel Begunkov

Date: Sun Sep 27 2026 - 15:03:46 EST


On 9/23/26 10:20, Junyuan Feng wrote:
A multishot RECV_ZC can go idle with unread TCP data when a receiver-local
resource runs out. An empty copy-fallback niov freelist returns -ENOMEM;
a full CQ returns -ENOSPC. After partial progress the stop reason is
lost: io_zcrx_copy_chunk() and io_zcrx_recv_skb() report the copied
bytes, and tcp_read_sock() drops an error from a later call once earlier
data was consumed. The edge-triggered request is then not requeued, so
it cannot consume the remaining data until another socket event arrives.

Record in io_zcrx_recv_skb() when a walk stops before consuming the
length it was offered, and requeue if the pass still returned data. The
failed chunk is first on the next pass. The resource is usually still
exhausted by then, so that pass fails at once and ends the request with
an error CQE, which the application must handle by re-arming. The
request does not spin, and the stall becomes a visible error. Keep the
existing skb limit and SOCK_DONE handling.

Looks good

Reviewed-by: Pavel Begunkov <asml.silence@xxxxxxxxx>

--
Pavel Begunkov