]> git.droids-corp.org - dpdk.git/commitdiff
vdev: add virtual device struct
authorJan Blunck <jblunck@infradead.org>
Tue, 11 Apr 2017 15:44:09 +0000 (17:44 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 14 Apr 2017 13:23:29 +0000 (15:23 +0200)
This adds the rte_vdev_device structure which embeds a generic rte_device.

Signed-off-by: Jan Blunck <jblunck@infradead.org>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
lib/librte_eal/common/eal_common_vdev.c
lib/librte_eal/common/include/rte_vdev.h

index c255073a05e05a0c21398130e08225f6cc5d0709..e3a75fdff98a958aa781ec2521a989a134f150b1 100644 (file)
 #include <rte_common.h>
 #include <rte_devargs.h>
 
+/** Double linked list of virtual device drivers. */
+TAILQ_HEAD(vdev_device_list, rte_vdev_device);
+
+static struct vdev_device_list vdev_device_list =
+       TAILQ_HEAD_INITIALIZER(vdev_device_list);
 struct vdev_driver_list vdev_driver_list =
        TAILQ_HEAD_INITIALIZER(vdev_driver_list);
 
index 784e837d1071c1e52cf0b112e498c854fbc09e55..8f98372e830123f9a0d9a8f6a8166a68ce17f0a1 100644 (file)
@@ -40,6 +40,11 @@ extern "C" {
 #include <sys/queue.h>
 #include <rte_dev.h>
 
+struct rte_vdev_device {
+       TAILQ_ENTRY(rte_vdev_device) next;      /**< Next attached vdev */
+       struct rte_device device;               /**< Inherit core device */
+};
+
 /** Double linked list of virtual device drivers. */
 TAILQ_HEAD(vdev_driver_list, rte_vdev_driver);