Skip to contentSkip to conversation

app/testpmd: fix IPv6 tunnel packet checksum error

PATCH New Shiyang He 1 participant 1 message May 30, 2023

lore
Share & tools
lore

Shiyang He

author
#0 lore raw

PATCH 1/1 app/testpmd: fix IPv6 tunnel packet checksum error

In checksum forwarding mode, the checksum of tunnel packet calculated incorrectly when outer header is IPv6.

This pathch fixes the issue by setting L4 checksum flag.

Fixes daa02b5cddbb ("mbuf: add namespace to offload flags")
---
 app/test-pmd/csumonly.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/csumonly.c +1 -1
index fc85c22a77..bd2fccc458 100644
@@ -582,7 +582,7 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
 		else
 			ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr);
 	} else
-		ol_flags |= RTE_MBUF_F_TX_OUTER_IPV6;
+		ol_flags |= RTE_MBUF_F_TX_OUTER_IPV6 | RTE_MBUF_F_TX_L4_MASK;
 
 	if (info->outer_l4_proto != IPPROTO_UDP)
 		return ol_flags;
Signature · 1 line
2.37.2