From: Pavel Begunkov <asml.silence@gmail.com>
To: netdev@vger.kernel.org
Cc: "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jonathan Corbet <corbet@lwn.net>,
Michael Chan <michael.chan@broadcom.com>,
Pavan Chebbi <pavan.chebbi@broadcom.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Stanislav Fomichev <sdf@fomichev.me>,
Pavel Begunkov <asml.silence@gmail.com>,
Jens Axboe <axboe@kernel.dk>, Simon Horman <horms@kernel.org>,
linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org,
io-uring@vger.kernel.org, dtatulea@nvidia.com
Subject: [PATCH net-next v6 7/8] io_uring/zcrx: document area chunking parameter
Date: Thu, 27 Nov 2025 20:44:20 +0000 [thread overview]
Message-ID: <a17cb10f4595458bc892015a40aa07798936841b.1764264798.git.asml.silence@gmail.com> (raw)
In-Reply-To: <cover.1764264798.git.asml.silence@gmail.com>
struct io_uring_zcrx_ifq_reg::rx_buf_len is used as a hint specifying
the kernel what buffer size it should use. Document the API and
limitations.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
Documentation/networking/iou-zcrx.rst | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/Documentation/networking/iou-zcrx.rst b/Documentation/networking/iou-zcrx.rst
index 54a72e172bdc..7f3f4b2e6cf2 100644
--- a/Documentation/networking/iou-zcrx.rst
+++ b/Documentation/networking/iou-zcrx.rst
@@ -196,6 +196,26 @@ Return buffers back to the kernel to be used again::
rqe->len = cqe->res;
IO_URING_WRITE_ONCE(*refill_ring.ktail, ++refill_ring.rq_tail);
+Area chunking
+-------------
+
+zcrx splits the memory area into fixed-length physically contiguous chunks.
+This limits the maximum buffer size returned in a single io_uring CQE. Users
+can provide a hint to the kernel to use larger chunks by setting the
+``rx_buf_len`` field of ``struct io_uring_zcrx_ifq_reg`` to the desired length
+during registration. If this field is set to zero, the kernel defaults to
+the system page size.
+
+To use larger sizes, the memory area must be backed by physically contiguous
+ranges whose sizes are multiples of ``rx_buf_len``. It also requires kernel
+and hardware support. If registration fails, users are generally expected to
+fall back to defaults by setting ``rx_buf_len`` to zero.
+
+Larger chunks don't give any additional guarantees about buffer sizes returned
+in CQEs, and they can vary depending on many factors like traffic pattern,
+hardware offload, etc. It doesn't require any application changes beyond zcrx
+registration.
+
Testing
=======
--
2.52.0
next prev parent reply other threads:[~2025-11-27 20:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 20:44 [PATCH net-next v6 0/8][pull request] Add support for providers with large rx buffer Pavel Begunkov
2025-11-27 20:44 ` [PATCH net-next v6 1/8] net: page_pool: sanitise allocation order Pavel Begunkov
2025-11-27 20:44 ` [PATCH net-next v6 2/8] net: memzero mp params when closing a queue Pavel Begunkov
2025-11-27 20:44 ` [PATCH net-next v6 3/8] net: let pp memory provider to specify rx buf len Pavel Begunkov
2025-11-27 20:44 ` [PATCH net-next v6 4/8] eth: bnxt: store rx buffer size per queue Pavel Begunkov
2025-11-27 20:44 ` [PATCH net-next v6 5/8] eth: bnxt: adjust the fill level of agg queues with larger buffers Pavel Begunkov
2025-11-27 20:44 ` [PATCH net-next v6 6/8] eth: bnxt: allow providers to set rx buf size Pavel Begunkov
2025-11-27 20:44 ` Pavel Begunkov [this message]
2025-11-27 20:44 ` [PATCH net-next v6 8/8] selftests: iou-zcrx: test large chunk sizes Pavel Begunkov
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=a17cb10f4595458bc892015a40aa07798936841b.1764264798.git.asml.silence@gmail.com \
--to=asml.silence@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=axboe@kernel.dk \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=io-uring@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
--cc=sdf@fomichev.me \
/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;
as well as URLs for NNTP newsgroup(s).