[PATCH] app/test-pmd: enable hw checksum offload for txonly

Nicolas PLANEL nplanel at cisco.com
Wed Feb 26 14:41:47 CET 2025


This patch fix txonly forward mode, as it was lacking of MBUF
offload flags for IPv4 and UDP when the hardware support it.

Signed-off-by: Nicolas PLANEL <nplanel at cisco.com>
---
 app/test-pmd/txonly.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 59d821a22d6f..bdcf6ea66008 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -334,6 +334,10 @@ pkt_burst_transmit(struct fwd_stream *fs)
 		ol_flags |= RTE_MBUF_F_TX_QINQ;
 	if (tx_offloads & RTE_ETH_TX_OFFLOAD_MACSEC_INSERT)
 		ol_flags |= RTE_MBUF_F_TX_MACSEC;
+	if (tx_offloads & RTE_ETH_TX_OFFLOAD_IPV4_CKSUM)
+		ol_flags |= RTE_MBUF_F_TX_IP_CKSUM;
+	if (tx_offloads & RTE_ETH_TX_OFFLOAD_UDP_CKSUM)
+		ol_flags |= RTE_MBUF_F_TX_UDP_CKSUM;
 
 	/*
 	 * Initialize Ethernet header.
-- 
2.43.0



More information about the dev mailing list