[ovs-dev] [PATCH 2/3] netdev-dpdk: remove init function

Mark Kavanagh mark.b.kavanagh at intel.com
Mon Dec 15 14:57:09 UTC 2014


From: Rory Sexton <rory.sexton at intel.com>

The sole purpose of the netdev_dpdk's init function is to invoke
rte_eal_pci_probe; as of DPDK 1.8, this function is implicitly
invoked by rte_eal_init, removing the need to call it explicitly.

Signed-off-by: Rory Sexton <rory.sexton at intel.com>
Signed-off-by: Stephen Finucane <stephen.finucane at intel.com>

Reviewed-By: Stephen Finucane <stephen.finucane at intel.com>
Reviewed-By: Ciara Loftus <ciara.loftus at intel.com>
Signed-off-by: Mark Kavanagh <mark.b.kavanagh at intel.com>
---
 lib/netdev-dpdk.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 9ac49c8..9c42756 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -1270,22 +1270,6 @@ dpdk_common_init(void)
     ovs_thread_create("dpdk_watchdog", dpdk_watchdog, NULL);
 }
 
-static int
-dpdk_class_init(void)
-{
-    int result;
-
-    result = rte_eal_pci_probe();
-    if (result) {
-        VLOG_ERR("Cannot probe PCI");
-        return -result;
-    }
-
-    VLOG_INFO("Ethernet Device Count: %d", (int)rte_eth_dev_count());
-
-    return 0;
-}
-
 /* Client Rings */
 
 static int
@@ -1510,7 +1494,7 @@ dpdk_init(int argc, char **argv)
 const struct netdev_class dpdk_class =
     NETDEV_DPDK_CLASS(
         "dpdk",
-        dpdk_class_init,
+        NULL,
         netdev_dpdk_construct,
         netdev_dpdk_set_multiq,
         netdev_dpdk_eth_send);
-- 
1.9.3




More information about the dev mailing list