vdev: add virtual device struct

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>
This commit is contained in:
Jan Blunck 2017-04-11 17:44:09 +02:00 committed by Thomas Monjalon
parent 598639950b
commit 6e051f50c9
2 changed files with 10 additions and 0 deletions

View File

@ -43,6 +43,11 @@
#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);

View 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);