app/testpmd: enable empty polls in burst stats
[dpdk.git] / app / test-pmd / macswap.c
index 8428c26..fbe8cb3 100644 (file)
@@ -72,12 +72,12 @@ pkt_burst_mac_swap(struct fwd_stream *fs)
         */
        nb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,
                                 nb_pkt_per_burst);
-       if (unlikely(nb_rx == 0))
-               return;
-
 #ifdef RTE_TEST_PMD_RECORD_BURST_STATS
        fs->rx_burst_stats.pkt_burst_spread[nb_rx]++;
 #endif
+       if (unlikely(nb_rx == 0))
+               return;
+
        fs->rx_packets += nb_rx;
        txp = &ports[fs->tx_port];