On Mon, Apr 27, 2009 at 06:59:52PM +0200, Christian Borntraeger wrote:
> Am Monday 27 April 2009 17:39:36 schrieb Michael S. Tsirkin:
> > So we'll probably need to rename request_vqs to request_vectors,
> > but we probably still need the driver to pass the number of
> > vectors it wants to the transport. Right?
>
> This might be a stupid idea, but would something like the following
> be sufficient for you?
Yes.
> Index: linux-2.6/drivers/net/virtio_net.c
> ===================================================================
> --- linux-2.6.orig/drivers/net/virtio_net.c
> +++ linux-2.6/drivers/net/virtio_net.c
> @@ -1021,6 +1021,7 @@ static unsigned int features[] = {
> static struct virtio_driver virtio_net = {
> .feature_table = features,
> .feature_table_size = ARRAY_SIZE(features),
> + .num_vq_max = 3,
> .driver.name = KBUILD_MODNAME,
> .driver.owner = THIS_MODULE,
> .id_table = id_table,
> Index: linux-2.6/include/linux/virtio.h
> ===================================================================
> --- linux-2.6.orig/include/linux/virtio.h
> +++ linux-2.6/include/linux/virtio.h
> @@ -110,6 +110,7 @@ struct virtio_driver {
> const struct virtio_device_id *id_table;
> const unsigned int *feature_table;
> unsigned int feature_table_size;
> + unsigned int num_vq_max;
> int (*probe)(struct virtio_device *dev);
> void (*remove)(struct virtio_device *dev);
> void (*config_changed)(struct virtio_device *dev);
Good idea.
--
MST
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/virtualization