]> git.droids-corp.org - dpdk.git/commitdiff
ethdev: remove rte_pmd_init_all function
authorNeil Horman <nhorman@tuxdriver.com>
Mon, 21 Apr 2014 14:59:39 +0000 (10:59 -0400)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 20 May 2014 12:28:26 +0000 (14:28 +0200)
Now that we've converted all the pmds in dpdk to use the driver registration
macro, rte_pmd_init_all has become empty.  As theres no reason to keep it around
anymore, just remove it and fix up all the eample callers.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
25 files changed:
app/test-pmd/testpmd.c
app/test/test_kni.c
examples/exception_path/main.c
examples/ip_reassembly/main.c
examples/ipv4_frag/main.c
examples/ipv4_multicast/main.c
examples/kni/main.c
examples/l2fwd-ivshmem/host/host.c
examples/l2fwd/main.c
examples/l3fwd-power/main.c
examples/l3fwd-vf/main.c
examples/l3fwd/main.c
examples/link_status_interrupt/main.c
examples/load_balancer/init.c
examples/multi_process/client_server_mp/shared/init_drivers.h
examples/multi_process/l2fwd_fork/main.c
examples/multi_process/symmetric_mp/main.c
examples/netmap_compat/bridge/bridge.c
examples/qos_meter/main.c
examples/qos_sched/init.c
examples/quota_watermark/qw/init.c
examples/vhost/main.c
examples/vhost_xen/main.c
examples/vmdq/main.c
lib/librte_ether/rte_ethdev.h

index bb4972c38f9afdb26e5cff9bc7a6d9a5ec533aa8..bc3830520cd96f3bf9e08058c8b03d61931ec2c9 100644 (file)
@@ -1806,9 +1806,6 @@ main(int argc, char** argv)
        if (diag < 0)
                rte_panic("Cannot init EAL\n");
 
-       if (rte_pmd_init_all())
-               rte_panic("Cannot init PMD\n");
-
        if (rte_eal_pci_probe())
                rte_panic("Cannot probe PCI\n");
 
index e0fe44ef35c8e8d44b6d5c492aeda8c69b8fd568..d37758bbce51eb7db736ecfa2b8079b7e98ce4f5 100644 (file)
@@ -509,11 +509,6 @@ test_kni(void)
                printf("fail to create mempool for kni\n");
                return -1;
        }
-       ret = rte_pmd_init_all();
-       if (ret < 0) {
-               printf("fail to initialize PMD\n");
-               return -1;
-       }
        ret = rte_eal_pci_probe();
        if (ret < 0) {
                printf("fail to probe PCI devices\n");
index 0bc149dacc40ff6c0e88346db7d136de5cb2bd2c..d73b4133446b05850124d23c76110eb5a704783c 100644 (file)
@@ -566,11 +566,6 @@ main(int argc, char** argv)
                return -1;
        }
 
-       /* Initialise PMD driver(s) */
-       ret = rte_pmd_init_all();
-       if (ret < 0)
-               FATAL_ERROR("Could not probe PMD (%d)", ret);
-
        /* Scan PCI bus for recognised devices */
        ret = rte_eal_pci_probe();
        if (ret < 0)
index 4880a5f5956040da3625b1f15cf30b5c34771ce0..bafa8d95d794e4f9608cd590c4637f7fd33793dc 100644 (file)
@@ -1553,10 +1553,6 @@ MAIN(int argc, char **argv)
                rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
 
 
