Message ID | 20151215133612.GJ29571@yliu-dev.sh.intel.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 952F65921; Tue, 15 Dec 2015 14:36:11 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 3D1105921 for <dev@dpdk.org>; Tue, 15 Dec 2015 14:36:10 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP; 15 Dec 2015 05:36:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,432,1444719600"; d="scan'208";a="871893697" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by orsmga002.jf.intel.com with ESMTP; 15 Dec 2015 05:36:08 -0800 Date: Tue, 15 Dec 2015 21:36:12 +0800 From: Yuanhan Liu <yuanhan.liu@linux.intel.com> To: Pavel Fedin <p.fedin@samsung.com> Message-ID: <20151215133612.GJ29571@yliu-dev.sh.intel.com> References: <000001d133ed$b2446eb0$16cd4c10$@samsung.com> <20151211094934.GX29571@yliu-dev.sh.intel.com> <001c01d133fd$d3a7d870$7af78950$@samsung.com> <20151214035842.GB18437@pxdev.xzpeter.org> <20151215082324.GG29571@yliu-dev.sh.intel.com> <007f01d13715$042a0a80$0c7e1f80$@samsung.com> <20151215100548.GD32243@pxdev.xzpeter.org> <CABUUfwO-6BUMc=VTnutOv5Lzx07acZnbrYG3e9pmDLJxhuK7Pg@mail.gmail.com> <CABUUfwOkSG92yJ_OH+un4Xp2v+9aN5O_z7Md9z-j-DgNkTwabg@mail.gmail.com> <00b601d13733$97e063a0$c7a12ae0$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00b601d13733$97e063a0$c7a12ae0$@samsung.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: dev@dpdk.org, 'Victor Kaplansky' <victork@redhat.com> Subject: Re: [dpdk-dev] [PATCH 0/4 for 2.3] vhost-user live migration support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Yuanhan Liu
Dec. 15, 2015, 1:36 p.m. UTC
On Tue, Dec 15, 2015 at 03:24:48PM +0300, Pavel Fedin wrote: > Hello! > > > After a migration, to avoid network outage, the guest must announce its new location to the L2 layer, typically with a GARP. Otherwise requests sent to > > the guest arrive to the old host until a ARP request is sent (after 30 seconds) or the guest sends some data. > > QEMU implementation of self announce after a migration with a vhost backend is the following: > > - If the VIRTIO_GUEST_ANNOUNCE feature has been negotiated the guest sends automatically a GARP. > > - Else if the vhost backend implements VHOST_USER_SEND_RARP this request is sent to the vhost backend. When this message is received the vhost backend > > must act as it receives a RARP from the guest (purpose of this RARP is to update switches' MAC->port maaping as a GARP). This RARP is a false one, > > created by the vhost backend, > > - Else nothing is done and we have a network outage until a ARP is sent or the guest sends some data. > > But what is qemu_announce_self() then? It's just unconditionally triggered after migration, but indeed sends some strange thing. > > > VIRTIO_GUEST_ANNOUNCE feature is negotiated if: > > - the vhost backend announces the support of this feature. Maybe QEMU can be updated to support unconditionnaly this feature > > Wrong. I tried to unconditionally enforce it in qemu (my guest does support it), and the link stopped working at all. I don't understand why. I'm wondering how did you do that? Why do you need enforece it in QEMU? Isn't it already supported so far? Actually, what's we need to do is to add such feature bit in vhost library, to claim we support it so that the the guest will send a gratuitous ARP when migration is done (check virtio_net_load()). ---- However, I found the GARP is not sent out at all, due to an error I met and reported before: KVM: injection failed, MSI lost (Operation not permitted) Which happened at the time QEMU is about to send the interrupt to the guest for announce event. However, it failed, hence no GARP was received. One thing worth noting is that it happened only when I did live migration on two different hosts (the two hosts happened to be using a same old kernel: v3.11.10). It works pretty well on same host. So, seems like a KVM bug then? --yliu
Comments
Hello! > > Wrong. I tried to unconditionally enforce it in qemu (my guest does support it), and the > link stopped working at all. I don't understand why. > > I'm wondering how did you do that? Why do you need enforece it in QEMU? > Isn't it already supported so far? I mean - qemu first asks vhost-user server (ovs/DPDK in our case) about capabilities, then negotiates them with the guest. And DPDK doesn't report VIRTIO_NET_F_GUEST_ANNOUNCE, so i just ORed this flag in qemu before the negotiation with guest (because indeed my logic says that the host should not do anything special about it). So the overall effect is the same as in your patch > diff --git a/lib/librte_vhost/virtio-net.c > b/lib/librte_vhost/virtio-net.c > index 03044f6..0ba5045 100644 > --- a/lib/librte_vhost/virtio-net.c > +++ b/lib/librte_vhost/virtio-net.c > @@ -74,6 +74,7 @@ static struct virtio_net_config_ll *ll_root; > #define VHOST_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \ > (1ULL << VIRTIO_NET_F_CTRL_VQ) | \ > (1ULL << VIRTIO_NET_F_CTRL_RX) | \ > + (1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | \ > (VHOST_SUPPORTS_MQ) | \ > (1ULL << VIRTIO_F_VERSION_1) | \ > (1ULL << VHOST_F_LOG_ALL) | \ But i was somehow wrong and this causes the whole thing to stop working instead. Even after just booting up the network doesn't work and PINGs do not pass. > However, I found the GARP is not sent out at all, due to an error > I met and reported before: > > KVM: injection failed, MSI lost (Operation not permitted) Interesting, i don't have this problem here. Some bug in your kernel/hardware? > One thing worth noting is that it happened only when I did live migration > on two different hosts (the two hosts happened to be using a same old > kernel: v3.11.10). It works pretty well on same host. So, seems like > a KVM bug then? 3.18.9 here and no this problem. Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia
On Tue, Dec 15, 2015 at 04:48:12PM +0300, Pavel Fedin wrote: > Hello! > > > > Wrong. I tried to unconditionally enforce it in qemu (my guest does support it), and the > > link stopped working at all. I don't understand why. > > > > I'm wondering how did you do that? Why do you need enforece it in QEMU? > > Isn't it already supported so far? > > I mean - qemu first asks vhost-user server (ovs/DPDK in our case) about capabilities, then negotiates them with the guest. And DPDK > doesn't report VIRTIO_NET_F_GUEST_ANNOUNCE, so i just ORed this flag in qemu before the negotiation with guest (because indeed my > logic says that the host should not do anything special about it). So the overall effect is the same as in your patch I see. > > > diff --git a/lib/librte_vhost/virtio-net.c > > b/lib/librte_vhost/virtio-net.c > > index 03044f6..0ba5045 100644 > > --- a/lib/librte_vhost/virtio-net.c > > +++ b/lib/librte_vhost/virtio-net.c > > @@ -74,6 +74,7 @@ static struct virtio_net_config_ll *ll_root; > > #define VHOST_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \ > > (1ULL << VIRTIO_NET_F_CTRL_VQ) | \ > > (1ULL << VIRTIO_NET_F_CTRL_RX) | \ > > + (1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | \ > > (VHOST_SUPPORTS_MQ) | \ > > (1ULL << VIRTIO_F_VERSION_1) | \ > > (1ULL << VHOST_F_LOG_ALL) | \ > > But i was somehow wrong and this causes the whole thing to stop working instead. Even after just booting up the network doesn't > work and PINGs do not pass. No idea. Maybe you have changed some other configures (such as of ovs) without notice? Or, the ovs bridge interface resets? BTW, would you please try my v1 patch set with above diff applied to see if the ping loss is still there. You might also want to run tcpdump with the dest host ovs bridge, to see if GARP is actually sent. > > > However, I found the GARP is not sent out at all, due to an error > > I met and reported before: > > > > KVM: injection failed, MSI lost (Operation not permitted) I was thinking that may be caused by the difference of my two hosts (a desktop and a server). I will try to find two similar hosts tomorrow to do more tests. Besides that, it'd be great if you could do a more test with above diff applied. --yliu > > Interesting, i don't have this problem here. Some bug in your kernel/hardware? > > > One thing worth noting is that it happened only when I did live migration > > on two different hosts (the two hosts happened to be using a same old > > kernel: v3.11.10). It works pretty well on same host. So, seems like > > a KVM bug then? > > 3.18.9 here and no this problem. > > Kind regards, > Pavel Fedin > Expert Engineer > Samsung Electronics Research center Russia >
diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 03044f6..0ba5045 100644 --- a/lib/librte_vhost/virtio-net.c +++ b/lib/librte_vhost/virtio-net.c @@ -74,6 +74,7 @@ static struct virtio_net_config_ll *ll_root; #define VHOST_SUPPORTED_FEATURES ((1ULL << VIRTIO_NET_F_MRG_RXBUF) | \ (1ULL << VIRTIO_NET_F_CTRL_VQ) | \ (1ULL << VIRTIO_NET_F_CTRL_RX) | \ + (1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | \ (VHOST_SUPPORTS_MQ) | \ (1ULL << VIRTIO_F_VERSION_1) | \ (1ULL << VHOST_F_LOG_ALL) | \