app/testpmd: count empty polls in 5-tuple swap engine
authorDharmik Thakkar <dharmik.thakkar@arm.com>
Tue, 14 Jul 2020 21:51:08 +0000 (16:51 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:08 +0000 (18:55 +0200)
Enable empty polls in burst stats within 5tswap.c

Signed-off-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/5tswap.c

index d9026ce..3cf1692 100644 (file)
@@ -114,11 +114,10 @@ pkt_burst_5tuple_swap(struct fwd_stream *fs)
         */
        nb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,
                                 nb_pkt_per_burst);
+       inc_rx_burst_stats(fs, nb_rx);
        if (unlikely(nb_rx == 0))
                return;
 
-       inc_rx_burst_stats(fs, nb_rx);
-
        fs->rx_packets += nb_rx;
        txp = &ports[fs->tx_port];
        ol_flags = ol_flags_init(txp->dev_conf.txmode.offloads);