Thread (3 messages) 3 messages, 3 authors, 14d ago

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

flat view

From: Pavel Begunkov <asml.silence@gmail.com>
Date: 2026-09-27 19:03:38
Also in: io-uring, lkml, stable

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@gmail.com>

-- 
Pavel Begunkov
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help