From: Peng Huang Date: Thu, 24 Oct 2019 09:37:34 +0000 (+0000) Subject: app/testpmd: fix Tx checksum when TSO enabled X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=0322272c9fd39e1a5942c73232d43d3ebeeff7b1;p=dpdk.git 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 --- 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))