Skip to contentSkip to conversation

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

PATCH New Nicolas PLANEL 1 participant 1 message Feb 26, 2025

lore
Share & tools
lore
#0 lore raw

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

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

---
 app/test-pmd/txonly.c | 4 ++++
 1 file changed, 4 insertions(+)
app/test-pmd/txonly.c +4 -0
index 59d821a22d6f..bdcf6ea66008 100644
@@ -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.
Signature · 1 line
2.43.0