From: Tanmay Shah <tanmay.shah@amd.com>
To: <andersson@kernel.org>, <mathieu.poirier@linaro.org>,
<corbet@lwn.net>, <skhan@linuxfoundation.org>,
<arnaud.pouliquen@foss.st.com>
Cc: <linux-remoteproc@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Tanmay Shah <tanmay.shah@amd.com>
Subject: [PATCH v4 4/5] docs: rpmsg: add virtio config space details
Date: Mon, 15 Jun 2026 13:20:06 -0700 [thread overview]
Message-ID: <20260615202007.3484668-5-tanmay.shah@amd.com> (raw)
In-Reply-To: <20260615202007.3484668-1-tanmay.shah@amd.com>
The virtio config space can provide single rpmsg buffer size in each
direction. Document details of the configurable buffer size via virtio
config space.
Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
---
Documentation/staging/rpmsg.rst | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/Documentation/staging/rpmsg.rst b/Documentation/staging/rpmsg.rst
index 42bac1149d9d..c06602e169a9 100644
--- a/Documentation/staging/rpmsg.rst
+++ b/Documentation/staging/rpmsg.rst
@@ -300,3 +300,22 @@ by the bus, and can then start sending messages to the remote service.
The plan is also to add static creation of rpmsg channels via the virtio
config space, but it's not implemented yet.
+
+Configurable buffer sizes
+=========================
+
+By default each rpmsg buffer is 512 bytes, and the same size is used for both
+the receive and transmit directions. Remote processors that need a different
+size (for example a larger MTU, or different RX and TX sizes) can advertise it
+through the virtio device config space by setting the VIRTIO_RPMSG_F_BUFSZ
+feature bit.
+
+When this feature is negotiated, the driver reads struct virtio_rpmsg_config
+from the config space. This structure provides the size of a single buffer for
+each direction (TX and RX), and the driver splits the total buffer space into
+TX and RX buffers accordingly. Both buffer sizes must be aligned to the
+rpmsg_buf_align field provided in the config space; a value of 0 means the
+sizes are assumed to be already aligned.
+
+If the feature is not negotiated, the default 512-byte buffers are used for
+both directions.
--
2.34.1
next prev parent reply other threads:[~2026-06-15 20:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 20:20 [PATCH v4 0/5] Enhance RPMsg buffer management Tanmay Shah
2026-06-15 20:20 ` [PATCH v4 1/5] rpmsg: virtio_rpmsg_bus: rename rbufs and sbufs Tanmay Shah
2026-06-15 20:20 ` [PATCH v4 2/5] rpmsg: virtio_rpmsg_bus: allow different size of tx and rx bufs Tanmay Shah
2026-06-15 20:20 ` [PATCH v4 3/5] rpmsg: virtio_rpmsg_bus: get buffer size from config space Tanmay Shah
2026-06-17 9:15 ` Arnaud POULIQUEN
2026-06-17 17:41 ` Shah, Tanmay
2026-06-15 20:20 ` Tanmay Shah [this message]
2026-06-15 20:20 ` [PATCH v4 5/5] samples: rpmsg: add MTU size info Tanmay Shah
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=20260615202007.3484668-5-tanmay.shah@amd.com \
--to=tanmay.shah@amd.com \
--cc=andersson@kernel.org \
--cc=arnaud.pouliquen@foss.st.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=skhan@linuxfoundation.org \
/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