From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <xiao.w.wang@intel.com>
Received: from mga05.intel.com (mga05.intel.com [192.55.52.43])
 by dpdk.org (Postfix) with ESMTP id A32C81B395
 for <dev@dpdk.org>; Wed, 28 Nov 2018 10:55:42 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 28 Nov 2018 01:55:41 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.56,290,1539673200"; d="scan'208";a="112891104"
Received: from dpdk-xiao-1.sh.intel.com ([10.67.111.106])
 by orsmga001.jf.intel.com with ESMTP; 28 Nov 2018 01:55:40 -0800
From: Xiao Wang <xiao.w.wang@intel.com>
To: tiwei.bie@intel.com,
	maxime.coquelin@redhat.com
Cc: dev@dpdk.org, zhihong.wang@intel.com, xiaolong.ye@intel.com,
 Xiao Wang <xiao.w.wang@intel.com>
Date: Wed, 28 Nov 2018 17:45:58 +0800
Message-Id: <20181128094607.106173-1-xiao.w.wang@intel.com>
X-Mailer: git-send-email 2.15.1
Subject: [dpdk-dev] [PATCH 0/9] support SW assisted VDPA live migration
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 28 Nov 2018 09:55:43 -0000

In the previous VDPA implementation we have enabled live migration support
by HW accelerator doing all the stuff, including dirty page logging and
device status report/restore. In this mode VDPA sample daemon and device
driver just takes care of the control path and does not involve in data
path, so there's almost 0 CPU resource usage. This mode requires device
to have dirty page logging capability.

This patch series adds live migration support for devices without logging
capability. VDPA driver could set up a relay thread standing between the
guest and device when live migration happens, this relay intervenes into
the communication between guest virtio driver and physical virtio
accelerator, it helps device to do a vring relay and passingly log dirty
pages. Thus some CPU resource will be consumed in this scenario, percentage
depending on the network throughput.

Some new helpers are added into vhost lib for this VDPA SW fallback:
- rte_vhost_host_notifier_ctrl, to enable/disable the VDPA direct-IO
  datapath.
- rte_vdpa_relay_avail_ring, to relay the available ring from guest vring
  to mediate vring.
- rte_vdpa_relay_used_ring, to relay the used ring from mediate vring to
  guest vring.

Some existing helpers are also leveraged for SW fallback setup, like VFIO
interrupt configuration, IOMMU table programming, etc.

This patch enables this SW assisted VDPA live migration in ifc driver.
Since ifcvf also supports HW dirty page logging, we add a new devarg
for user to select if the SW mode is used or not.

Xiao Wang (9):
  vhost: provide helper for host notifier ctrl
  vhost: provide helpers for virtio ring relay
  net/ifc: dump debug message for error
  net/ifc: store only registered device instance
  net/ifc: detect if VDPA mode is specified
  net/ifc: add devarg for LM mode
  net/ifc: use lib API for used ring logging
  net/ifc: support SW assisted VDPA live migration
  doc: update ifc NIC document

 doc/guides/nics/ifc.rst                |   7 +
 drivers/net/ifc/base/ifcvf.h           |   1 +
 drivers/net/ifc/ifcvf_vdpa.c           | 463 ++++++++++++++++++++++++++++++---
 lib/librte_vhost/rte_vdpa.h            |  56 ++++
 lib/librte_vhost/rte_vhost_version.map |   3 +
 lib/librte_vhost/vdpa.c                | 173 ++++++++++++
 lib/librte_vhost/vhost.c               |   3 +-
 lib/librte_vhost/vhost.h               |  40 +++
 lib/librte_vhost/vhost_user.c          |   7 +-
 lib/librte_vhost/virtio_net.c          |  39 ---
 10 files changed, 714 insertions(+), 78 deletions(-)

-- 
2.15.1