X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fvm_power_manager%2Fchannel_monitor.c;h=73bddd9936222c85c53c4c8b43c583a2fa274b18;hb=aed545af1b5ed6b7baa2eb41bad63486d6c95226;hp=1c7b6eb2dd6ce51b118c64b1fc5dd05908a1a434;hpb=3998e2a07220844d3f3c17f76a781ced3efe0de0;p=dpdk.git diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c index 1c7b6eb2dd..73bddd9936 100644 --- a/examples/vm_power_manager/channel_monitor.c +++ b/examples/vm_power_manager/channel_monitor.c @@ -110,12 +110,11 @@ static int get_pfid(struct policy *pol) { - int i, x, ret = 0, nb_ports; + int i, x, ret = 0; - nb_ports = rte_eth_dev_count(); for (i = 0; i < pol->pkt.nb_mac_to_monitor; i++) { - for (x = 0; x < nb_ports; x++) { + RTE_ETH_FOREACH_DEV(x) { ret = rte_pmd_i40e_query_vfid_by_mac(x, (struct ether_addr *)&(pol->pkt.vfid[i])); if (ret != -EINVAL) {