All of lore.kernel.org
 help / color / mirror / Atom feed
From: xuan.ding@intel.com
To: maxime.coquelin@redhat.com, chenbo.xia@intel.com
Cc: dev@dpdk.org, jiayu.hu@intel.com, cheng1.jiang@intel.com,
	sunil.pai.g@intel.com, liangma@liangbit.com,
	Xuan Ding <xuan.ding@intel.com>
Subject: [RFC,v2 0/2] vhost: support async dequeue data path
Date: Thu, 24 Feb 2022 11:03:58 +0000	[thread overview]
Message-ID: <20220224110400.44670-1-xuan.ding@intel.com> (raw)
In-Reply-To: <20220101001244.90147-1-xuan.ding@intel.com>

From: Xuan Ding <xuan.ding@intel.com>

The presence of an asynchronous path allows applications to offload
memory copies to DMA engine, so as to save CPU cycles and improve
the copy performance. This patch set is a draft implementation for
split ring in vhost async dequeue data path. The code is based on
latest enqueue changes [1].

This patch set is a new design and implementation of [2]. Since dmadev
was introduced in DPDK 21.11, to simplify application logics, this patch
integrates dmadev in vhost. With dmadev integrated, vhost supports M:N
mapping between vrings and DMA virtual channels. Specifically, one vring
can use multiple different DMA channels and one DMA channel can be
shared by multiple vrings at the same time.

A new asynchronous dequeue function is introduced:
	1) rte_vhost_async_try_dequeue_burst(int vid, uint16_t queue_id,
       		struct rte_mempool *mbuf_pool, struct rte_mbuf **pkts,
		uint16_t count, int *nr_inflight,
		uint16_t dma_id, uint16_t vchan_id)

	Receive packets from the guest and offloads copies to DMA
virtual channel.

[1] https://mails.dpdk.org/archives/dev/2022-February/234555.html
[2] https://mails.dpdk.org/archives/dev/2021-September/218591.html

RFC v1 -> v2:
* fix one bug in example
* rename vchan to vchan_id
* check if dma_id and vchan_id valid
* rework all the logs to new standard

Xuan Ding (2):
  vhost: support async dequeue for split ring
  examples/vhost: support async dequeue data path

 doc/guides/sample_app_ug/vhost.rst |   9 +-
 examples/vhost/main.c              | 292 +++++++++++------
 examples/vhost/main.h              |  35 +-
 examples/vhost/virtio_net.c        |  16 +-
 lib/vhost/rte_vhost_async.h        |  33 ++
 lib/vhost/version.map              |   1 +
 lib/vhost/vhost.h                  |   1 +
 lib/vhost/virtio_net.c             | 504 +++++++++++++++++++++++++++++
 8 files changed, 793 insertions(+), 98 deletions(-)

-- 
2.17.1


  parent reply	other threads:[~2022-02-24  2:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-01  0:12 [RFC 0/2] vhost: support async dequeue data path xuan.ding
2022-01-01  0:12 ` [RFC 1/2] vhost: support async dequeue for split ring xuan.ding
2022-01-01  0:12 ` [RFC 2/2] examples/vhost: support async dequeue data path xuan.ding
2022-02-24 11:03 ` xuan.ding [this message]
2022-02-24 11:03   ` [RFC,v2 1/2] vhost: support async dequeue for split ring xuan.ding
2022-02-24 11:04   ` [RFC,v2 2/2] examples/vhost: support async dequeue data path xuan.ding
2022-03-10  6:54 ` [RFC,v3 0/2] vhost: " xuan.ding
2022-03-10  6:54   ` [RFC,v3 1/2] vhost: support async dequeue for split ring xuan.ding
2022-03-31  9:15     ` Maxime Coquelin
2022-03-31 11:20       ` Ding, Xuan
2022-03-10  6:54   ` [RFC,v3 2/2] examples/vhost: support async dequeue data path xuan.ding

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=20220224110400.44670-1-xuan.ding@intel.com \
    --to=xuan.ding@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=cheng1.jiang@intel.com \
    --cc=dev@dpdk.org \
    --cc=jiayu.hu@intel.com \
    --cc=liangma@liangbit.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=sunil.pai.g@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.