DPDK patches and discussions
 help / color / mirror / Atom feed
From: patrick.fu@intel.com
To: dev@dpdk.org, maxime.coquelin@redhat.com, chenbo.xia@intel.com,
	zhihong.wang@intel.com
Cc: patrick.fu@intel.com, yinan.wang@intel.com,
	cheng1.jiang@intel.com, cunming.liang@intel.com
Subject: [dpdk-dev] [PATCH v3 0/2] introduce asynchronous data path for vhost
Date: Fri,  3 Jul 2020 18:27:30 +0800	[thread overview]
Message-ID: <1593772052-33228-1-git-send-email-patrick.fu@intel.com> (raw)
In-Reply-To: <1591869725-13331-1-git-send-email-patrick.fu@intel.com>

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 framework is flexible to extend
support for packed queue.

v2:
update meson file for new header file
update rte_vhost_version.map to include new APIs
rename async APIs/structures to be prefixed with "rte_vhost"
rename some variables/structures for readibility
correct minor typo in comments/license statements
refine memory allocation logic for vq internal buffer
add error message printing in some failure cases
check inflight async packets in unregistration API call
mark new APIs as experimental

v3:
use atomic_xxx() functions in updating ring index
fix a bug in async enqueue failure handling

Patrick Fu (2):
  vhost: introduce async enqueue registration API
  vhost: introduce async enqueue for split ring

 lib/librte_vhost/Makefile              |   2 +-
 lib/librte_vhost/meson.build           |   2 +-
 lib/librte_vhost/rte_vhost.h           |   1 +
 lib/librte_vhost/rte_vhost_async.h     | 176 +++++++++++
 lib/librte_vhost/rte_vhost_version.map |   4 +
 lib/librte_vhost/socket.c              |  20 ++
 lib/librte_vhost/vhost.c               | 127 +++++++-
 lib/librte_vhost/vhost.h               |  30 +-
 lib/librte_vhost/vhost_user.c          |  23 +-
 lib/librte_vhost/virtio_net.c          | 539 ++++++++++++++++++++++++++++++++-
 10 files changed, 915 insertions(+), 9 deletions(-)
 create mode 100644 lib/librte_vhost/rte_vhost_async.h

-- 
1.8.3.1


  parent reply	other threads:[~2020-07-03 10:38 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 10:02 [dpdk-dev] [PATCH v1 " patrick.fu
2020-06-11 10:02 ` [dpdk-dev] [PATCH v1 1/2] vhost: introduce async data path registration API patrick.fu
2020-06-18  5:50   ` Liu, Yong
2020-06-18  9:08     ` Fu, Patrick
2020-06-19  0:40       ` Liu, Yong
2020-06-25 13:42     ` Maxime Coquelin
2020-06-26 14:28   ` Maxime Coquelin
2020-06-29  1:15     ` Fu, Patrick
2020-06-26 14:44   ` Maxime Coquelin
2020-06-11 10:02 ` [dpdk-dev] [PATCH v1 2/2] vhost: introduce async enqueue for split ring patrick.fu
2020-06-18  6:56   ` Liu, Yong
2020-06-18 11:36     ` Fu, Patrick
2020-06-26 14:39   ` Maxime Coquelin
2020-06-26 14:46   ` Maxime Coquelin
2020-06-29  1:25     ` Fu, Patrick
2020-06-26 14:42 ` [dpdk-dev] [PATCH v1 0/2] introduce asynchronous data path for vhost Maxime Coquelin
2020-07-03 10:27 ` patrick.fu [this message]
2020-07-03 10:27   ` [dpdk-dev] [PATCH v3 1/2] vhost: introduce async enqueue registration API patrick.fu
2020-07-03 10:27   ` [dpdk-dev] [PATCH v3 2/2] vhost: introduce async enqueue for split ring patrick.fu
2020-07-03 12:21 ` [dpdk-dev] [PATCH v4 0/2] introduce asynchronous data path for vhost patrick.fu
2020-07-03 12:21   ` [dpdk-dev] [PATCH v4 1/2] vhost: introduce async enqueue registration API patrick.fu
2020-07-06  3:05     ` Liu, Yong
2020-07-06  9:08       ` Fu, Patrick
2020-07-03 12:21   ` [dpdk-dev] [PATCH v4 2/2] vhost: introduce async enqueue for split ring patrick.fu
2020-07-06 11:53 ` [dpdk-dev] [PATCH v5 0/2] introduce asynchronous data path for vhost patrick.fu
2020-07-06 11:53   ` [dpdk-dev] [PATCH v5 1/2] vhost: introduce async enqueue registration API patrick.fu
2020-07-06 11:53   ` [dpdk-dev] [PATCH v5 2/2] vhost: introduce async enqueue for split ring patrick.fu
2020-07-07  5:07 ` [dpdk-dev] [PATCH v6 0/2] introduce asynchronous data path for vhost patrick.fu
2020-07-07  5:07   ` [dpdk-dev] [PATCH v6 1/2] vhost: introduce async enqueue registration API patrick.fu
2020-07-07  8:22     ` Xia, Chenbo
2020-07-07  5:07   ` [dpdk-dev] [PATCH v6 2/2] vhost: introduce async enqueue for split ring patrick.fu
2020-07-07  8:22     ` Xia, Chenbo
2020-07-07 16:45   ` [dpdk-dev] [PATCH v6 0/2] introduce asynchronous data path for vhost Ferruh Yigit
2020-07-20 13:26   ` Maxime Coquelin
2020-07-21  2:28     ` Fu, Patrick
2020-07-21  8:28       ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1593772052-33228-1-git-send-email-patrick.fu@intel.com \
    --to=patrick.fu@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=cheng1.jiang@intel.com \
    --cc=cunming.liang@intel.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=yinan.wang@intel.com \
    --cc=zhihong.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).