On 6/26/2020 11:09 PM, Honnappa Nagarahalli wrote:
> From: Phil Yang <phil.y...@arm.com>
> 
> Add burst stats for noisy vnf mode.
> 
> Fixes: 3c156061b938 ("app/testpmd: add noisy neighbour forwarding mode")
> Cc: sta...@dpdk.org
> Cc: jfreim...@redhat.com
> 
> Signed-off-by: Phil Yang <phil.y...@arm.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagaraha...@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.w...@arm.com>
> Reviewed-by: Jens Freimann <jfreim...@redhat.com>
> ---
>  app/test-pmd/noisy_vnf.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c
> index 58c4ee925..24f286da6 100644
> --- a/app/test-pmd/noisy_vnf.c
> +++ b/app/test-pmd/noisy_vnf.c
> @@ -154,6 +154,9 @@ pkt_burst_noisy_vnf(struct fwd_stream *fs)
>  
>       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
>       if (unlikely(nb_rx == 0))
>               goto flush;
>       fs->rx_packets += nb_rx;
> @@ -164,6 +167,9 @@ pkt_burst_noisy_vnf(struct fwd_stream *fs)
>                               pkts_burst, nb_rx);
>               if (unlikely(nb_tx < nb_rx) && fs->retry_enabled)
>                       nb_tx += do_retry(nb_rx, nb_tx, pkts_burst, fs);
> +#ifdef RTE_TEST_PMD_RECORD_BURST_STATS
> +             fs->tx_burst_stats.pkt_burst_spread[nb_tx]++;
> +#endif
>               fs->tx_packets += nb_tx;
>               fs->fwd_dropped += drop_pkts(pkts_burst, nb_rx, nb_tx);
>               return;

No objection to add the burst stats to more forwarding engines, but this config
does not exist for the meson and make is going away.

We need to figure out how to support this option with meson before spreading it 
out.

Reply via email to