From 4bd1246b75ec6aa77c1e339a91c4c57853b3daab Mon Sep 17 00:00:00 2001 From: Intel Date: Tue, 12 Mar 2013 12:03:00 +0100 Subject: [PATCH] examples: various changes Signed-off-by: Intel --- examples/ipv4_frag/main.c | 4 ++-- examples/kni/main.c | 13 ++----------- 2 files changed, 4 insertions(+), 13 deletions(-) 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(); -- 2.20.1