From 079844f735f7a3917bc05a78ce33e1ab3901e8d2 Mon Sep 17 00:00:00 2001 From: Tanmay Shah Date: Fri, 28 Aug 2026 07:58:51 -0700 Subject: [PATCH] docs: rpmsg: Add virtio config space details 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 Acked-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20260828145853.2843486-5-tanmay.shah@amd.com Signed-off-by: Mathieu Poirier --- Documentation/staging/rpmsg.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/staging/rpmsg.rst b/Documentation/staging/rpmsg.rst index 63612b7ee120..017867383fd9 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 queue 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 the alignment constraints of its buffers. + +If the feature is not negotiated, the default 512-byte buffers are used for +both directions.