]> git.droids-corp.org - dpdk.git/commitdiff
vhost: add hint on how to add or remove device to a data core
authorBenoît Canet <benoit.canet@nodalink.com>
Fri, 27 Feb 2015 10:22:45 +0000 (11:22 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 17 Mar 2015 11:39:52 +0000 (12:39 +0100)
Let's make sure people will not forget to set and unset VIRTIO_DEV_RUNNING.

Signed-off-by: Benoît Canet <benoit.canet@nodalink.com>
Acked-by: Huawei Xie <huawei.xie@intel.com>
doc/guides/prog_guide/vhost_lib.rst
lib/librte_vhost/rte_virtio_net.h

index 0b6eda7836d438d5c4d3b60cef0a5dc73970c208..ba6065da0cc8ec9cfbf13e09e3daba98cdee6fe5 100644 (file)
@@ -58,7 +58,8 @@ Vhost API Overview
       register two callbacks, new_destory and destroy_device.
       When virtio device is activated or deactivated by guest virtual machine,
       the callback will be called, then vSwitch could put the device onto data
-      core or remove the device from data core.
+      core or remove the device from data core by setting or unsetting
+      VIRTIO_DEV_RUNNING on the device flags.
 
 *   Read/write packets from/to guest virtual machine
 
index 2fc1c448f28cfed2b31e4eb92c3c39cf0bfeddc2..b79bd0b76bc33a967bcf8a900ce8b1bfb5365f75 100644 (file)
@@ -130,6 +130,10 @@ struct virtio_memory {
 
 /**
  * Device operations to add/remove device.
+ *
+ * Make sure to set VIRTIO_DEV_RUNNING to the device flags in new_device and
+ * remove it in destroy_device.
+ *
  */
 struct virtio_net_device_ops {
        int (*new_device)(struct virtio_net *); /**< Add device. */