X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest-pmd%2Ftestpmd.c;h=b39cd639859e679b8447624c94f0e9c21fe68dfb;hb=65eb1e544d61429794598a5ef71a0164eff6288b;hp=dfe64427d765d7a060e57ebfdfee852a4a3469db;hpb=81ef862b51dc416217ca4ac1d0bf894a0baec9cc;p=dpdk.git diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index dfe64427d7..b39cd63985 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -971,7 +971,8 @@ run_pkt_fwd_on_lcore(struct fwd_lcore *fc, packet_fwd_t pkt_fwd) } #endif #ifdef RTE_LIBRTE_LATENCY_STATS - if (latencystats_lcore_id == rte_lcore_id()) + if (latencystats_enabled != 0 && + latencystats_lcore_id == rte_lcore_id()) rte_latencystats_update(); #endif @@ -1779,7 +1780,7 @@ rmv_event_callback(void *arg) if (da->type == RTE_DEVTYPE_VIRTUAL) snprintf(name, sizeof(name), "%s", da->virt.drv_name); else if (da->type == RTE_DEVTYPE_WHITELISTED_PCI) - rte_eal_pci_device_name(&da->pci.addr, name, sizeof(name)); + rte_pci_device_name(&da->pci.addr, name, sizeof(name)); printf("removing device %s\n", name); rte_eal_dev_detach(name); dev->state = RTE_ETH_DEV_UNUSED; @@ -2238,8 +2239,13 @@ main(int argc, char** argv) rte_panic("Empty set of forwarding logical cores - check the " "core mask supplied in the command parameters\n"); - /* Bitrate stats disabled by default */ + /* Bitrate/latency stats disabled by default */ +#ifdef RTE_LIBRTE_BITRATE bitrate_enabled = 0; +#endif +#ifdef RTE_LIBRTE_LATENCY_STATS + latencystats_enabled = 0; +#endif argc -= diag; argv += diag;