[PATCH v3 2/9] app/testpmd: fix packet count in ieee15888 engine
David Marchand
david.marchand at redhat.com
Mon Feb 20 19:34:55 CET 2023
Don't count a packet has been transmitted before it is done.
Fixes: af75078fece3 ("first public release")
Cc: stable at dpdk.org
Signed-off-by: David Marchand <david.marchand at redhat.com>
---
app/test-pmd/ieee1588fwd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index fc4e2d014c..896d5ef26a 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -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.
--
2.39.2
More information about the stable
mailing list