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

From: Alvaro Karsz
Date: Sun Apr 23 2023 - 02:52:04 EST


> Yes that makes sense, it's architetural. We can disable ctrl vq though.

The problem here is that we know the vring size after calling virtnet_find_vqs, so the number of VQs already includes the control VQ.

Actually, many variables/settings that are initialized before we call virtnet_find_vqs may need modifications if we use small vrings.
For example has_rss_hash_report, has_rss, hdr_len etc..

We could have a fixup function to fix everything after we discover that we are using small vrings, but, honestly, I think that this will be hard to maintain in the future, and I don't like this approach much.

The ideal thing will be to discover if we use small vrings in probe's beginning.

I'm looking for a way at the moment.