From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9tCP-0000Im-82 for qemu-devel@nongnu.org; Thu, 24 Nov 2016 07:32:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9tCK-0002KA-UO for qemu-devel@nongnu.org; Thu, 24 Nov 2016 07:32:21 -0500 Received: from mga09.intel.com ([134.134.136.24]:14213) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c9tCK-0002G3-Ia for qemu-devel@nongnu.org; Thu, 24 Nov 2016 07:32:16 -0500 Date: Thu, 24 Nov 2016 20:33:04 +0800 From: Yuanhan Liu Message-ID: <20161124123304.GG5048@yliu-dev.sh.intel.com> References: <20161011173526-mutt-send-email-mst@kernel.org> <20161117082902.GM5048@yliu-dev.sh.intel.com> <20161117094936.GN5048@yliu-dev.sh.intel.com> <20161117192445-mutt-send-email-mst@kernel.org> <20161122130223.GW5048@yliu-dev.sh.intel.com> <20161122164143-mutt-send-email-mst@kernel.org> <20161124063129.GE5048@yliu-dev.sh.intel.com> <4d6e8cf0-fe19-43a9-ff73-c2a9cdeb681e@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4d6e8cf0-fe19-43a9-ff73-c2a9cdeb681e@redhat.com> Subject: Re: [Qemu-devel] [dpdk-dev] dpdk/vpp and cross-version migration for vhost List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Traynor Cc: "Michael S. Tsirkin" , Maxime Coquelin , dev@dpdk.org, Stephen Hemminger , qemu-devel@nongnu.org, libvir-list@redhat.com, vpp-dev@lists.fd.io, =?iso-8859-1?Q?Marc-Andr=E9?= Lureau On Thu, Nov 24, 2016 at 09:30:49AM +0000, Kevin Traynor wrote: > On 11/24/2016 06:31 AM, Yuanhan Liu wrote: > > On Tue, Nov 22, 2016 at 04:53:05PM +0200, Michael S. Tsirkin wrote: > >>>> You keep assuming that you have the VM started first and > >>>> figure out things afterwards, but this does not work. > >>>> > >>>> Think about a cluster of machines. You want to start a VM in > >>>> a way that will ensure compatibility with all hosts > >>>> in a cluster. > >>> > >>> I see. I was more considering about the case when the dst > >>> host (including the qemu and dpdk combo) is given, and > >>> then determine whether it will be a successfull migration > >>> or not. > >>> > >>> And you are asking that we need to know which host could > >>> be a good candidate before starting the migration. In such > >>> case, we indeed need some inputs from both the qemu and > >>> vhost-user backend. > >>> > >>> For DPDK, I think it could be simple, just as you said, it > >>> could be either a tiny script, or even a macro defined in > >>> the source code file (we extend it every time we add a > >>> new feature) to let the libvirt to read it. Or something > >>> else. > >> > >> There's the issue of APIs that tweak features as Maxime > >> suggested. > > > > Yes, it's a good point. > > > >> Maybe the only thing to do is to deprecate it, > > > > Looks like so. > > > >> but I feel some way for application to pass info into > >> guest might be benefitial. > > > > The two APIs are just for tweaking feature bits DPDK supports before > > any device got connected. It's another way to disable some features > > (the another obvious way is to through QEMU command lines). > > > > IMO, it's bit handy only in a case like: we have bunch of VMs. Instead > > of disabling something though qemu one by one, we could disable it > > once in DPDK. > > > > But I doubt the useful of it. It's only used in DPDK's vhost example > > after all. Nor is it used in vhost pmd, neither is it used in OVS. > > rte_vhost_feature_disable() is currently used in OVS, lib/netdev-dpdk.c Hmmm. I must have checked very old code ... > > netdev_dpdk_vhost_class_init(void) > { > static struct ovsthread_once once = OVSTHREAD_ONCE_INITIALIZER; > > /* This function can be called for different classes. The > initialization > * needs to be done only once */ > if (ovsthread_once_start(&once)) { > rte_vhost_driver_callback_register(&virtio_net_device_ops); > rte_vhost_feature_disable(1ULL << VIRTIO_NET_F_HOST_TSO4 > | 1ULL << VIRTIO_NET_F_HOST_TSO6 > | 1ULL << VIRTIO_NET_F_CSUM); I saw the commit introduced such change, but it tells no reason why it was added. commit 362ca39639ae871806be5ae97d55e1cbb14afd92 Author: mweglicx Date: Thu Apr 14 17:40:06 2016 +0100 Update relevant artifacts to add support for DPDK 16.04. Following changes are applied: - INSTALL.DPDK.md: CONFIG_RTE_BUILD_COMBINE_LIBS step has been removed because it is no longer present in DPDK configuration (combined library is created by default), - INSTALL.DPDK.md: VHost Cuse configuration is updated, - netdev-dpdk.c: Link speed definition is changed in DPDK and netdev_dpdk_get_features is updated accordingly, - netdev-dpdk.c: TSO and checksum offload has been disabled for vhostuser device. - .travis/linux-build.sh: DPDK version is updated and legacy flags have been removed in configuration. Signed-off-by: Michal Weglicki Signed-off-by: Panu Matilainen Acked-by: Daniele Di Proietto --yliu