summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d93c252)
Convert the igbvf pmd driver to use the PMD_REGISTER_DRIVER macro.
This means that the test applications now have no reference to the igbvf library
when building DSO's and must specify its use on the command line with the -d
option. Static linking will still initalize the driver automatically.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
*/
extern void rte_eth_driver_register(struct eth_driver *eth_drv);
*/
extern void rte_eth_driver_register(struct eth_driver *eth_drv);
-/**
- * The initialization function of the driver for 1Gbps Intel IGB_VF
- * Ethernet devices.
- * Invoked once at EAL start time.
- * @return
- * 0 on success
- */
-extern int rte_igbvf_pmd_init(void);
-
/**
* The initialization function of the driver for 10Gbps Intel IXGBE
* Ethernet devices.
/**
* The initialization function of the driver for 10Gbps Intel IXGBE
* Ethernet devices.
-#ifdef RTE_LIBRTE_IGB_PMD
- if ((ret = rte_igbvf_pmd_init()) != 0) {
- RTE_LOG(ERR, PMD, "Cannot init igbvf PMD\n");
- return (ret);
- }
-#endif /* RTE_LIBRTE_IGB_PMD */
-
#ifdef RTE_LIBRTE_IXGBE_PMD
if ((ret = rte_ixgbe_pmd_init()) != 0) {
RTE_LOG(ERR, PMD, "Cannot init ixgbe PMD\n");
#ifdef RTE_LIBRTE_IXGBE_PMD
if ((ret = rte_ixgbe_pmd_init()) != 0) {
RTE_LOG(ERR, PMD, "Cannot init ixgbe PMD\n");
* Invoked one at EAL init time.
* Register itself as the [Virtual Poll Mode] Driver of PCI IGB devices.
*/
* Invoked one at EAL init time.
* Register itself as the [Virtual Poll Mode] Driver of PCI IGB devices.
*/
-int
-rte_igbvf_pmd_init(void)
+static int
+rte_igbvf_pmd_init(const char *name __rte_unused, const char *params __rte_unused)
{
DEBUGFUNC("rte_igbvf_pmd_init");
{
DEBUGFUNC("rte_igbvf_pmd_init");
.init = rte_igb_pmd_init,
};
.init = rte_igb_pmd_init,
};
+static struct rte_driver pmd_igbvf_drv = {
+ .type = PMD_PDEV,
+ .init = rte_igbvf_pmd_init,
+};
+
PMD_REGISTER_DRIVER(pmd_igb_drv);
PMD_REGISTER_DRIVER(pmd_igb_drv);
+PMD_REGISTER_DRIVER(pmd_igbvf_drv);