examples: various changes
authorIntel <intel.com>
Tue, 12 Mar 2013 11:03:00 +0000 (12:03 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 25 Jul 2013 14:07:52 +0000 (16:07 +0200)
Signed-off-by: Intel
examples/ipv4_frag/main.c
examples/kni/main.c

index 15fc2b7..5e45afa 100644 (file)
@@ -639,10 +639,10 @@ MAIN(int argc, char **argv)
                       qconf->n_rx_queue == (unsigned)rx_queue_per_lcore) {
 
                        rx_lcore_id ++;
-                       qconf = &lcore_queue_conf[rx_lcore_id];
-
                        if (rx_lcore_id >= RTE_MAX_LCORE)
                                rte_exit(EXIT_FAILURE, "Not enough cores\n");
+
+                       qconf = &lcore_queue_conf[rx_lcore_id];
                }
                qconf->rx_queue_list[qconf->n_rx_queue] = portid;
                qconf->n_rx_queue++;
index d1a7957..06677e5 100644 (file)
@@ -727,18 +727,9 @@ main(int argc, char** argv)
        }
 
        /* Initialise PMD driver(s) */
-#ifdef RTE_LIBRTE_IGB_PMD
-       ret = rte_igb_pmd_init();
+       ret = rte_pmd_init_all();
        if (ret < 0)
-               rte_exit(EXIT_FAILURE, "Could not initialise igb PMD (%d)",
-                                                                       ret);
-#endif
-#ifdef RTE_LIBRTE_IXGBE_PMD
-       ret = rte_ixgbe_pmd_init();
-       if (ret < 0)
-               rte_exit(EXIT_FAILURE, "Could not initialise ixgbe PMD (%d)",
-                                                                       ret);
-#endif
+               rte_exit(EXIT_FAILURE, "Could not initialise PMD (%d)", ret);
 
        /* Scan PCI bus for recognised devices */
        ret = rte_eal_pci_probe();