Thread (49 messages) 49 messages, 4 authors, 2021-07-21

Re: [dpdk-dev] [PATCH v5 3/3] vhost: add thread unsafe async registeration functions

From: Xia, Chenbo <hidden>
Date: 2021-07-19 02:27:29

Hi Jiayu,
quoted hunk ↗ jump to hunk
-----Original Message-----
From: Hu, Jiayu <redacted>
Sent: Saturday, July 17, 2021 3:51 AM
To: dev@dpdk.org
Cc: maxime.coquelin@redhat.com; Xia, Chenbo <redacted>; Hu, Jiayu
[off-list ref]
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 <redacted>
---
 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 <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help