Message ID | 1432695691-22360-1-git-send-email-huawei.xie@intel.com (mailing list archive) |
---|---|
State | Accepted, 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 A24C6B38D; Wed, 27 May 2015 05:01:46 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E0849590C for <dev@dpdk.org>; Wed, 27 May 2015 05:01:43 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 26 May 2015 20:01:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,502,1427785200"; d="scan'208";a="577321291" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 26 May 2015 20:01:38 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t4R31aqS006742; Wed, 27 May 2015 11:01:36 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t4R31YpY022395; Wed, 27 May 2015 11:01:36 +0800 Received: (from hxie5@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t4R31XEt022391; Wed, 27 May 2015 11:01:33 +0800 From: Huawei Xie <huawei.xie@intel.com> To: dev@dpdk.org Date: Wed, 27 May 2015 11:01:31 +0800 Message-Id: <1432695691-22360-1-git-send-email-huawei.xie@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] vhost: enable live migration 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
Huawei Xie
May 27, 2015, 3:01 a.m. UTC
When we migrate VM, without this feature, qemu will report error:
"migrate: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature".
Signed-off-by: Krishna Murthy <krishna.j.murthy@intel.com>
---
lib/librte_vhost/virtio-net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
> -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei Xie > Sent: Wednesday, May 27, 2015 11:02 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] vhost: enable live migration > > When we migrate VM, without this feature, qemu will report error: > "migrate: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature". > Is this enough for vhost to support migrate VM? I remember Claire has another patch, possibly need refer to that patch. > Signed-off-by: Krishna Murthy <krishna.j.murthy@intel.com> > --- > lib/librte_vhost/virtio-net.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index > 4672e67..fced2ab 100644 > --- a/lib/librte_vhost/virtio-net.c > +++ b/lib/librte_vhost/virtio-net.c > @@ -66,7 +66,8 @@ static struct virtio_net_config_ll *ll_root; > /* Features supported by this lib. */ > #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_CTRL_RX) | \ > + (1ULL << VHOST_F_LOG_ALL)) > static uint64_t VHOST_FEATURES = VHOST_SUPPORTED_FEATURES; > > > -- > 1.8.1.4
2015-06-01 04:47, Ouyang, Changchun: > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei Xie > > When we migrate VM, without this feature, qemu will report error: > > "migrate: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature". > > Is this enough for vhost to support migrate VM? > I remember Claire has another patch, possibly need refer to that patch. Indeed, there were some patches which do not build: http://dpdk.org/ml/archives/dev/2014-August/005050.html And there was no answer. [...] > > + (1ULL << VHOST_F_LOG_ALL)) Please check if this line is sufficient. Thanks
> -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Thursday, June 4, 2015 2:00 PM > To: Xie, Huawei > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] vhost: enable live migration > 2015-06-01 04:47, Ouyang, Changchun: > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei Xie > > > When we migrate VM, without this feature, qemu will report error : > > > "migrate: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature". > > > > Is this enough for vhost to support migrate VM? > > I remember Claire has another patch, possibly need refer to that patch. > Indeed, there were some patches which do not build: > http://dpdk.org/ml/archives/dev/2014-August/005050.html > And there was no answer. The log name is incorrect in Claire's patch and "CONFIG" needs to replaced with "VHOST_CONFIG". It also only supported migration for vhost_cuse. Claire left the org around the same time and the patch was not picked up > [...] > > > + (1ULL << VHOST_F_LOG_ALL)) > Please check if this line is sufficient. This should be sufficient to enable migration for vhost-user. The previous patch with the CONFIG log fix enables migration for vhost-cuse. The behavior of qemu with vhost_cuse when migrating is to turn on the migration flag before migration regardless of what the backend advertises as being supported and to disable it again once migration has been completed. This is why Claire's patch ignores the VHOST_F_LOG_ALL setting although I don't think this is the right way to implement this. If the current patch is combined with the vhost_net_ioctl modifications of the original patch then it should enable migration for both vhost-cuse and vhost-user. > Thanks
2015-05-27 11:01, Huawei Xie: > When we migrate VM, without this feature, qemu will report error: > "migrate: Migration disabled: vhost lacks VHOST_F_LOG_ALL feature". > > Signed-off-by: Krishna Murthy <krishna.j.murthy@intel.com> Assumed the author is Krishna Murthy (not explicit in the patch). Applied, thanks.
diff --git a/lib/librte_vhost/virtio-net.c b/lib/librte_vhost/virtio-net.c index 4672e67..fced2ab 100644 --- a/lib/librte_vhost/virtio-net.c +++ b/lib/librte_vhost/virtio-net.c @@ -66,7 +66,8 @@ static struct virtio_net_config_ll *ll_root; /* Features supported by this lib. */ #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_CTRL_RX) | \ + (1ULL << VHOST_F_LOG_ALL)) static uint64_t VHOST_FEATURES = VHOST_SUPPORTED_FEATURES;