[6/6] app/testpmd: enable empty polls in 5tswap
diff mbox series

Message ID 20200714215108.22437-7-dharmik.thakkar@arm.com
State Deferred
Delegated to: Ferruh Yigit
Headers show
Series
  • app/testpmd: add runtime config
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/travis-robot success Travis build: passed
ci/checkpatch success coding style OK

Commit Message

Dharmik Thakkar July 14, 2020, 9:51 p.m. UTC
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>
---
 app/test-pmd/5tswap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Phil Yang July 15, 2020, 4:29 a.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Dharmik Thakkar
> Sent: Wednesday, July 15, 2020 5:51 AM
> To: Wenzhuo Lu <wenzhuo.lu@intel.com>; Beilei Xing
> <beilei.xing@intel.com>; Bernard Iremonger <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; nd <nd@arm.com>; Dharmik Thakkar
> <Dharmik.Thakkar@arm.com>
> Subject: [dpdk-dev] [PATCH 6/6] app/testpmd: enable empty polls in 5tswap
> 
> 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>

Patch
diff mbox series

diff --git a/app/test-pmd/5tswap.c b/app/test-pmd/5tswap.c
index d9026ce86556..3cf1692eaba8 100644
--- a/app/test-pmd/5tswap.c
+++ b/app/test-pmd/5tswap.c
@@ -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);