[PATCH v5 1/2] vhost: support clear in-flight packets for async dequeue
Maxime Coquelin
maxime.coquelin at redhat.com
Tue Jun 14 15:23:30 CEST 2022
On 6/9/22 19:34, Yuan Wang wrote:
> rte_vhost_clear_queue_thread_unsafe() supports to clear
> in-flight packets for async enqueue only. But after
> supporting async dequeue, this API should support async dequeue too.
>
> This patch also adds the thread-safe version of this API,
> the difference between the two API is that thread safety uses lock.
>
> These APIs maybe used to clean up packets in the async channel
> to prevent packet loss when the device state changes or
> when the device is destroyed.
>
> Signed-off-by: Yuan Wang <yuanx.wang at intel.com>
> ---
> doc/guides/prog_guide/vhost_lib.rst | 8 ++-
> doc/guides/rel_notes/release_22_07.rst | 4 ++
> lib/vhost/rte_vhost_async.h | 25 +++++++
> lib/vhost/version.map | 1 +
> lib/vhost/virtio_net.c | 93 +++++++++++++++++++++++++-
> 5 files changed, 128 insertions(+), 3 deletions(-)
>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
Thanks,
Maxime
More information about the dev
mailing list