*/
extern uint8_t rte_eth_dev_count(void);
+/**
+ * Function for internal use by dummy drivers primarily, e.g. ring-based
+ * driver.
+ * Allocates a new ethdev slot for an ethernet device and returns the pointer
+ * to that slot for the driver to use.
+ *
+ * @return
+ * - Slot in the rte_dev_devices array for a new device;
+ */
+struct rte_eth_dev *rte_eth_dev_allocate(void);
+
struct eth_driver;
/**
* @internal
*/
extern int rte_ixgbevf_pmd_init(void);
+/**
+ * The initialization function of the driver for Qumranet virtio-net
+ * Ethernet devices.
+ * Invoked once at EAL start time.
+ * @return
+ * 0 on success
+ */
+extern int rte_virtio_pmd_init(void);
+
/**
* The initialization function of *all* supported and enabled drivers.
* Right now, the following PMDs are supported:
}
#endif /* RTE_LIBRTE_IXGBE_PMD */
+#ifdef RTE_LIBRTE_VIRTIO_PMD
+ if ((ret = rte_virtio_pmd_init()) != 0) {
+ RTE_LOG(ERR, PMD, "Cannot init virtio PMD\n");
+ return (ret);
+ }
+#endif /* RTE_LIBRTE_VIRTIO_PMD */
+
if (ret == -ENODEV)
RTE_LOG(ERR, PMD, "No PMD(s) are configured\n");
return (ret);