[v4,1/4] app/testpmd: fix tx retry in flowgen
Checks
Commit Message
Fix tx_pkt number in tx retry logic.
Fixes: bf56fce1fb4 ("app/testpmd: add retry option")
Cc: stable@dpdk.org
Signed-off-by: Zhihong Wang <wangzhihong.wzh@bytedance.com>
---
app/test-pmd/flowgen.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
Hi
> -----Original Message-----
> From: Zhihong Wang <wangzhihong.wzh@bytedance.com>
> Sent: Thursday, August 12, 2021 21:19
> To: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; Li, Xiaoyun
> <xiaoyun.li@intel.com>; Singh, Aman Deep <aman.deep.singh@intel.com>;
> irusskikh@marvell.com; cchemparathy@tilera.com
> Cc: Zhihong Wang <wangzhihong.wzh@bytedance.com>; stable@dpdk.org
> Subject: [PATCH v4 1/4] app/testpmd: fix tx retry in flowgen
>
> Fix tx_pkt number in tx retry logic.
>
> Fixes: bf56fce1fb4 ("app/testpmd: add retry option")
Missing one character, it should be 12.
Fixes: bf56fce1fb45 ("app/testpmd: add retry option")
Except this, Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
On Fri, Aug 13, 2021 at 9:33 AM Li, Xiaoyun <xiaoyun.li@intel.com> wrote:
>
> Hi
>
> > -----Original Message-----
> > From: Zhihong Wang <wangzhihong.wzh@bytedance.com>
> > Sent: Thursday, August 12, 2021 21:19
> > To: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; Li, Xiaoyun
> > <xiaoyun.li@intel.com>; Singh, Aman Deep <aman.deep.singh@intel.com>;
> > irusskikh@marvell.com; cchemparathy@tilera.com
> > Cc: Zhihong Wang <wangzhihong.wzh@bytedance.com>; stable@dpdk.org
> > Subject: [PATCH v4 1/4] app/testpmd: fix tx retry in flowgen
> >
> > Fix tx_pkt number in tx retry logic.
> >
> > Fixes: bf56fce1fb4 ("app/testpmd: add retry option")
>
> Missing one character, it should be 12.
Got it. Thanks Xiaoyun.
> Fixes: bf56fce1fb45 ("app/testpmd: add retry option")
>
> Except this, Acked-by: Xiaoyun Li <xiaoyun.li@intel.com>
@@ -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;