Skip to content

vhost: support async dequeue data path

[email protected] dpdk-dev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Changes in v1 from the cover letter

* add sync and async path descriptor to mbuf refactoring
* add API description in docs

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5vhost: prepare sync for descriptor to mbuf refactoringlib/vhost/virtio_net.c+29 -370 replies
2/5vhost: prepare async for descriptor to mbuf refactoringlib/vhost/virtio_net.c+15 -80 replies
3/5vhost: merge sync and async descriptor to mbuf fillinglib/vhost/vhost.h lib/vhost/virtio_net.c+37 -110 replies
4/5vhost: support async dequeue for split ringdoc/guides/prog_guide/vhost_lib.rst doc/guides/rel_notes/release_22_07.rst lib/vhost/rte_vhost_async.h +2 more+382 -00 replies
5/5examples/vhost: support async dequeue data pathdoc/guides/sample_app_ug/vhost.rst examples/vhost/main.c examples/vhost/main.h +1 more+254 -980 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMaxime CoquelinYvonne Yang
SeriesR-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b R-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b T-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/5] vhost: support async dequeue data path

From: Xuan Ding <[email protected]>

The presence of asynchronous path allows applications to offload memory copies to DMA engine, so as to save CPU cycles and improve the copy performance. This patch implements vhost async dequeue data path for split ring.

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 v3 -> v1:
* add sync and async path descriptor to mbuf refactoring
* add API description in docs

RFC v2 -> RFC v3:
* rebase to latest DPDK version

RFC v1 -> RFC 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 (5):
vhost: prepare sync for descriptor to mbuf refactoring
vhost: prepare async for descriptor to mbuf refactoring
vhost: merge sync and async descriptor to mbuf filling
vhost: support async dequeue for split ring examples/vhost: support async dequeue data path

 doc/guides/prog_guide/vhost_lib.rst    |   7 +
 doc/guides/rel_notes/release_22_07.rst |   4 +
 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                  |   3 +
 lib/vhost/vhost.h                      |   1 +
 lib/vhost/virtio_net.c                 | 459 ++++++++++++++++++++++---
 10 files changed, 711 insertions(+), 148 deletions(-)
Signature · 1 line
2.17.1