app/testpmd: fix Tx checksum when TSO enabled
authorPeng Huang <peng.huang@intel.com>
Thu, 24 Oct 2019 09:37:34 +0000 (09:37 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 25 Oct 2019 17:23:22 +0000 (19:23 +0200)
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 <peng.huang@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
app/test-pmd/csumonly.c

index e12695d..5738128 100644 (file)
@@ -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))