[2/5] app/testpmd: enable burst stats for flowgen mode rx path

Message ID 20200617144307.9961-2-honnappa.nagarahalli@arm.com
State Superseded
Headers show
Series
  • [1/5] app/testpmd: clock gettime call in throughput calculation
Related show

Commit Message

Honnappa Nagarahalli June 17, 2020, 2:43 p.m.
Enable missing burst stats for rx path for flowgen mode.

Fixes: e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")
Cc: stable@dpdk.org

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

Reviewed-by: Phil Yang <phil.yang@arm.com>

Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>

---
 app/test-pmd/flowgen.c | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.17.1

Comments

Phil Yang June 18, 2020, 2:57 p.m. | #1
> -----Original Message-----

> From: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

> Sent: Wednesday, June 17, 2020 10:43 PM

> To: dev@dpdk.org; Honnappa Nagarahalli

> <Honnappa.Nagarahalli@arm.com>; alialnu@mellanox.com;

> orgerlitz@mellanox.com; wenzhuo.lu@intel.com; beilei.xing@intel.com;

> bernard.iremonger@intel.com

> Cc: hemant.agrawal@nxp.com; jerinj@marvell.com;

> viacheslavo@mellanox.com; thomas@monjalon.net; Ruifeng Wang

> <Ruifeng.Wang@arm.com>; Phil Yang <Phil.Yang@arm.com>; nd

> <nd@arm.com>; stable@dpdk.org

> Subject: [PATCH 2/5] app/testpmd: enable burst stats for flowgen mode rx

> path

> 

> Enable missing burst stats for rx path for flowgen mode.

> 

> Fixes: e9e23a617eb8 ("app/testpmd: add flowgen forwarding engine")

> Cc: stable@dpdk.org

> 

> Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>

> Reviewed-by: Phil Yang <phil.yang@arm.com>

> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>

> ---

Tested-by: Phil Yang <phil.yang@arm.com>

Patch

diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index 4bd351e67..011887c61 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -111,6 +111,10 @@  pkt_burst_flow_gen(struct fwd_stream *fs)
 	/* Receive a burst of packets and discard them. */
 	nb_rx = rte_eth_rx_burst(fs->rx_port, fs->rx_queue, pkts_burst,
 				 nb_pkt_per_burst);
+#ifdef RTE_TEST_PMD_RECORD_BURST_STATS
+	fs->rx_burst_stats.pkt_burst_spread[nb_rx]++;
+#endif
+
 	fs->rx_packets += nb_rx;
 
 	for (i = 0; i < nb_rx; i++)