From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1xg8-00068b-IK for qemu-devel@nongnu.org; Mon, 08 Jun 2015 10:05:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1xg3-00052s-Qx for qemu-devel@nongnu.org; Mon, 08 Jun 2015 10:05:28 -0400 Received: from mail-ie0-f178.google.com ([209.85.223.178]:33363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1xg3-00052f-Ko for qemu-devel@nongnu.org; Mon, 08 Jun 2015 10:05:23 -0400 Received: by iebgx4 with SMTP id gx4so98329907ieb.0 for ; Mon, 08 Jun 2015 07:05:23 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20150608133203.GM23825@stefanha-thinkpad.redhat.com> References: <55701BED.2090802@redhat.com> <1433510652-13866-1-git-send-email-thibaut.collet@6wind.com> <55752E3C.8070700@redhat.com> <20150608133203.GM23825@stefanha-thinkpad.redhat.com> Date: Mon, 8 Jun 2015 16:05:23 +0200 Message-ID: From: Thibaut Collet Content-Type: multipart/alternative; boundary=20cf301d3cd403fa3105180222d3 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: Stefan Hajnoczi Cc: Jason Wang , "Michael S. Tsirkin" , qemu-devel@nongnu.org, quintela@redhat.com --20cf301d3cd403fa3105180222d3 Content-Type: text/plain; charset=UTF-8 > I've asked several times whether vhost-user support live migration? vhost-user can support live migration but it needs such fixes of Qemu. I have found the issue and develop my patch by trying live migration with vhost user. > I think Jason is pointing out that your patch lacks support for guests > that do not negotiate VIRTIO_NET_F_GUEST_ANNOUNCE. I have understood the issue with old guest pointed by Jason. I have thinking about the best way to do solve it and any advices are welcome. > Please send each patch revision as a new email thread. This makes it > easy to see your new patches in threaded email clients. I have used the same email thread as it is a reworked of my first patch. I will create a new email thread for the next version. On Mon, Jun 8, 2015 at 3:32 PM, Stefan Hajnoczi wrote: > On Mon, Jun 08, 2015 at 10:21:38AM +0200, 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. > > I think Jason is pointing out that your patch lacks support for guests > that do not negotiate VIRTIO_NET_F_GUEST_ANNOUNCE. > > If the guest does not set the feature bit then packets might continue to > get forwarded to the old host. > > Perhaps the correct place to implement this is in the virtio-net.c > device instead of in vhost-user.c. The non-vhost-user case should also > skip sending two ARP packets. > > BUT before we go any further: > > I've asked several times whether vhost-user support live migration? > > You didn't answer that question. Fixing this issue only makes sense if > vhost-user live migration is supported. > > Stefan > --20cf301d3cd403fa3105180222d3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
> I've asked several times = whether vhost-user support live migration?

vh= ost-user can support live migration but it needs such fixes of Qemu.
<= div>I have found the issue and develop my patch by trying live migration wi= th vhost user.

> I= think Jason is pointing out that your patch lacks support for guests
> that do not negotiate VIRTIO_NET_F= _GUEST_ANNOUNCE.

=
I have understood the issue with old gue= st pointed by Jason.
I have thinki= ng about the best way to do solve it and any advices are welcome.

> Please send each patch revision as a= new email thread.=C2=A0 This makes it
<= span style=3D"font-size:13px">> easy to see your new patches in threaded= email clients.

=
I have used the same e= mail thread as it is a reworked of my first patch.
I will create = a new email thread for the next version.

On Mon, Jun 8, 2015 at 3:32 PM, Stefan H= ajnoczi <stefanha@redhat.com> wrote:
On Mon, Jun 08, 2015 = at 10:21:38AM +0200, Thibaut Collet wrote:
> Hi,
>
> My understanding of gratuitous packet with virtio for any backend (vho= st
> 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 migra= tion
> a GARP is sent to all net backend through a queue dedicated to the net=
> backend.
>=C2=A0 =C2=A0 But for vhost-user:
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 - this operation is not possible (vhost-use= r has no queue)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 - it is already done with the previous mech= anism.
>=C2=A0 =C2=A0 Rather to define a queue to vhost user and notify twice t= he 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.

I think Jason is pointing out that your patch lacks support for= guests
that do not negotiate VIRTIO_NET_F_GUEST_ANNOUNCE.

If the guest does not set the feature bit then packets might continue to get forwarded to the old host.

Perhaps the correct place to implement this is in the virtio-net.c
device instead of in vhost-user.c.=C2=A0 The non-vhost-user case should als= o
skip sending two ARP packets.

BUT before we go any further:

I've asked several times whether vhost-user support live migration?

You didn't answer that question.=C2=A0 Fixing this issue only makes sen= se if
vhost-user live migration is supported.

Stefan

--20cf301d3cd403fa3105180222d3--