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.