qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOU


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user
Date: Mon, 8 Jun 2015 17:48:48 +0200

On Mon, Jun 08, 2015 at 03:20:23PM +0200, Thibaut Collet wrote:
> > How about implementing a receive function that discards all packets
> > then?
> 
> Implementing a receive function that discards all packets is an other 
> solution.
> I have not chosen this one to avoid to mask other potential issues: 
> Normally vhost-user never receives packets. By keeping a NULL function as
> received callback we can detect easily case where packets are sent (qemu
> crashes) and solve this issue.

What I have an issue with is the fact that you make it depend on guest
configuration.
vhost user backend can't get packets from qemu at all, it doesn't make
sense to disable sending packets only if guest set some flag.

In particular, this flag isn't set around guest reset.


> > Can't vhost-user backend sends this automatically?
> > Why do we need to do anything in QEMU?
> 
> My explanations are maybe unclear. For old driver we have to send the RARP to
> the guest through the network interface (and to implement a receive function
> for vhost-user). My question is: where is the best location to do that:
>  1. In the receive function of vhost-user (in the file net/vhost-user.c)
>  2. In a self announce function (called when vhost-user receives a RARP,
> analysis of the packet content is needed in this case) in the file hw/net/
> vhost-net.c
>  3. In the vhost-user backend (file hw/virtio/vhost-user.c). In this case a 
> new
> message must be defined between hw/net/vhost-net.c and hw/virtio/vhost-user.c.
>  4. In the vhost client/backend (vapp or other)

In the vhost client/backend would be best.
See any issues with this?

-- 
MST



reply via email to

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