From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1t91-0001VG-5A for qemu-devel@nongnu.org; Mon, 08 Jun 2015 05:14:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1t8x-0001GK-Us for qemu-devel@nongnu.org; Mon, 08 Jun 2015 05:14:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1t8x-0001G7-Py for qemu-devel@nongnu.org; Mon, 08 Jun 2015 05:14:55 -0400 Message-ID: <55755D0B.2030708@redhat.com> Date: Mon, 08 Jun 2015 17:14:51 +0800 From: Jason Wang MIME-Version: 1.0 References: <55701BED.2090802@redhat.com> <1433510652-13866-1-git-send-email-thibaut.collet@6wind.com> <55752E3C.8070700@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: quintela@redhat.com, qemu-devel@nongnu.org, Stefan Hajnoczi , mst@redhat.com On 06/08/2015 04:21 PM, Thibaut Collet wrote: > Hi, > > My understanding of gratuitous packet with virtio for any backend > (vhost user or other): > - When the VM is loaded (first start or migration) the virtio net > interfaces are loaded ( virtio_net_load_device function in > hw/net/virtio-net.c) > - If the guest has the VIRTIO_NET_F_GUEST_ANNOUNCE capability, request > to send gratuitous packet is done. > > 1. To enable gratuitous packet through this mechanism I have > added VIRTIO_NET_F_GUEST_ANNOUNCE capability to hw/net/vhost_net.c. So > host and guest can negotiate this feature when vhost-user is used. > > 2. self announce occurs in case of live migration. During a live > migration a GARP is sent to all net backend through a queue dedicated > to the net backend. > But for vhost-user: > - this operation is not possible (vhost-user has no queue) > - it is already done with the previous mechanism. > Rather to define a queue to vhost user and notify twice the guest > to send gratuitous packet I have disable GARP from self announce and > use only the first mechanism for that. > > I have tested my modifications with guest that supports > VIRTIO_NET_F_GUEST_ANNOUNCE and vhost-user on the host. After a live > migration I have the GARP from the guest. Yes, your patch works well for recent drivers. But the problem is legacy guest/driver without VIRTIO_NET_F_GUEST_ANNOUNCE. In this case there will be no GARP sent after migration. Thanks