qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCHv2] virtio-net: remove mq feature flag


From: Michael Tokarev
Subject: Re: [Qemu-devel] [PATCHv2] virtio-net: remove mq feature flag
Date: Mon, 04 Feb 2013 12:26:47 +0400
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/17.0 Icedove/17.0

04.02.2013 11:41, Michael S. Tsirkin wrote:
mq flag is not needed: we can look at the number of queues and set
the flag accordingly.
Removing this feature removes ambiguity (what does it mean to have
queues=2 with mq=off?), and simplifies compatibility hacks.
work-around for buggy windows
guests.

Signed-off-by: Michael S. Tsirkin <address@hidden>

Nice fix.  I tested it with a few non-mq guests (winXP and win7
with slightly older drivers and with current (but still buggy)
drivers), and linux both mq and non-mq - it appears to work just
fine.

Tested-By: Michael Tokarev <address@hidden>

With one comment below:

@@ -1285,7 +1289,9 @@ VirtIODevice *virtio_net_init(DeviceState *dev, NICConf 
*conf,
      int i;

      n = (VirtIONet *)virtio_common_init("virtio-net", VIRTIO_ID_NET,
-                                        sizeof(struct virtio_net_config),
+                                        conf->queues > 1 ?
+                                            sizeof(struct virtio_net_config) :
+                                            sizeof(struct 
virtio_net_config_compat),
                                          sizeof(VirtIONet));

Please add a comment in this place describing what we're doing.
Later on it will be less easy to remember or to find this
thread, and the code does not tell what's going on and why
this is needed ;)   You added a tiny comment around the definition
of virtio_net_config_compat struct, but it does not explain why
the criteria to enable it is conf->queues being larger than 1.


Thank you!

/mjt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]