vhost: support async dequeue data path
Status from this message: Applied to dpdk-next-virtio/main.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v8 Latest5 patches 4 repliesApplied
- v75 patches 2 repliesSuperseded
- v65 patches 2 repliesSuperseded
Earlier versions · 7
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v5 | 5 patches | 2 replies | Superseded | |
| v4 | 5 patches | 9 replies | Applied | |
| v3 posting 2/2 | 5 patches | 6 replies | Superseded | |
| v2 posting 2/2 | 5 patches | 0 replies | Superseded | |
| v3 RFC posting 1/2 | 2 patches | 2 replies | Superseded | |
| v2 RFC posting 1/2 | 2 patches | 0 replies | Superseded | |
| v1 RFC | 2 patches | 0 replies | Superseded |
Changes in v8 from the cover letter
* change dma_id to int16_t
* refine API documentation
Patches in v8 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | vhost: prepare sync for descriptor to mbuf refactoringlib/ | +38 | 0 replies | |
| 2/5 | vhost: prepare async for descriptor to mbuf refactoringlib/ | +14 | 0 replies | |
| 3/5 | vhost: merge sync and async descriptor to mbuf fillinglib/ lib/ | +38 | 0 replies | |
| 4/5 | vhost: support async dequeue for split ringdoc/ doc/ lib/ +2 more | +386 | 3 replies | |
| 5/5 | examples/vhost: support async dequeue data pathdoc/ examples/ examples/ +1 more | +245 | 0 replies |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Yvonne Yang | Maxime Coquelin |
|---|---|---|
| 1/5 | T-b | R-b |
| 2/5 | T-b | R-b |
| 3/5 | T-b | R-b |
| 4/5 | T-b | R-b |
| 5/5 | T-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v8 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 set implements vhost async dequeue data path for split ring. 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
v7->v8:
* change dma_id to int16_t
* refine API documentation
v6->v7:
* correct code formatting
* change some functions to inline
v5->v6:
* adjust EXPERIMENTAL header
v4->v5:
* rebase to latest DPDK
* add some checks
v3->v4:
* fix CI build warnings
* adjust some indentation
* pass vq instead of queue_id
v2->v3:
* fix mbuf not updated correctly for large packets
v1->v2:
* fix a typo
* fix a bug in desc_to_mbuf filling
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 | 6 + doc/guides/rel_notes/release_22_07.rst | 5 + doc/guides/sample_app_ug/vhost.rst | 9 +- examples/vhost/main.c | 286 ++++++++++----- examples/vhost/main.h | 32 +- examples/vhost/virtio_net.c | 16 +- lib/vhost/rte_vhost_async.h | 37 ++ lib/vhost/version.map | 2 +- lib/vhost/vhost.h | 1 + lib/vhost/virtio_net.c | 473 ++++++++++++++++++++++--- 10 files changed, 715 insertions(+), 152 deletions(-)
Signature · 1 line
2.17.1