From: Yuying Zhang Date: Tue, 28 Jul 2020 17:09:50 +0000 (+0000) Subject: net: fix IPv6 checksum with TSO X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4a67e71816199cf8992a1a02a5aedd8b648382ef;p=dpdk.git net: fix IPv6 checksum with TSO The ol_flags check lacks of flag for IPv6 which causes checksum flag configuration error while IPv6/TCP TSO packet is sent. This patch fixes the issue by adding PKT_TX_TCP_SEG flag. The rte_net_intel_cksum_flags_prepare() function prepares the pseudo header checksum in packet data when doing checksum or TSO offload. Fixes: 520059a41aa9 ("net: check fragmented headers in non-debug as well") Signed-off-by: Yuying Zhang Tested-by: Xi Zhang Acked-by: Olivier Matz Reviewed-by: David Marchand Acked-by: Andrew Rybchenko --- diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h index 1edc283a47..94b06d9ee4 100644 --- a/lib/librte_net/rte_net.h +++ b/lib/librte_net/rte_net.h @@ -125,7 +125,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags) * Mainly it is required to avoid fragmented headers check if * no offloads are requested. */ - if (!(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK))) + if (!(ol_flags & (PKT_TX_IP_CKSUM | PKT_TX_L4_MASK | PKT_TX_TCP_SEG))) return 0; if (ol_flags & (PKT_TX_OUTER_IPV4 | PKT_TX_OUTER_IPV6))