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 <tanmay.shah@amd.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
Link: https://lore.kernel.org/r/20260828145853.2843486-5-tanmay.shah@amd.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
This commit is contained in:
Tanmay Shah 2026-08-28 07:58:51 -07:00 committed by Mathieu Poirier
parent ca96ea25e5
commit 079844f735

View File

@ -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.