From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1zIG-00062l-7a for qemu-devel@nongnu.org; Mon, 08 Jun 2015 11:48:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1zIC-0007nw-6i for qemu-devel@nongnu.org; Mon, 08 Jun 2015 11:48:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1zIC-0007nj-1W for qemu-devel@nongnu.org; Mon, 08 Jun 2015 11:48:52 -0400 Date: Mon, 8 Jun 2015 17:48:48 +0200 From: "Michael S. Tsirkin" Message-ID: <20150608174146-mutt-send-email-mst@redhat.com> References: <55701BED.2090802@redhat.com> <1433510652-13866-1-git-send-email-thibaut.collet@6wind.com> <20150608121022-mutt-send-email-mst@redhat.com> <20150608144326-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thibaut Collet Cc: Jason Wang , qemu-devel@nongnu.org, Stefan Hajnoczi , quintela@redhat.com On Mon, Jun 08, 2015 at 03:20:23PM +0200, Thibaut Collet wrote: > > How about implementing a receive function that discards all packets > > then? >=20 > Implementing a receive function that discards all packets is an other s= olution. > I have not chosen this one to avoid to mask other potential issues:=A0 > Normally vhost-user never receives packets. By keeping a NULL function = as > received callback we can detect easily case where packets are sent (qem= u > 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? >=20 > My explanations are maybe unclear. For old driver we have to send the R= ARP to > the guest through the network interface (and to implement a receive fun= ction > for vhost-user). My question is: where is the best location to do that: > =A01. In the receive function of vhost-user (in the file net/vhost-user= .c) > =A02. In a self announce function (called when vhost-user receives a RA= RP, > analysis of the packet content is needed in this case) in the file hw/n= et/ > vhost-net.c > =A03. In the=A0vhost-user backend (file hw/virtio/vhost-user.c).=A0In t= his case a new > message must be defined between=A0hw/net/vhost-net.c and=A0hw/virtio/vh= ost-user.c. > =A04. In the vhost client/backend (vapp or other) In the vhost client/backend would be best. See any issues with this? --=20 MST