From 0322272c9fd39e1a5942c73232d43d3ebeeff7b1 Mon Sep 17 00:00:00 2001 From: Peng Huang Date: Thu, 24 Oct 2019 09:37:34 +0000 Subject: [PATCH] app/testpmd: fix Tx checksum when TSO enabled This patch fixed the TX checksum value problem when enabled TSO in tunnel packets, because outer UDP checksum calculation depend on the TSO configuration. Fixes: 0f62d63593ed ("app/testpmd: support tunneled TSO in checksum engine") Cc: stable@dpdk.org Signed-off-by: Peng Huang Acked-by: Bernard Iremonger --- app/test-pmd/csumonly.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index e12695d947..5738128e69 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -544,6 +544,9 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info, udp_hdr = (struct rte_udp_hdr *) ((char *)outer_l3_hdr + info->outer_l3_len); + if (tso_enabled) + ol_flags |= PKT_TX_TCP_SEG; + /* Skip SW outer UDP checksum generation if HW supports it */ if (tx_offloads & DEV_TX_OFFLOAD_OUTER_UDP_CKSUM) { if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4)) -- 2.20.1