From patchwork Fri Jul 16 02:59:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiang, Cheng1" X-Patchwork-Id: 95928 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 879B6A0C4A; Fri, 16 Jul 2021 05:15:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4BC694014D; Fri, 16 Jul 2021 05:15:59 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 4A09C40143 for ; Fri, 16 Jul 2021 05:15:57 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10046"; a="210653758" X-IronPort-AV: E=Sophos;i="5.84,244,1620716400"; d="scan'208";a="210653758" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2021 20:15:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,244,1620716400"; d="scan'208";a="506308129" Received: from dpdk_jiangcheng.sh.intel.com ([10.67.119.149]) by fmsmga002.fm.intel.com with ESMTP; 15 Jul 2021 20:15:52 -0700 From: Cheng Jiang To: maxime.coquelin@redhat.com, Chenbo.Xia@intel.com Cc: dev@dpdk.org, jiayu.hu@intel.com, yvonnex.yang@intel.com, Cheng Jiang Date: Fri, 16 Jul 2021 02:59:18 +0000 Message-Id: <20210716025923.27164-1-cheng1.jiang@intel.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210602042802.31943-1-cheng1.jiang@intel.com> References: <20210602042802.31943-1-cheng1.jiang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 0/5] vhost: handle memory hotplug for async vhost X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When the guest memory is hotplugged, the vhost application which enables DMA acceleration must stop DMA transfers before the vhost re-maps the guest memory. This patch set is to provide an unsafe API to drain in-flight pkts which are submitted to DMA engine in vhost async data path, and notify the vhost application of stopping DMA transfers. And enable it in vhost example. v4: * rebased on the latest codess v3: * added a patch to fix async ops return type * fixed async ops fail handler * updated the doc v2: * changed the patch structure Cheng Jiang (4): vhost: fix async vhost ops return type vhost: add unsafe API to drain pkts in async vhost examples/vhost: handle memory hotplug for async vhost doc: update doc for try drain API in vhost lib Jiayu Hu (1): vhost: handle memory hotplug for async vhost doc/guides/prog_guide/vhost_lib.rst | 5 + doc/guides/rel_notes/release_21_08.rst | 5 + examples/vhost/ioat.c | 4 +- examples/vhost/ioat.h | 4 +- examples/vhost/main.c | 48 +++++++- examples/vhost/main.h | 1 + lib/vhost/rte_vhost_async.h | 28 ++++- lib/vhost/version.map | 3 + lib/vhost/vhost_user.c | 9 ++ lib/vhost/virtio_net.c | 146 ++++++++++++++++++++----- 10 files changed, 215 insertions(+), 38 deletions(-) --- 2.29.2