vhost: support clear in-flight packets for async dequeue
authorYuan Wang <yuanx.wang@intel.com>
Thu, 9 Jun 2022 17:34:03 +0000 (01:34 +0800)
committerMaxime Coquelin <maxime.coquelin@redhat.com>
Fri, 17 Jun 2022 13:19:57 +0000 (15:19 +0200)
commit3753ebf07501fae7e15ae9e654b0641249027181
treea96b8e6dbc91d07dd7b16210e507e940cffefa3e
parent8ba1723783b28178a6c57ea7c499f483c255fbca
vhost: support clear in-flight packets for async dequeue

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@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Jiayu Hu <jiayu.hu@intel.com>
doc/guides/prog_guide/vhost_lib.rst
doc/guides/rel_notes/release_22_07.rst
lib/vhost/rte_vhost_async.h
lib/vhost/version.map
lib/vhost/virtio_net.c