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 v6 4/5] docs: rpmsg: add virtio config space details
Date: Thu, 13 Aug 2026 21:42:37 -0700	[thread overview]
Message-ID: <20260814044238.518296-5-tanmay.shah@amd.com> (raw)
In-Reply-To: <20260814044238.518296-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 v6:
  - rpmsg.rst: modify alignment related documentation

Changes in v5:
  - fix documentation of buffer alignment

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

diff --git a/Documentation/staging/rpmsg.rst b/Documentation/staging/rpmsg.rst
index 63612b7ee120..cabaf3d11ae7 100644
--- a/Documentation/staging/rpmsg.rst
+++ b/Documentation/staging/rpmsg.rst
@@ -299,3 +299,20 @@ 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). The device should advertise TX/RX buffer sizes
+that already satisfy its own alignment constraints.
+
+If the feature is not negotiated, the default 512-byte buffers are used for
+both directions.
-- 
2.43.0


  parent reply	other threads:[~2026-08-14  4:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14  4:42 [PATCH v6 0/5] Enhance RPMsg buffer management Tanmay Shah
2026-08-14  4:42 ` [PATCH v6 1/5] rpmsg: virtio_rpmsg_bus: rename rbufs and sbufs Tanmay Shah
2026-08-14  4:42 ` [PATCH v6 2/5] rpmsg: virtio_rpmsg_bus: allow different size of tx and rx bufs Tanmay Shah
2026-08-14  4:42 ` [PATCH v6 3/5] rpmsg: virtio_rpmsg_bus: get buffer size from config space Tanmay Shah
2026-08-14  4:42 ` Tanmay Shah [this message]
2026-08-14  4:42 ` [PATCH v6 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=20260814044238.518296-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