aboutsummaryrefslogtreecommitdiffstats
path: root/test/test/test_pmd_ring.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test/test_pmd_ring.c')
-rw-r--r--test/test/test_pmd_ring.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test/test_pmd_ring.c b/test/test/test_pmd_ring.c
index 4b891014..21962012 100644
--- a/test/test/test_pmd_ring.c
+++ b/test/test/test_pmd_ring.c
@@ -399,7 +399,7 @@ test_pmd_ring(void)
int port, cmdl_port0 = -1;
uint8_t nb_ports;
- nb_ports = rte_eth_dev_count();
+ nb_ports = rte_eth_dev_count_avail();
printf("nb_ports=%d\n", (int)nb_ports);
/* create the rings and eth_rings in the test code.
@@ -473,7 +473,7 @@ test_pmd_ring(void)
return -1;
/* find a port created with the --vdev=net_ring0 command line option */
- for (port = 0; port < nb_ports; port++) {
+ RTE_ETH_FOREACH_DEV(port) {
struct rte_eth_dev_info dev_info;
rte_eth_dev_info_get(port, &dev_info);