From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z31Mu-0005tj-US for qemu-devel@nongnu.org; Thu, 11 Jun 2015 08:14:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z31Mp-00054w-80 for qemu-devel@nongnu.org; Thu, 11 Jun 2015 08:14:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32959) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z31Mp-00054p-05 for qemu-devel@nongnu.org; Thu, 11 Jun 2015 08:13:55 -0400 Date: Thu, 11 Jun 2015 14:13:51 +0200 From: "Michael S. Tsirkin" Message-ID: <20150611141135-mutt-send-email-mst@redhat.com> References: <1433943783-20125-3-git-send-email-thibaut.collet@6wind.com> <20150610173321-mutt-send-email-mst@redhat.com> <20150610180013-mutt-send-email-mst@redhat.com> <55791F29.6060000@redhat.com> <5579228E.1040705@redhat.com> <20150611123433-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 v3 2/2] vhost user: Add RARP injection for legacy guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thibaut Collet Cc: Jason Wang , qemu-devel , Stefan Hajnoczi On Thu, Jun 11, 2015 at 02:10:48PM +0200, Thibaut Collet wrote: > I am not sure to understand your remark: >=20 > > It needs to be sent when backend is activated by guest kick > > (in case of virtio 1, it's possible to use DRIVER_OK for this). > > This does not happen when VM still runs on source. >=20 > Could you confirm rarp can be sent by backend when the=A0 > VHOST_USER_SET_VRING_KICK message is received by the backend ? No - the time to send pakets is when you start processing the rings. And the time to do that is when you detect a kick on an eventfd, not when said fd is set. > At this time the migration is completed and there is no risk of confusi= ng the > switch. > In this case: > =A0 - there are nothing to do in QEMU to manage legacy guest with > no=A0GUEST_ANNOUNCE. > =A0 - All the job is done by the backend on the VHOST_USER_SET_VRING_KI= CK > reception. Maybe switch notification of live migration is done with a s= mall > delay but it works > =A0 - This patch can be discarded. >=20 >=20 > On Thu, Jun 11, 2015 at 12:38 PM, Michael S. Tsirkin w= rote: >=20 > On Thu, Jun 11, 2015 at 01:54:22PM +0800, Jason Wang wrote: > > > > > > On 06/11/2015 01:49 PM, Thibaut Collet wrote: > > > > Yes, but still need a mechanism to notify the backend of migr= ation > > > > completion from qemu side if GUEST_ANNOUNCE is not negotiated= . > > > > > > backend is aware of a connection with the guest (with the featu= re > > > negociation) and can send a rarp. This rarp will be always sent= by the > > > backend when a VM is launched (first start or live migration > > > completion) if the GUEST_ANOUNCE is not supported. > > > In this case the issue is solved without done everything by QEM= U. > > > > The issue is during migration guest network is still active. So s= ending > > rarp too early in the destination (e.g during VM is launched) may > > confuse the switch.=A0 We want it to be sent exactly when the mig= ration is > > completed in destination. >=20 > It needs to be sent when backend is activated by guest kick > (in case of virtio 1, it's possible to use DRIVER_OK for this). > This does not happen when VM still runs on source. >=20 > > > If sending a rarp message on the start of te VM is not acccepta= ble, we > > > must provide a mechanism similar of the one I have implemented.= The > > > message content can be empty as the backend is able to create t= he rarp > > > message. > > > > Yes. >=20 >=20