From: Jan Blunck Date: Tue, 11 Apr 2017 15:44:09 +0000 (+0200) Subject: vdev: add virtual device struct X-Git-Tag: spdx-start~3661 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=6e051f50c9f506e9adcfd7b4cf90cff17137d848;p=dpdk.git vdev: add virtual device struct This adds the rte_vdev_device structure which embeds a generic rte_device. Signed-off-by: Jan Blunck Tested-by: Ferruh Yigit Acked-by: Shreyansh Jain --- diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index c255073a05..e3a75fdff9 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -43,6 +43,11 @@ #include #include +/** 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); diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h index 784e837d10..8f98372e83 100644 --- a/lib/librte_eal/common/include/rte_vdev.h +++ b/lib/librte_eal/common/include/rte_vdev.h @@ -40,6 +40,11 @@ extern "C" { #include #include +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);