From: Phil Yang Date: Tue, 14 Jul 2020 21:51:07 +0000 (-0500) Subject: app/testpmd: enable burst stats for noisy VNF mode X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=059a231080aad94c8a1cc920d0bda673f4a92898;p=dpdk.git app/testpmd: enable burst stats for noisy VNF mode Add burst stats for noisy VNF mode. Fixes: 3c156061b938 ("app/testpmd: add noisy neighbour forwarding mode") Cc: stable@dpdk.org Signed-off-by: Dharmik Thakkar Signed-off-by: Phil Yang Reviewed-by: Honnappa Nagarahalli Reviewed-by: Ruifeng Wang Reviewed-by: Ferruh Yigit --- diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c index 58c4ee9255..382a4c2aae 100644 --- a/app/test-pmd/noisy_vnf.c +++ b/app/test-pmd/noisy_vnf.c @@ -154,6 +154,7 @@ 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); + inc_rx_burst_stats(fs, nb_rx); if (unlikely(nb_rx == 0)) goto flush; fs->rx_packets += nb_rx; @@ -164,6 +165,7 @@ 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); + inc_tx_burst_stats(fs, nb_tx); fs->tx_packets += nb_tx; fs->fwd_dropped += drop_pkts(pkts_burst, nb_rx, nb_tx); return; @@ -187,6 +189,7 @@ pkt_burst_noisy_vnf(struct fwd_stream *fs) nb_deqd); if (unlikely(nb_tx < nb_rx) && fs->retry_enabled) nb_tx += do_retry(nb_rx, nb_tx, tmp_pkts, fs); + inc_tx_burst_stats(fs, nb_tx); fs->fwd_dropped += drop_pkts(tmp_pkts, nb_deqd, nb_tx); } } @@ -211,6 +214,7 @@ flush: tmp_pkts, nb_deqd); if (unlikely(sent < nb_deqd) && fs->retry_enabled) nb_tx += do_retry(nb_rx, nb_tx, tmp_pkts, fs); + inc_tx_burst_stats(fs, nb_tx); fs->fwd_dropped += drop_pkts(tmp_pkts, nb_deqd, sent); ncf->prev_time = rte_get_timer_cycles(); }