Re: [PATCH net] virtio-net: reject small vring sizes

From: Michael S. Tsirkin
Date: Sun Apr 23 2023 - 07:09:26 EST


On Sun, Apr 23, 2023 at 08:01:35AM +0000, Alvaro Karsz wrote:
> We could add a new virtio_config_ops: peek_vqs.
> We can call it during virtnet_validate, and then fixup the features in case of small vrings.
>
> If peek_vqs is not implemented by the transport, we can just fail probe later in case of small vrings.
>

Nope, we can't. Driver is not supposed to discover vqs before
FEATURES_OK, the vq size might depend on features.