From: Gregory Etelson <getelson@nvidia.com>
To: NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
"dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>,
Xiaoyun Li <xiaoyun.li@intel.com>,
Olivier Matz <olivier.matz@6wind.com>,
"ajit.khaparde@broadcom.com" <ajit.khaparde@broadcom.com>,
"andrew.rybchenko@oktetlabs.ru" <andrew.rybchenko@oktetlabs.ru>,
"jerinj@marvell.com" <jerinj@marvell.com>,
"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
"david.marchand@redhat.com" <david.marchand@redhat.com>,
"konstantin.ananyev@intel.com" <konstantin.ananyev@intel.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix TX checksum calculation for tunnel
Date: Sat, 24 Jul 2021 12:43:21 +0000 [thread overview]
Message-ID: <BY5PR12MB483433604934276E89A2FF33A5E69@BY5PR12MB4834.namprd12.prod.outlook.com> (raw)
In-Reply-To: <1920776.gAbG8fQetS@thomas>
> Please we need more reviews for this patch.
>
I'll update the patch and post a v2.
> 19/07/2021 10:33, Gregory Etelson:
> > 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@dpdk.org
>
> nit: no blank line between Fixes and Cc lines please
>
> >
> > Signed-off-by: Gregory Etelson <getelson@nvidia.com>
> > Reviewed-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
> > ---
> > + } else if (ipv4_hdr->hdr_checksum) {
>
> Please do an explicit comparison with 0 here as it cannot be considered as a
> boolean test.
>
> > + ipv4_hdr->hdr_checksum = 0;
> > ipv4_hdr->hdr_checksum =
> > rte_ipv4_cksum(ipv4_hdr);
> > + }
>
>
next prev parent reply other threads:[~2021-07-24 12:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-19 8:33 Gregory Etelson
2021-07-21 6:42 ` Ori Kam
2021-07-24 11:37 ` Thomas Monjalon
2021-07-24 12:43 ` Gregory Etelson [this message]
2021-07-27 13:07 ` [dpdk-dev] [PATCH v2] " Gregory Etelson
2021-07-28 1:31 ` Li, Xiaoyun
2021-07-28 3:45 ` Gregory Etelson
2021-07-28 4:09 ` Ajit Khaparde
2021-07-28 5:07 ` Li, Xiaoyun
2021-07-28 14:12 ` Olivier Matz
2021-07-28 16:07 ` Gregory Etelson
2021-07-29 8:25 ` Olivier Matz
2021-07-29 10:31 ` Gregory Etelson
2021-07-29 16:02 ` Olivier Matz
2021-07-29 9:39 ` [dpdk-dev] [PATCH v3] " Gregory Etelson
2021-07-29 16:05 ` Olivier Matz
2021-07-29 17:05 ` Gregory Etelson
2021-07-29 17:01 ` [dpdk-dev] [PATCH v4] " Gregory Etelson
2021-07-30 8:39 ` Olivier Matz
2021-07-30 12:04 ` Thomas Monjalon
2021-08-02 11:21 ` Jiang, YuX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BY5PR12MB483433604934276E89A2FF33A5E69@BY5PR12MB4834.namprd12.prod.outlook.com \
--to=getelson@nvidia.com \
--cc=ajit.khaparde@broadcom.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=ferruh.yigit@intel.com \
--cc=jerinj@marvell.com \
--cc=konstantin.ananyev@intel.com \
--cc=olivier.matz@6wind.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
--cc=xiaoyun.li@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).