From: Pavel Begunkov <asml.silence@gmail.com>
To: "Clément Léger" <cleger@meta.com>,
io-uring@vger.kernel.org, "Jens Axboe" <axboe@kernel.dk>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, netdev@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Vishwanath Seshagiri <vishs@fb.com>
Subject: Re: [PATCH 2/5] io_uring/zcrx: notify user on frag copy fallback
Date: Tue, 12 May 2026 12:02:46 +0100 [thread overview]
Message-ID: <539e235a-2027-4bda-ae26-00200c53cbaa@gmail.com> (raw)
In-Reply-To: <20260422112522.3316660-3-cleger@meta.com>
On 4/22/26 12:25, Clément Léger wrote:
> Add a ZCRX_NOTIF_COPY notification type to signal userspace when a
> received fragment could not be delivered using zero-copy and was
> instead copied into a buffer.
>
> Signed-off-by: Clément Léger <cleger@meta.com>
> ---
> include/uapi/linux/io_uring/zcrx.h | 1 +
> io_uring/zcrx.c | 7 ++++++-
> io_uring/zcrx.h | 3 ++-
> 3 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/include/uapi/linux/io_uring/zcrx.h b/include/uapi/linux/io_uring/zcrx.h
> index b8596d7d47b6..e0c0079626c8 100644
> --- a/include/uapi/linux/io_uring/zcrx.h
> +++ b/include/uapi/linux/io_uring/zcrx.h
> @@ -70,6 +70,7 @@ enum zcrx_features {
>
> enum zcrx_notification_type {
> ZCRX_NOTIF_NO_BUFFERS = 1 << 0,
> + ZCRX_NOTIF_COPY = 1 << 1
> };
>
> struct zcrx_notification_desc {
> diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
> index 35ca28cb6583..732e585aa13a 100644
> --- a/io_uring/zcrx.c
> +++ b/io_uring/zcrx.c
> @@ -1510,8 +1510,13 @@ static int io_zcrx_copy_frag(struct io_kiocb *req, struct io_zcrx_ifq *ifq,
> const skb_frag_t *frag, int off, int len)
> {
> struct page *page = skb_frag_page(frag);
> + int ret;
> +
> + ret = io_zcrx_copy_chunk(req, ifq, page, off + skb_frag_off(frag), len);
> + if (ret > 0)
> + zcrx_send_notif(ifq, ZCRX_NOTIF_COPY);
We also copy the linear part if present, depends on the semantics
would make sense adding it there as well.
Pavel Begunkov
prev parent reply other threads:[~2026-05-12 11:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260422112522.3316660-1-cleger@meta.com>
[not found] ` <20260422112522.3316660-2-cleger@meta.com>
2026-05-12 10:59 ` [PATCH 1/5] io_uring/zcrx: notify user when out of buffers Pavel Begunkov
[not found] ` <20260422112522.3316660-3-cleger@meta.com>
2026-05-12 11:02 ` Pavel Begunkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=539e235a-2027-4bda-ae26-00200c53cbaa@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=cleger@meta.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=io-uring@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=skhan@linuxfoundation.org \
--cc=vishs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox