app/testpmd: fix Tx checksum problem when TSO enabled

Message ID 1571909854-95982-1-git-send-email-peng.huang@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series app/testpmd: fix Tx checksum problem when TSO enabled |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compilation success Compile Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot warning Travis build: failed
ci/Intel-compilation success Compilation OK

Commit Message

Huang, Peng Oct. 24, 2019, 9:37 a.m. UTC
  This patch fixed the TX checksum value problem when enabled TSO in
tunnel packets, because outer UDP checksum calculation depend on
the TSO configuration.

depend on patch:
app/testpmd: enable GTP header parse and Tx checksum offload

Fixes: 0f62d63593ed ("app/testpmd: support tunneled TSO in checksum engine")
Cc: stable@dpdk.org

Signed-off-by: Peng Huang <peng.huang@intel.com>
---
 app/test-pmd/csumonly.c | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Iremonger, Bernard Oct. 24, 2019, 11:37 a.m. UTC | #1
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Peng Huang
> Sent: Thursday, October 24, 2019 10:38 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; Ye, Xiaolong <xiaolong.ye@intel.com>; Xu, Ting
> <ting.xu@intel.com>; Huang, Peng <peng.huang@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] app/testpmd: fix Tx checksum problem 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.
> 
> depend on patch:
> app/testpmd: enable GTP header parse and Tx checksum offload
> 
> 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
  
Ferruh Yigit Oct. 24, 2019, 6:35 p.m. UTC | #2
On 10/24/2019 12:37 PM, Iremonger, Bernard wrote:
>> -----Original Message-----
>> From: dev <dev-bounces@dpdk.org> On Behalf Of Peng Huang
>> Sent: Thursday, October 24, 2019 10:38 AM
>> To: Zhang, Qi Z <qi.z.zhang@intel.com>
>> Cc: dev@dpdk.org; Ye, Xiaolong <xiaolong.ye@intel.com>; Xu, Ting
>> <ting.xu@intel.com>; Huang, Peng <peng.huang@intel.com>; stable@dpdk.org
>> Subject: [dpdk-dev] [PATCH] app/testpmd: fix Tx checksum problem 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.
>>
>> depend on patch:
>> app/testpmd: enable GTP header parse and Tx checksum offload
>>
>> 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
> 

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index e1cb7fb..a1775f4 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -478,6 +478,9 @@  struct simple_gre_hdr {
 	if (info->outer_l4_proto != IPPROTO_UDP)
 		return ol_flags;
 
+	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) {
 		ol_flags |= PKT_TX_OUTER_UDP_CKSUM;