[dpdk-dev] [PATCH v2] app/testpmd: fix TX checksum calculation for tunnel

Li, Xiaoyun xiaoyun.li at intel.com
Wed Jul 28 07:07:54 CEST 2021


> -----Original Message-----
> From: Gregory Etelson <getelson at nvidia.com>
> Sent: Tuesday, July 27, 2021 21:08
> To: dev at dpdk.org
> Cc: getelson at nvidia.com; Ajit Khaparde <ajit.khaparde at broadcom.com>;
> Olivier Matz <olivier.matz at 6wind.com>; Andrew Rybchenko
> <andrew.rybchenko at oktetlabs.ru>; Yigit, Ferruh <ferruh.yigit at intel.com>;
> Thomas Monjalon <thomas at monjalon.net>; stable at dpdk.org; Li, Xiaoyun
> <xiaoyun.li at intel.com>
> Subject: [PATCH v2] app/testpmd: fix TX checksum calculation for tunnel
> 
> TX checksum of a tunnelled packet can be calculated for outer headers only or
> for both outer and inner parts. The calculation method is determined by
> application.
> If TX checksum calculation can be offloaded, hardware ignores existing
> checksum value and replaces it with an updated result.
> If TX checksum is calculated by a software, existing value must be zeroed first.
> The testpmd checksum forwarding engine always zeroed inner checksums.
> If inner checksum calculation was offloaded, that header was left with 0
> checksum value.
> Following outer software checksum calculation produced wrong value.
> The patch zeroes inner IPv4 checksum only before software calculation.
> 
> Fixes: 51f694dd40f5 ("app/testpmd: rework checksum forward engine")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Gregory Etelson <getelson at nvidia.com>
> ---
> v2:
>  remove blank line between Fixes and Cc
>  explicitly compare with 0 value in `if ()`
> ---
>  app/test-pmd/csumonly.c | 23 ++++++++++++-----------
>  1 file changed, 12 insertions(+), 11 deletions(-)
> 
Acked-by: Xiaoyun Li <xiaoyun.li at intel.com>


More information about the dev mailing list