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.w...@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.coque...@redhat.com> Thanks, Maxime