diff options
Diffstat (limited to 'test/test/test_pmd_perf.c')
-rw-r--r-- | test/test/test_pmd_perf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test/test_pmd_perf.c b/test/test/test_pmd_perf.c index 911dd762..54bc4f6b 100644 --- a/test/test/test_pmd_perf.c +++ b/test/test/test_pmd_perf.c @@ -676,7 +676,7 @@ test_pmd_perf(void) signal(SIGUSR1, signal_handler); signal(SIGUSR2, signal_handler); - nb_ports = rte_eth_dev_count(); + nb_ports = rte_eth_dev_count_avail(); if (nb_ports < NB_ETHPORTS_USED) { printf("At least %u port(s) used for perf. test\n", NB_ETHPORTS_USED); @@ -698,7 +698,7 @@ test_pmd_perf(void) reset_count(); num = 0; - for (portid = 0; portid < nb_ports; portid++) { + RTE_ETH_FOREACH_DEV(portid) { if (socketid == -1) { socketid = rte_eth_dev_socket_id(portid); slave_id = alloc_lcore(socketid); @@ -791,7 +791,7 @@ test_pmd_perf(void) return -1; /* port tear down */ - for (portid = 0; portid < nb_ports; portid++) { + RTE_ETH_FOREACH_DEV(portid) { if (socketid != rte_eth_dev_socket_id(portid)) continue; |