40 #include <sys/queue.h>
44 struct rte_vdev_device {
45 TAILQ_ENTRY(rte_vdev_device) next;
49 static inline const
char *
50 rte_vdev_device_name(const struct rte_vdev_device *dev)
52 if (dev && dev->device.devargs)
57 static inline const char *
58 rte_vdev_device_args(
const struct rte_vdev_device *dev)
60 if (dev && dev->device.devargs)
61 return dev->device.devargs->args;
71 typedef int (rte_vdev_probe_t)(
struct rte_vdev_device *dev);
76 typedef int (rte_vdev_remove_t)(
struct rte_vdev_device *dev);
85 rte_vdev_remove_t *
remove;
106 #define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
107 RTE_INIT(vdrvinitfn_ ##vdrv);\
108 static const char *vdrvinit_ ## nm ## _alias;\
109 static void vdrvinitfn_ ##vdrv(void)\
111 (vdrv).driver.name = RTE_STR(nm);\
112 (vdrv).driver.alias = vdrvinit_ ## nm ## _alias;\
113 rte_vdev_register(&vdrv);\
115 RTE_PMD_EXPORT_NAME(nm, __COUNTER__)
117 #define RTE_PMD_REGISTER_ALIAS(nm, alias)\
118 static const char *vdrvinit_ ## nm ## _alias = RTE_STR(alias)