]> git.droids-corp.org - dpdk.git/blobdiff - examples/vmdq_dcb/main.c
fix ethdev ports enumeration
[dpdk.git] / examples / vmdq_dcb / main.c
index bfe72f8c876d63da59e81a362913a362f33f6f89..2016a957165d7876aa0eb6cd0cecdabe4113a93f 100644 (file)
@@ -662,7 +662,7 @@ main(int argc, char *argv[])
                rte_exit(EXIT_FAILURE, "Cannot create mbuf pool\n");
 
        /* 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) {
                        printf("\nSkipping disabled port %d\n", portid);