fix ethdev ports enumeration
[dpdk.git] / examples / vhost / main.c
index 60d862b..0b5221f 100644 (file)
@@ -1477,7 +1477,7 @@ main(int argc, char *argv[])
        }
 
        /* initialize all ports */
-       for (portid = 0; portid < nb_ports; portid++) {
+       RTE_ETH_FOREACH_DEV(portid) {
                /* skip ports that are not enabled */
                if ((enabled_port_mask & (1 << portid)) == 0) {
                        RTE_LOG(INFO, VHOST_PORT,