aboutsummaryrefslogtreecommitdiffstats
path: root/doc/guides/prog_guide/vhost_lib.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/guides/prog_guide/vhost_lib.rst')
-rw-r--r--doc/guides/prog_guide/vhost_lib.rst29
1 files changed, 27 insertions, 2 deletions
diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst
index 59792907..e71bdbd5 100644
--- a/doc/guides/prog_guide/vhost_lib.rst
+++ b/doc/guides/prog_guide/vhost_lib.rst
@@ -110,6 +110,20 @@ The following is an overview of some key Vhost API functions:
of those segments, thus the fewer the segments, the quicker we will get
the mapping. NOTE: we may speed it by using tree searching in future.
+ - ``RTE_VHOST_USER_IOMMU_SUPPORT``
+
+ IOMMU support will be enabled when this flag is set. It is disabled by
+ default.
+
+ Enabling this flag makes possible to use guest vIOMMU to protect vhost
+ from accessing memory the virtio device isn't allowed to, when the feature
+ is negotiated and an IOMMU device is declared.
+
+ However, this feature enables vhost-user's reply-ack protocol feature,
+ which implementation is buggy in Qemu v2.7.0-v2.9.0 when doing multiqueue.
+ Enabling this flag with these Qemu version results in Qemu being blocked
+ when multiple queue pairs are declared.
+
* ``rte_vhost_driver_set_features(path, features)``
This function sets the feature bits the vhost-user driver supports. The
@@ -129,8 +143,7 @@ The following is an overview of some key Vhost API functions:
* ``destroy_device(int vid)``
- This callback is invoked when a virtio device shuts down (or when the
- vhost connection is broken).
+ This callback is invoked when a virtio device is paused or shut down.
* ``vring_state_changed(int vid, uint16_t queue_id, int enable)``
@@ -143,6 +156,18 @@ The following is an overview of some key Vhost API functions:
``VHOST_F_LOG_ALL`` will be set/cleared at the start/end of live
migration, respectively.
+ * ``new_connection(int vid)``
+
+ This callback is invoked on new vhost-user socket connection. If DPDK
+ acts as the server the device should not be deleted before
+ ``destroy_connection`` callback is received.
+
+ * ``destroy_connection(int vid)``
+
+ This callback is invoked when vhost-user socket connection is closed.
+ It indicates that device with id ``vid`` is no longer in use and can be
+ safely deleted.
+
* ``rte_vhost_driver_disable/enable_features(path, features))``
This function disables/enables some features. For example, it can be used to