From 9851c4e339b8e20fe8b56d8fb918e139cbbf2ebd Mon Sep 17 00:00:00 2001 From: Xuan Ding Date: Tue, 21 Jun 2022 07:21:31 +0000 Subject: [PATCH] doc: add vhost async enqueue API usage This patch updates the correct usage for async enqueue APIs. The rte_vhost_poll_enqueue_completed() needs to be called in time to notify the guest of completed packets and avoid packet loss. Signed-off-by: Xuan Ding Reviewed-by: Chenbo Xia --- doc/guides/prog_guide/vhost_lib.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index 606edee940..4d68b0e78a 100644 --- a/doc/guides/prog_guide/vhost_lib.rst +++ b/doc/guides/prog_guide/vhost_lib.rst @@ -486,6 +486,14 @@ the same vring with their own DMA virtual channels. Besides, the number of DMA devices is limited. For the purpose of scaling, it's necessary to support sharing DMA channels among vrings. +* Async enqueue API usage + + In async enqueue path, rte_vhost_poll_enqueue_completed() needs to be + called in time to notify the guest of DMA copy completed packets. + Moreover, calling rte_vhost_submit_enqueue_burst() all the time but + not poll completed will cause the DMA ring to be full, which will + result in packet loss eventually. + Recommended IOVA mode in async datapath ---------------------------------------