Re: [virtio-comment] [PATCH] virtio-vsock: add max payload size config field

From
Cornelia Huck <>
Date
2022-04-06T08:59:59+00:00
ID
Thread
Re: [virtio-comment] [PATCH] virtio-vsock: add max payload size config field
On Mon, Apr 04 2022, Laura Loghin <> wrote:

> Added a new field to the vsock device config space that
> is limiting the size of the packet payload. This way
> the driver is not allowed to allocate huge buffers, and
> potentially fill up the entire memory.
> Also defined a new feature bit for this, VIRTIO_VSOCK_F_SIZE_MAX,
> in order to keep backwards compatibility.
>
> Signed-off-by: Laura Loghin <>
> ---
>  virtio-vsock.tex | 34 ++++++++++++++++++++++++++++++++++
>  1 file changed, 34 insertions(+)

(...)

> +\devicenormative{\subsubsection}{Device configuration layout}{Device Types / Socket Device / Device configuration layout}
> +
> +The device MUST set \field{data_max_size} to between 0 and 65536 inclusive, if
> +it offers VIRTIO_VSOCK_F_SIZE_MAX.
> +
> +The device MUST NOT modify \field{data_max_size} once it has been set.

I'm not sure this is the best way to frame this. Maybe

"The device MUST NOT change the value exposed through
\field{data_max_size}."

?