From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1o89-0007fy-OY for qemu-devel@nongnu.org; Tue, 13 Apr 2010 17:58:49 -0400 Received: from [140.186.70.92] (port=50754 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1o88-0007fJ-4g for qemu-devel@nongnu.org; Tue, 13 Apr 2010 17:58:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1o86-0004AJ-F7 for qemu-devel@nongnu.org; Tue, 13 Apr 2010 17:58:48 -0400 Received: from hall.aurel32.net ([88.191.82.174]:34196) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1o86-00048w-9B for qemu-devel@nongnu.org; Tue, 13 Apr 2010 17:58:46 -0400 Date: Tue, 13 Apr 2010 23:58:35 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] vhost: fix features ack Message-ID: <20100413215835.GA24116@volta.aurel32.net> References: <20100331182031.GA5200@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20100331182031.GA5200@redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org On Wed, Mar 31, 2010 at 09:20:31PM +0300, Michael S. Tsirkin wrote: > From: David L Stevens > > 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 > Signed-off-by: Michael S. Tsirkin > --- > > Anthony, here's a fixup patch to address an issue in vhost > patches. Incidentially, what's the status of the vhost patchset? > Thanks, applied. > 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 > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net