[v1,0/2] introduce asynchronous data path for vhost
Message ID | 1591869725-13331-1-git-send-email-patrick.fu@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D6744A00C5; Thu, 11 Jun 2020 12:13:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4A7932BE2; Thu, 11 Jun 2020 12:13:58 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id A7E30E07 for <dev@dpdk.org>; Thu, 11 Jun 2020 12:13:56 +0200 (CEST) IronPort-SDR: lNoqODBqNWYwPQjX89lBr3TgOFWelk6PzH/YBGNAnkQexyL/y3gYu8gcmEwfNeJWGEsCW+MZg7 0CxKMfNFY9VQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2020 03:13:55 -0700 IronPort-SDR: j0cSwo+YfY/tts0CotlLXqiNmDm9s4hkFCoS/JJ7sm1V6YiB4BiBokTIwAHRIm2/d0W3Re6oD4 fLqgwzivtDEQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,499,1583222400"; d="scan'208";a="296542242" Received: from npg-dpdk-patrickfu-sl1.sh.intel.com ([10.67.117.45]) by fmsmga004.fm.intel.com with ESMTP; 11 Jun 2020 03:13:53 -0700 From: patrick.fu@intel.com To: dev@dpdk.org, maxime.coquelin@redhat.com, chenbo.xia@intel.com, zhihong.wang@intel.com, xiaolong.ye@intel.com Cc: patrick.fu@intel.com, cheng1.jiang@intel.com, cunming.liang@intel.com Date: Thu, 11 Jun 2020 18:02:03 +0800 Message-Id: <1591869725-13331-1-git-send-email-patrick.fu@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH v1 0/2] introduce asynchronous data path for vhost 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> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Message
Patrick Fu
June 11, 2020, 10:02 a.m. UTC
From: Patrick Fu <patrick.fu@intel.com>
Performing large memory copies usually takes up a major part of CPU
cycles and becomes the hot spot in vhost-user enqueue operation. To
offload expensive memory operations from the CPU, this patch set
proposes to leverage DMA engines, e.g., I/OAT, a DMA engine in the
Intel's processor, to accelerate large copies.
Large copies are offloaded from the CPU to the DMA in an asynchronous
manner. The CPU just submits copy jobs to the DMA but without waiting
for its copy completion. Thus, there is no CPU intervention during
data transfer; we can save precious CPU cycles and improve the overall
throughput for vhost-user based applications, like OVS. During packet
transmission, it offloads large copies to the DMA and performs small
copies by the CPU, due to startup overheads associated with the DMA.
This patch set construct a general framework that applications can
leverage to attach DMA channels with vhost-user transmit queues. Four
new RTE APIs are introduced to vhost library for applications to
register and use the asynchronous data path. In addition, two new DMA
operation callbacks are defined, by which vhost-user asynchronous data
path can interact with DMA hardware. Currently only enqueue operation
for split queue is implemented, but the frame is flexible to extend
support for dequeue & packed queue.
Patrick Fu (2):
vhost: introduce async data path registration API
vhost: introduce async enqueue for split ring
lib/librte_vhost/Makefile | 3 +-
lib/librte_vhost/rte_vhost.h | 1 +
lib/librte_vhost/rte_vhost_async.h | 172 ++++++++++++
lib/librte_vhost/socket.c | 20 ++
lib/librte_vhost/vhost.c | 74 ++++-
lib/librte_vhost/vhost.h | 30 ++-
lib/librte_vhost/vhost_user.c | 28 +-
lib/librte_vhost/virtio_net.c | 538 ++++++++++++++++++++++++++++++++++++-
8 files changed, 857 insertions(+), 9 deletions(-)
create mode 100644 lib/librte_vhost/rte_vhost_async.h