Skip to content

Commit

Permalink
app/testpmd: fix Tx retry in flowgen engine
Browse files Browse the repository at this point in the history
Fix tx_pkt number in tx retry logic.

Fixes: bf56fce ("app/testpmd: add retry option")
Cc: stable@dpdk.org

Signed-off-by: Zhihong Wang <wangzhihong.wzh@bytedance.com>
Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
  • Loading branch information
Zhihong Wang authored and Ferruh Yigit committed Aug 24, 2021
1 parent 3b48087 commit ea27567
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/test-pmd/flowgen.c
Expand Up @@ -192,12 +192,12 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
/*
* Retry if necessary
*/
if (unlikely(nb_tx < nb_rx) && fs->retry_enabled) {
if (unlikely(nb_tx < nb_pkt) && fs->retry_enabled) {
retry = 0;
while (nb_tx < nb_rx && retry++ < burst_tx_retry_num) {
while (nb_tx < nb_pkt && retry++ < burst_tx_retry_num) {
rte_delay_us(burst_tx_delay_time);
nb_tx += rte_eth_tx_burst(fs->tx_port, fs->tx_queue,
&pkts_burst[nb_tx], nb_rx - nb_tx);
&pkts_burst[nb_tx], nb_pkt - nb_tx);
}
}
fs->tx_packets += nb_tx;
Expand Down

0 comments on commit ea27567

Please sign in to comment.