-       /* init driver(s) */
-       if (rte_pmd_init_all() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
 
index 93664c878b98e573e2ac2b21cc8354c9db24289e..329f2ce112ab7326e9adf9b3d64f87ebe8c440cb 100644 (file)
@@ -608,10 +608,6 @@ MAIN(int argc, char **argv)
        if (pool_indirect == NULL)
                rte_panic("Cannot init indirect mbuf pool\n");
 
-       /* init driver */
-       if (rte_pmd_init_all() < 0)
-               rte_panic("Cannot init PMD\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_panic("Cannot probe PCI\n");
 
index 3bd37e4814dc77e7baba3b304a57e57b82d809ea..da4e09dba01d69fce9ef96e7e55e79a5d9fc871a 100644 (file)
@@ -753,10 +753,6 @@ MAIN(int argc, char **argv)
        if (clone_pool == NULL)
                rte_exit(EXIT_FAILURE, "Cannot init clone mbuf pool\n");
 
-       /* init driver */
-       if (rte_pmd_init_all() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
 
index 274990b31942adedb7ce4991c3f055785c196ee0..fe823b34d34a9dd44489dc0fa805463196424c3e 100644 (file)
@@ -889,11 +889,6 @@ main(int argc, char** argv)
                return -1;
        }
 
-       /* Initialise PMD driver(s) */
-       ret = rte_pmd_init_all();
-       if (ret < 0)
-               rte_exit(EXIT_FAILURE, "Could not initialise PMD (%d)\n", ret);
-
        /* Scan PCI bus for recognised devices */
        ret = rte_eal_pci_probe();
        if (ret < 0)
index 8aec7740afc11ae1c03652dcf40c10a69d232647..75eae0e8c5bd0a8573f7bf792d9a342d0c9acd64 100644 (file)
@@ -716,10 +716,6 @@ int main(int argc, char **argv)
        if (l2fwd_ivshmem_pktmbuf_pool == NULL)
                rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");
 
-       /* init driver(s) */
-       if (rte_pmd_init_all() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
 
index 2d9436661346ed9bddc3ec104e3bc9eae645dfd5..d04e27abd6f6e4feb8a5344c1a529aefaac2e144 100644 (file)
@@ -615,10 +615,6 @@ MAIN(int argc, char **argv)
        if (l2fwd_pktmbuf_pool == NULL)
                rte_exit(EXIT_FAILURE, "Cannot init mbuf pool\n");
 
-       /* init driver(s) */
-       if (rte_pmd_init_all() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
 
index 219f802cd1c25fefca613532647db21093a2bd95..598b7a249e6f3b46b30c58fb8d2db0ae146aeeaa 100644 (file)
@@ -1547,10 +1547,6 @@ MAIN(int argc, char **argv)
                rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
 
 
-       /* init driver(s) */
-       if (rte_pmd_init_all() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
 
index fb811fad335b80c91836df906fa73c33960459bc..793caccc93039282eaf2861785a7a8ef226ccc5e 100644 (file)
@@ -1007,10 +1007,6 @@ MAIN(int argc, char **argv)
        if (ret < 0)
                rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
 
-       /* init driver */
-       if (rte_pmd_init_all() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
 
index 1ba4ca2d3c13c661c4a3d7112518ed2070fd263a..8ee1af96fa865cfeecd07c20ecafb6271f752137 100755 (executable)
@@ -1841,10 +1841,6 @@ MAIN(int argc, char **argv)
                rte_exit(EXIT_FAILURE, "init_lcore_rx_queues failed\n");
 
 
-       /* init driver(s) */
-       if (rte_pmd_init_all() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
 
index de6c87f8d0b08a80945cb00944aeb83b8a03602c..8d17b0199db4be7838af31d58a79d5f9f2173553 100644 (file)
@@ -663,10 +663,6 @@ MAIN(int argc, char **argv)
        if (lsi_pktmbuf_pool == NULL)
                rte_panic("Cannot init mbuf pool\n");
 
-       /* init driver(s) */
-       if (rte_pmd_init_all() < 0)
-               rte_panic("Cannot init pmd\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_panic("Cannot probe PCI\n");
 
index 6a2f21853c36889a4fe0ab93f140f997a0768ac6..e997238aa97fe0e26565bc9bd6a9bc5fba8c8f8c 100644 (file)
@@ -450,12 +450,6 @@ app_init_nics(void)
        int ret;
        uint32_t n_rx_queues, n_tx_queues;
 
-       /* Init driver */
-       printf("Initializing the PMD driver ...\n");
-       if (rte_pmd_init_all() < 0) {
-               rte_panic("Cannot init PMD\n");
-       }
-
        if (rte_eal_pci_probe() < 0) {
                rte_panic("Cannot probe PCI\n");
        }
index afa03bd569f1908f081f0e79f20d230a42a35c04..5d9a90f9ace0bf2b04f3dc52c9243110873b1bba 100644 (file)
@@ -40,7 +40,7 @@
 static inline int
 init_drivers(void)
 {
-       if (rte_pmd_init_all() < 0 || rte_eal_pci_probe() < 0)
+       if (rte_eal_pci_probe() < 0)
                return -1;
 
        return 0;
index 3dd2b2a0d65d33de9bc91a8b46f356d403030b21..a34f420bbc86c5ce4b449242777a91b94eab4c6c 100644 (file)
@@ -1050,10 +1050,6 @@ MAIN(int argc, char **argv)
        for (i = 0; i < RTE_MAX_LCORE; i++)
                lcore_resource[i].lcore_id = i;
        
-       /* init driver(s) */
-       if (rte_pmd_init_all() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
 
index 12fa28d6a2a98bb2d4a00f1d272dc7c9a07eaf5f..028f98d43d56085301a5ccd9216ad82fcac8d8c6 100644 (file)
@@ -463,8 +463,6 @@ main(int argc, char **argv)
 
        /* probe to determine the NIC devices available */
        proc_type = rte_eal_process_type();
-       if (rte_pmd_init_all() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init pmd\n");
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
        if (rte_eth_dev_count() == 0)
index ecf5757651039337c8930d5d69cc72196c56f4af..e0cef5796c3626536789c547a9b1dcbaa334978a 100644 (file)
@@ -294,10 +294,6 @@ int main(int argc, char *argv[])
        if (ports.num == 0)
                rte_exit(EXIT_FAILURE, "no ports specified\n");
 
-       err = rte_pmd_init_all();
-       if (err < 0)
-               rte_exit(EXIT_FAILURE, "rte_pmd_init_all(): error %d\n", err);
-
        err = rte_eal_pci_probe();
        if (err < 0)
                rte_exit(EXIT_FAILURE, "rte_eal_pci_probe(): error %d\n", err);
index bc767034c2dd5f2fa56f68e4ecbafa4b5e72e5b7..e1698cc751512c17262c38216328c8598edb0c1c 100755 (executable)
@@ -386,10 +386,6 @@ MAIN(int argc, char **argv)
        if (pool == NULL)
                rte_exit(EXIT_FAILURE, "Buffer pool creation error\n");
 
-       /* PMD init */
-       if (rte_pmd_init_all() < 0)
-               rte_exit(EXIT_FAILURE, "PMD init error\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "PCI probe error\n");
 
index 7c5c62e148b291a09e77906895647cf3a030736b..e0218157b30ec7991d24eb942ccc72ca59b66345 100755 (executable)
@@ -305,10 +305,6 @@ int app_init(void)
        char ring_name[MAX_NAME_LEN];
        char pool_name[MAX_NAME_LEN];
 
-       /* init driver(s) */
-       if (rte_pmd_init_all() < 0)
-               rte_exit(EXIT_FAILURE, "Cannot init PMD\n");
-
        if (rte_eal_pci_probe() < 0)
                rte_exit(EXIT_FAILURE, "Cannot probe PCI\n");
 
index f42eb8b8885d8700da95dd200aeabef75add00f6..44455b20e713e9f27f1ef0f819e6384d81bd895f 100644 (file)
@@ -138,11 +138,6 @@ init_dpdk(void)
 {
     int ret;
 
-    /* Initialize the PMD */
-    ret = rte_pmd_init_all();
-    if (ret < 0)
-        rte_exit(EXIT_FAILURE, "Failed to initialize poll mode drivers (error %d)\n", ret);
-
     /* Bind the drivers to usable devices */
     ret = rte_eal_pci_probe();
     if (ret < 0)
index 816a71a9202e9fb4437e8195685093531625a419..b86d57dcca311510a19858f4faecb361330ce604 100644 (file)
@@ -1657,7 +1657,7 @@ MAIN(int argc, char *argv[])
        if (ret < 0)
                rte_exit(EXIT_FAILURE, "Invalid argument\n");
 
-       if (rte_pmd_init_all() != 0 || rte_eal_pci_probe() != 0)
+       if (rte_eal_pci_probe() != 0)
                rte_exit(EXIT_FAILURE, "Error with NIC driver initialization\n");
 
        for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id ++)
index eafc0aa290c9d9c6205da389ff519589c4399c06..2ec44ee8f92dfcf4f33a839c87c0604176396152 100644 (file)
@@ -1464,7 +1464,7 @@ MAIN(int argc, char *argv[])
        if (ret < 0)
                rte_exit(EXIT_FAILURE, "Invalid argument\n");
 
-       if (rte_pmd_init_all() != 0 || rte_eal_pci_probe() != 0)
+       if (rte_eal_pci_probe() != 0)
                rte_exit(EXIT_FAILURE, "Error with NIC driver initialization\n");
 
        for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id ++)
index fac24aa5b967e9ee567b38d6a6a684f6f16b2638..0f52bdd7635906c50295f4c403dacb7dce671f49 100644 (file)
@@ -597,7 +597,7 @@ MAIN(int argc, char *argv[])
        if (ret < 0)
                rte_exit(EXIT_FAILURE, "Invalid VMDQ argument\n");
 
-       if (rte_pmd_init_all() != 0 || rte_eal_pci_probe() != 0)
+       if (rte_eal_pci_probe() != 0)
                rte_exit(EXIT_FAILURE, "Error with NIC driver initialization\n");
        
        for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id ++) 
index 24288f8f26ece7f58f7706d28052b3ba7add6100..d5ea46b9ff6cf96cddc20f36aedac3fd50db4e99 100644 (file)
@@ -1315,33 +1315,6 @@ struct eth_driver {
  */
 extern void rte_eth_driver_register(struct eth_driver *eth_drv);
 
-/**
- * The initialization function of *all* supported and enabled drivers.
- * Right now, the following PMDs are supported:
- *  - igb
- *  - igbvf
- *  - em
- *  - ixgbe
- *  - ixgbevf
- *  - virtio
- *  - vmxnet3
- * This function is invoked once at EAL start time.
- * @return
- *   0 on success.
- *   Error code of the device initialization failure,
- *   -ENODEV if there are no drivers available
- *   (e.g. if all driver config options are = n).
- */
-static inline
-int rte_pmd_init_all(void)
-{
-       int ret = 0;
-
-       if (ret == -ENODEV)
-               RTE_LOG(ERR, PMD, "No PMD(s) are configured\n");
-       return (ret);
-}
-
 /**
  * Configure an Ethernet device.
  * This function must be invoked first before any other function in the