ixgbevf: convert to use of PMD_REGISTER_DRIVER and fix linking
[dpdk.git] / lib / librte_pmd_ixgbe / ixgbe_ethdev.c
index a5a7f9a..c9b5fe4 100644 (file)
@@ -58,6 +58,7 @@
 #include <rte_ethdev.h>
 #include <rte_atomic.h>
 #include <rte_malloc.h>
+#include <rte_dev.h>
 
 #include "ixgbe_logs.h"
 #include "ixgbe/ixgbe_api.h"
@@ -955,8 +956,8 @@ static struct eth_driver rte_ixgbevf_pmd = {
  * Invoked once at EAL init time.
  * Register itself as the [Poll Mode] Driver of PCI IXGBE devices.
  */
-int
-rte_ixgbe_pmd_init(void)
+static int
+rte_ixgbe_pmd_init(const char *name __rte_unused, const char *params __rte_unused)
 {
        PMD_INIT_FUNC_TRACE();
 
@@ -969,8 +970,8 @@ rte_ixgbe_pmd_init(void)
  * Invoked one at EAL init time.
  * Register itself as the [Virtual Poll Mode] Driver of PCI niantic devices.
  */
-int
-rte_ixgbevf_pmd_init(void)
+static int
+rte_ixgbevf_pmd_init(const char *name __rte_unused, const char *param __rte_unused)
 {
        DEBUGFUNC("rte_ixgbevf_pmd_init");
 
@@ -1966,7 +1967,7 @@ ixgbe_dev_link_status_print(struct rte_eth_dev *dev)
 }
 
 /*
- * It executes link_update after knowing an interrupt occured.
+ * It executes link_update after knowing an interrupt occurred.
  *
  * @param dev
  *  Pointer to struct rte_eth_dev.
@@ -3060,3 +3061,16 @@ ixgbe_mirror_rule_reset(struct rte_eth_dev *dev, uint8_t rule_id)
 
        return 0;
 }
+
+static struct rte_driver rte_ixgbe_driver = {
+       .type = PMD_PDEV,
+       .init = rte_ixgbe_pmd_init,
+};
+
+static struct rte_driver rte_ixgbevf_driver = {
+       .type = PMD_PDEV,
+       .init = rte_ixgbevf_pmd_init,
+};
+
+PMD_REGISTER_DRIVER(rte_ixgbe_driver);
+PMD_REGISTER_DRIVER(rte_ixgbevf_driver);