mbox series

[RFC,0/2] vhost: support async dequeue data path

Message ID 20220101001244.90147-1-xuan.ding@intel.com (mailing list archive)
Headers
Series vhost: support async dequeue data path |

Message

Ding, Xuan Jan. 1, 2022, 12:12 a.m. UTC
  From: Xuan Ding <xuan.ding@intel.com>

Hi everyone,

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
is introduced in 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 dma_vchan)

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

[1] https://mails.dpdk.org/archives/dev/2021-December/231889.html.
[2] https://mails.dpdk.org/archives/dev/2021-September/218591.html.

Your comments are welcomed and appreciated!

Thanks!
Xuan

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              | 305 ++++++++++++------
 examples/vhost/main.h              |  35 +-
 examples/vhost/virtio_net.c        |  16 +-
 lib/vhost/rte_vhost_async.h        |  29 ++
 lib/vhost/version.map              |   1 +
 lib/vhost/vhost.h                  |   1 +
 lib/vhost/virtio_net.c             | 493 +++++++++++++++++++++++++++++
 8 files changed, 783 insertions(+), 106 deletions(-)