From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f67.google.com (mail-ed1-f67.google.com [209.85.208.67]) by dpdk.org (Postfix) with ESMTP id 113382C12 for ; Wed, 12 Dec 2018 11:15:24 +0100 (CET) Received: by mail-ed1-f67.google.com with SMTP id f23so15077871edb.3 for ; Wed, 12 Dec 2018 02:15:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hDVd6CcPiKEJhgccjROuIuvx9PQaljQTvYDhu7cztCU=; b=sA6ZHxyx+ACsdiRjeaHPh2SOV+hKX963T2iKHIiwWnDrISCmFxSa/5cxZb9Ibp4UDC eR969Y58x3Sy8msUzv+IqdQbzZKq0aSOc17OeUThT8c/oY8YnenRJ7AjXj0+Hagcdf59 T7+JBWjTLRJ7O0xsiZM3hNQraCzDqjq0ugc0xY6ryQUfCDI54oStNnFyWR/3L0ULS8/4 qkXt41nB5ueFUxnhLwawtf0Mroaq3MpxaCtgAgBlNwqcwqaU52s8+MJOuTDZs8ik5V44 pZ7QcwuxByOaAgpfG/Omf7uJpuF5uyzOQyQPb9m7bLJk0TqCwAdKvWEudDAz2W6uf7zQ fX2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hDVd6CcPiKEJhgccjROuIuvx9PQaljQTvYDhu7cztCU=; b=rj7bFA6ObrAb5Y8Bs2OQ6f80QL2+VUEb71rItX8FBTHrgfvh7zswJHOl6QOamc5zs+ ht03rdGnM0ED83aNsPwHlUDLOf7dbMqfT8zEkt2sfh9bANsJDhzkzmDAaXpKXk+bzRIg jJpBymt8ooZpZlAOPXFua45jXiG65SmGWUuLomUwJONwtFBbto8s0QWsLSxAHETQYawa bcMXIA5Oqw0Kbw3H/3Iw+0j5h8RCGQbHg8R8KfO0qLMqd/R4/hra1KRawwHhP2WVXeno zRxDZHoGkG7nMHUlpzXUWfLD+II+ua/McwM/IjgbRl5OTGHOoZu5B438R5DQLD2Fjk9z q2zQ== X-Gm-Message-State: AA+aEWbK0cADGGwChmjtQ5oPg+OPtRaGrzsGVqv1/4+90Y5azgjpf1Ia cK3EvhMHiO8bOibYT2d7MpF/2eYs8NeP2wGIn9fehQ== X-Google-Smtp-Source: AFSGD/U3CmmArwp+rf9ZAzb+mj5GXTR2lDPu8lSXQu2LWQ3Bf+BOxYZ/d9oRLxMX9RaOqLLnXEQqaBuFImXvdalDaq8= X-Received: by 2002:a05:6402:121a:: with SMTP id c26mr17668946edw.104.1544609723757; Wed, 12 Dec 2018 02:15:23 -0800 (PST) MIME-Version: 1.0 References: <20181128094607.106173-1-xiao.w.wang@intel.com> <20181128094607.106173-7-xiao.w.wang@intel.com> In-Reply-To: <20181128094607.106173-7-xiao.w.wang@intel.com> From: Alejandro Lucero Date: Wed, 12 Dec 2018 10:15:17 +0000 Message-ID: To: xiao.w.wang@intel.com Cc: tiwei.bie@intel.com, Maxime Coquelin , dev , zhihong.wang@intel.com, xiaolong.ye@intel.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 6/9] net/ifc: add devarg for LM mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2018 10:15:24 -0000 On Wed, Nov 28, 2018 at 9:56 AM Xiao Wang wrote: > This patch series enables a new method for live migration, i.e. software > assisted live migration. This patch provides a device argument for user > to choose the methold. > > When "swlm=1", driver/device will do live migration with a relay thread > dealing with dirty page logging. Without this parameter, device will do > dirty page logging and there's no relay thread consuming CPU resource. > > I'm a bit confused with this mode. If it is a relay thread doing the dirty page logging, does it mean that the datapath is through the relay thread and not between the VM and the vdpa device? > Signed-off-by: Xiao Wang > --- > drivers/net/ifc/ifcvf_vdpa.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c > index c0e50354a..e9cc8d7bc 100644 > --- a/drivers/net/ifc/ifcvf_vdpa.c > +++ b/drivers/net/ifc/ifcvf_vdpa.c > @@ -8,6 +8,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -31,9 +32,11 @@ > #endif > > #define IFCVF_VDPA_MODE "vdpa" > +#define IFCVF_SW_FALLBACK_LM "swlm" > > static const char * const ifcvf_valid_arguments[] = { > IFCVF_VDPA_MODE, > + IFCVF_SW_FALLBACK_LM, > NULL > }; > > @@ -56,6 +59,7 @@ struct ifcvf_internal { > rte_atomic32_t dev_attached; > rte_atomic32_t running; > rte_spinlock_t lock; > + bool sw_lm; > }; > > struct internal_list { > @@ -767,6 +771,7 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv > __rte_unused, > struct ifcvf_internal *internal = NULL; > struct internal_list *list = NULL; > int vdpa_mode = 0; > + int sw_fallback_lm = 0; > struct rte_kvargs *kvlist = NULL; > int ret = 0; > > @@ -826,6 +831,16 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv > __rte_unused, > internal->dev_addr.type = PCI_ADDR; > list->internal = internal; > > + if (rte_kvargs_count(kvlist, IFCVF_SW_FALLBACK_LM)) { > + ret = rte_kvargs_process(kvlist, IFCVF_SW_FALLBACK_LM, > + &open_int, &sw_fallback_lm); > + if (ret < 0) > + goto error; > + internal->sw_lm = sw_fallback_lm ? true : false; > + } else { > + internal->sw_lm = false; > + } > + > internal->did = rte_vdpa_register_device(&internal->dev_addr, > &ifcvf_ops); > if (internal->did < 0) { > -- > 2.15.1 > >