X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_pmd_perf.c;h=48e16c954dab751fefc3fe172a7ea2c65f59a695;hb=e45ae7065e92ade35d6a3883a986a4210c78cc24;hp=ef9262c3ba665c87005bc0182f5aa078f1e2e372;hpb=71f39b07b6856c5f7d1c1aae8e9e5866d2a9a974;p=dpdk.git diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index ef9262c3ba..48e16c954d 100644 --- a/app/test/test_pmd_perf.c +++ b/app/test/test_pmd_perf.c @@ -343,11 +343,8 @@ stats_display(uint8_t port_id) printf(" RX-packets: %-10"PRIu64" RX-missed: %-10"PRIu64" RX-bytes: " "%-"PRIu64"\n", stats.ipackets, stats.imissed, stats.ibytes); - printf(" RX-badcrc: %-10"PRIu64" RX-badlen: %-10"PRIu64" RX-errors: " - "%-"PRIu64"\n", - stats.ibadcrc, stats.ibadlen, stats.ierrors); - printf(" RX-nombuf: %-10"PRIu64"\n", - stats.rx_nombuf); + printf(" RX-errors: %-10"PRIu64" RX-nombuf: %-10"PRIu64"\n", + stats.ierrors, stats.rx_nombuf); printf(" TX-packets: %-10"PRIu64" TX-errors: %-10"PRIu64" TX-bytes: " "%-"PRIu64"\n", stats.opackets, stats.oerrors, stats.obytes); @@ -629,7 +626,10 @@ timeout: rte_free(pkts_burst); - return diff_tsc / total; + if (total > 0) + return diff_tsc / total; + else + return -1; } static int @@ -676,8 +676,10 @@ exec_burst(uint32_t flags, int lcore) /* wait for polling finished */ diff_tsc = rte_eal_wait_lcore(lcore); - if (diff_tsc < 0) + if (diff_tsc < 0) { + printf("exec_burst: Failed to measure cycles per packet\n"); return -1; + } printf("Result: %d cycles per packet\n", diff_tsc); @@ -814,7 +816,8 @@ test_pmd_perf(void) return -1; } else if (sc_flag == SC_BURST_POLL_FIRST || sc_flag == SC_BURST_XMIT_FIRST) - exec_burst(sc_flag, slave_id); + if (exec_burst(sc_flag, slave_id) < 0) + return -1; /* port tear down */ for (portid = 0; portid < nb_ports; portid++) {