[dpdk-dev] [PATCH v2] vhost: allow to check in-flight packets for async vhost

Maxime Coquelin maxime.coquelin at redhat.com
Wed Jul 7 11:21:53 CEST 2021



On 7/7/21 1:54 PM, Jiayu Hu wrote:
> This patch allows to check the amount of in-flight packets
> for vhost queues which register async channel acceleration.
> 
> Signed-off-by: Jiayu Hu <jiayu.hu at intel.com>
> ---
> v2:
> * use DEBUG log level
> * return -1 when async is not registered
> 
>  doc/guides/prog_guide/vhost_lib.rst |  5 +++++
>  lib/vhost/rte_vhost_async.h         | 14 ++++++++++++++
>  lib/vhost/version.map               |  3 +++
>  lib/vhost/vhost.c                   | 33 +++++++++++++++++++++++++++++++++
>  4 files changed, 55 insertions(+)
> 
> diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
> index d18fb98..9fdc6d5 100644
> --- a/doc/guides/prog_guide/vhost_lib.rst
> +++ b/doc/guides/prog_guide/vhost_lib.rst
> @@ -281,6 +281,11 @@ The following is an overview of some key Vhost API functions:
>    Poll enqueue completion status from async data path. Completed packets
>    are returned to applications through ``pkts``.
>  
> +* ``rte_vhost_async_get_inflight(vid, queue_id)``
> +
> +  This function returns the amount of in-flight packets by now for the
> +  vhost queue which registers async channel acceleration.

What about:

"
This function returns the amount of in-flight packets for the Vhost
queue using async acceleration.
"

Other than that, it looks good to me:
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime



More information about the dev mailing list