From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: Ferruh Yigit <ferruh.yigit@amd.com>,
Aman Singh <aman.deep.singh@intel.com>,
Yuying Zhang <yuying.zhang@intel.com>,
Robin Jarry <rjarry@redhat.com>,
stable@dpdk.org, Kevin Traynor <ktraynor@redhat.com>,
Bernard Iremonger <bernard.iremonger@intel.com>,
Jens Freimann <jfreimann@redhat.com>
Subject: [PATCH v3 4/9] app/testpmd: fix packet transmission in noisy VNF engine
Date: Mon, 20 Feb 2023 19:34:57 +0100 [thread overview]
Message-ID: <20230220183502.3348368-5-david.marchand@redhat.com> (raw)
In-Reply-To: <20230220183502.3348368-1-david.marchand@redhat.com>
nb_rx relates to the number of packets received from the driver.
nb_tx is the total number of packets transmitted by this forward engine.
Fix the retry stage, for dequeued packets, as it was incorrectly
passing nb_rx / nb_tx as bounds of the tmp_pkts[] array, and fix tx stats
accordingly.
Fixes: 3c156061b938 ("app/testpmd: add noisy neighbour forwarding mode")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
app/test-pmd/noisy_vnf.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/noisy_vnf.c b/app/test-pmd/noisy_vnf.c
index ce5a3e5e69..0e72dc034f 100644
--- a/app/test-pmd/noisy_vnf.c
+++ b/app/test-pmd/noisy_vnf.c
@@ -217,9 +217,10 @@ pkt_burst_noisy_vnf(struct fwd_stream *fs)
sent = rte_eth_tx_burst(fs->tx_port, fs->tx_queue,
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);
+ sent += do_retry(nb_deqd, sent, tmp_pkts, fs);
+ inc_tx_burst_stats(fs, sent);
fs->fwd_dropped += drop_pkts(tmp_pkts, nb_deqd, sent);
+ nb_tx += sent;
ncf->prev_time = rte_get_timer_cycles();
}
end:
--
2.39.2
next prev parent reply other threads:[~2023-02-20 18:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230124104742.1265439-1-david.marchand@redhat.com>
2023-01-24 10:47 ` [PATCH 2/6] app/testpmd: don't send unprepared packets David Marchand
2023-02-14 18:14 ` Ferruh Yigit
[not found] ` <20230220164103.3041538-1-david.marchand@redhat.com>
2023-02-20 16:40 ` [PATCH v2 1/9] app/testpmd: fix Tx preparation in checksum engine David Marchand
2023-02-20 16:40 ` [PATCH v2 2/9] app/testpmd: fix packet count in ieee15888 engine David Marchand
2023-02-20 16:40 ` [PATCH v2 4/9] app/testpmd: fix packet transmission in noisy VNF engine David Marchand
[not found] ` <20230220183502.3348368-1-david.marchand@redhat.com>
2023-02-20 18:34 ` [PATCH v3 1/9] app/testpmd: fix Tx preparation in checksum engine David Marchand
2023-02-20 18:34 ` [PATCH v3 2/9] app/testpmd: fix packet count in ieee15888 engine David Marchand
2023-02-24 8:24 ` Singh, Aman Deep
2023-02-20 18:34 ` David Marchand [this message]
2023-02-28 18:51 ` [PATCH v3 4/9] app/testpmd: fix packet transmission in noisy VNF engine Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230220183502.3348368-5-david.marchand@redhat.com \
--to=david.marchand@redhat.com \
--cc=aman.deep.singh@intel.com \
--cc=bernard.iremonger@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=jfreimann@redhat.com \
--cc=ktraynor@redhat.com \
--cc=rjarry@redhat.com \
--cc=stable@dpdk.org \
--cc=yuying.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).