[v3,2/9] app/testpmd: fix packet count in ieee15888 engine
Checks
Commit Message
Don't count a packet has been transmitted before it is done.
Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
app/test-pmd/ieee1588fwd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 2/21/2023 12:04 AM, David Marchand wrote:
> Don't count a packet has been transmitted before it is done.
>
> Fixes: af75078fece3 ("first public release")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
<snip>
@@ -184,13 +184,13 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
/* Forward PTP packet with hardware TX timestamp */
mb->ol_flags |= RTE_MBUF_F_TX_IEEE1588_TMST;
- fs->tx_packets += 1;
if (rte_eth_tx_burst(fs->rx_port, fs->tx_queue, &mb, 1) == 0) {
printf("Port %u sent PTP packet dropped\n", fs->rx_port);
fs->fwd_dropped += 1;
rte_pktmbuf_free(mb);
return;
}
+ fs->tx_packets += 1;
/*
* Check the TX timestamp.