Linux Documentation
 help / color / mirror / Atom feed
From: Tanmay Shah <tanmay.shah@amd.com>
To: <andersson@kernel.org>, <mathieu.poirier@linaro.org>,
	<corbet@lwn.net>, <skhan@linuxfoundation.org>
Cc: <linux-remoteproc@vger.kernel.org>, <linux-doc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, Tanmay Shah <tanmay.shah@amd.com>
Subject: [PATCH v5 4/5] docs: rpmsg: add virtio config space details
Date: Fri, 10 Jul 2026 12:28:30 -0700	[thread overview]
Message-ID: <20260710192831.3440427-5-tanmay.shah@amd.com> (raw)
In-Reply-To: <20260710192831.3440427-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>
---
Changes in v5:
  - fix documentation of buffer alignment

 Documentation/staging/rpmsg.rst | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Documentation/staging/rpmsg.rst b/Documentation/staging/rpmsg.rst
index 42bac1149d9d..abf9d20fafcf 100644
--- a/Documentation/staging/rpmsg.rst
+++ b/Documentation/staging/rpmsg.rst
@@ -300,3 +300,23 @@ 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). It also provides alignment field to align single
+buffer which will help decide start address of the next buffer. The total
+buffer space will be divided between total aligned buffers of tx and rx.
+However, the MTU size of a single buffer is not equal to the aligned buffer
+size. The MTU size of a single buffer and aligned buffer size can be different.
+
+If the feature is not negotiated, the default 512-byte buffers are used for
+both directions.
-- 
2.34.1


  parent reply	other threads:[~2026-07-10 19:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-10 19:28 [PATCH v5 0/5] Enhance RPMsg buffer management Tanmay Shah
2026-07-10 19:28 ` [PATCH v5 1/5] rpmsg: virtio_rpmsg_bus: rename rbufs and sbufs Tanmay Shah
2026-07-10 19:28 ` [PATCH v5 2/5] rpmsg: virtio_rpmsg_bus: allow different size of tx and rx bufs Tanmay Shah
2026-07-10 19:28 ` [PATCH v5 3/5] rpmsg: virtio_rpmsg_bus: get buffer size from config space Tanmay Shah
2026-07-10 19:28 ` Tanmay Shah [this message]
2026-07-10 19:28 ` [PATCH v5 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=20260710192831.3440427-5-tanmay.shah@amd.com \
    --to=tanmay.shah@amd.com \
    --cc=andersson@kernel.org \
    --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