[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] vhost: fix features ack
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [PATCH] vhost: fix features ack |
Date: |
Sun, 4 Apr 2010 15:14:44 +0300 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Wed, Mar 31, 2010 at 09:20:31PM +0300, Michael S. Tsirkin wrote:
> From: David L Stevens <address@hidden>
>
> 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 <address@hidden>
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
>
> 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(-)
Just making sure this patch does not get lost in the noise:
now that vhost net support is merged, please apply this
patch on top. Thanks!
> 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