qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] vhost: fix features ack
@ 2010-03-31 18:20 Michael S. Tsirkin
  2010-03-31 18:26 ` [Qemu-devel] " Anthony Liguori
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Michael S. Tsirkin @ 2010-03-31 18:20 UTC (permalink / raw)
  To: qemu-devel, Anthony Liguori

From: David L Stevens <dlstevens@us.ibm.com>

vhost driver in qemu didn't ack features, and this happens
to work because we don't really require any features. However,
it's better not to rely on this. This patch passes features to
vhost as guest acks them.

Signed-off-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---

Anthony, here's a fixup patch to address an issue in vhost
patches. Incidentially, what's the status of the vhost patchset?


 hw/virtio-net.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/hw/virtio-net.c b/hw/virtio-net.c
index 9ddd58c..4c7c46e 100644
--- a/hw/virtio-net.c
+++ b/hw/virtio-net.c
@@ -218,6 +218,14 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint32_t features)
                         (features >> VIRTIO_NET_F_GUEST_ECN)  & 1,
                         (features >> VIRTIO_NET_F_GUEST_UFO)  & 1);
     }
+    if (!n->nic->nc.peer ||
+        n->nic->nc.peer->info->type != NET_CLIENT_TYPE_TAP) {
+        return;
+    }
+    if (!tap_get_vhost_net(n->nic->nc.peer)) {
+        return;
+    }
+    return vhost_net_ack_features(tap_get_vhost_net(n->nic->nc.peer), features);
 }
 
 static int virtio_net_handle_rx_mode(VirtIONet *n, uint8_t cmd,
-- 
1.7.0.2.280.gc6f05

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-04-13 21:58 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-31 18:20 [Qemu-devel] [PATCH] vhost: fix features ack Michael S. Tsirkin
2010-03-31 18:26 ` [Qemu-devel] " Anthony Liguori
2010-03-31 18:38   ` Luiz Capitulino
2010-03-31 19:07     ` Michael S. Tsirkin
2010-03-31 19:24       ` Anthony Liguori
2010-03-31 19:25         ` Michael S. Tsirkin
2010-03-31 19:37           ` Anthony Liguori
2010-03-31 19:54             ` Blue Swirl
2010-03-31 19:55               ` Anthony Liguori
2010-03-31 20:06           ` Nathan Froyd
2010-03-31 19:46         ` Blue Swirl
2010-03-31 22:45         ` Aurelien Jarno
2010-04-01  2:45           ` Anthony Liguori
2010-04-01  2:46             ` Anthony Liguori
2010-04-01 15:54             ` Blue Swirl
2010-04-01 16:08               ` Anthony Liguori
2010-04-01 16:08           ` Blue Swirl
2010-03-31 19:38       ` Blue Swirl
2010-03-31 19:42         ` Anthony Liguori
2010-03-31 20:03           ` Blue Swirl
2010-04-01 12:09             ` Paul Brook
2010-04-01 14:53         ` Michael S. Tsirkin
2010-04-04 12:14 ` Michael S. Tsirkin
2010-04-13 21:58 ` [Qemu-devel] " Aurelien Jarno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).