[dpdk-dev] [PATCH v5 3/3] vhost: add thread unsafe async registeration functions
Xia, Chenbo
chenbo.xia at intel.com
Mon Jul 19 04:27:22 CEST 2021
Hi Jiayu,
> -----Original Message-----
> From: Hu, Jiayu <jiayu.hu at intel.com>
> Sent: Saturday, July 17, 2021 3:51 AM
> To: dev at dpdk.org
> Cc: maxime.coquelin at redhat.com; Xia, Chenbo <chenbo.xia at intel.com>; Hu, Jiayu
> <jiayu.hu at intel.com>
> Subject: [PATCH v5 3/3] vhost: add thread unsafe async registeration functions
>
> This patch adds thread unsafe version for async register and
> unregister functions.
>
> Signed-off-by: Jiayu Hu <jiayu.hu at intel.com>
> ---
> doc/guides/prog_guide/vhost_lib.rst | 14 ++++
> lib/vhost/rte_vhost_async.h | 41 ++++++++++
> lib/vhost/version.map | 4 +
> lib/vhost/vhost.c | 149 +++++++++++++++++++++++++++--------
> -
> 4 files changed, 173 insertions(+), 35 deletions(-)
>
> diff --git a/doc/guides/prog_guide/vhost_lib.rst
> b/doc/guides/prog_guide/vhost_lib.rst
> index 2a61b85..c8638db 100644
> --- a/doc/guides/prog_guide/vhost_lib.rst
> +++ b/doc/guides/prog_guide/vhost_lib.rst
> @@ -256,6 +256,13 @@ The following is an overview of some key Vhost API
> functions:
> vhost invokes this function to get the copy data completed by async
> devices.
>
> +* ``rte_vhost_async_channel_register_thread_unsafe(vid, queue_id, config,
> ops)``
> + Register an async copy device channel for a vhost queue without
> + performing any locking.
> +
> + This function is only safe to call in vhost callback functions
> + (i.e., struct vhost_device_ops).
> +
> * ``rte_vhost_async_channel_unregister(vid, queue_id)``
>
> Unregister the async copy device channel from a vhost queue.
> @@ -268,6 +275,13 @@ The following is an overview of some key Vhost API
> functions:
> devices for all vhost queues in destroy_device(), when a
> virtio device is paused or shut down.
>
> +* ``rte_vhost_async_channel_unregister_thread_unsafe(vid, queue_id)``
We should add a blank line between API name and its description. I will add
them when applying.
With above fixed:
Reviewed-by: Chenbo Xia <chenbo.xia at intel.com>
More information about the dev
mailing list