From: Intel Date: Tue, 12 Mar 2013 11:03:00 +0000 (+0100) Subject: examples: various changes X-Git-Tag: spdx-start~11272 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4bd1246b75ec6aa77c1e339a91c4c57853b3daab;p=dpdk.git examples: various changes Signed-off-by: Intel --- diff --git a/examples/ipv4_frag/main.c b/examples/ipv4_frag/main.c index 15fc2b7439..5e45afa4d1 100644 --- a/examples/ipv4_frag/main.c +++ b/examples/ipv4_frag/main.c @@ -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++; diff --git a/examples/kni/main.c b/examples/kni/main.c index d1a79574e8..06677e562b 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c @@ -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();