examples/performance-thread: convert license to SPDX
[dpdk.git] / examples / l2fwd / main.c
index f8ca29c..6908435 100644 (file)
@@ -545,7 +545,7 @@ main(int argc, char **argv)
        /* convert to number of cycles */
        timer_period *= rte_get_timer_hz();
 
-       nb_ports = rte_eth_dev_count();
+       nb_ports = rte_eth_dev_count_avail();
        if (nb_ports == 0)
                rte_exit(EXIT_FAILURE, "No Ethernet ports - bye\n");