]> git.droids-corp.org - dpdk.git/blobdiff - examples/ptpclient/ptpclient.c
fix ethdev ports enumeration
[dpdk.git] / examples / ptpclient / ptpclient.c
index 83821eb8d7a0175d7b77a4e85efbb4306ac008a2..ad98a392f88c8f5fef222cfb3c1934e9894d36dc 100644 (file)
@@ -737,7 +737,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) {
                if ((ptp_enabled_port_mask & (1 << portid)) != 0) {
                        if (port_init(portid, mbuf_pool) == 0) {
                                ptp_enabled_ports[ptp_enabled_port_nb] = portid;