Re: [PATCH v6 4/5] docs: rpmsg: add virtio config space details
Mathieu Poirier <[email protected]>
| Newsgroups | org.kernel.vger.linux-doc,org.kernel.vger.linux-kernel,org.kernel.vger.linux-remoteproc |
|---|---|
| Message-ID | <aoxyU4r9bH54zODJ@p14s> |
On Thu, Aug 13, 2026 at 09:42:37PM -0700, Tanmay Shah wrote: > 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 <[email protected]> > --- > > 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 "... or differnt RX and TX queue sizes)... > +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 >