From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A51BCA0C50; Sat, 24 Jul 2021 13:36:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20CC940DDA; Sat, 24 Jul 2021 13:36:52 +0200 (CEST) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by mails.dpdk.org (Postfix) with ESMTP id 004D24067A; Sat, 24 Jul 2021 13:36:50 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id 54E28581695; Sat, 24 Jul 2021 07:36:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 24 Jul 2021 07:36:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= FFvvJF7tAuzdXEf8C1rCyKiWwBXORlLWjqXK/CftQOg=; b=3QLphMyBSxapsjUe v46biVYQDWjKDXF4kdg1rwaekaMzqU3/z4XJGzXKc4unx+wSm+qwcPebP7yz25tP JTHaMDVpau72hPrn5iYe5Ot5coi/q4JxSmB7FaiAjtKTaMP9H56q+iVnHOCH4Yxc emhgPCQnm/74lyYcazDfxg6ToOyrqqC//+GHZpGN98CJjzmKfNbxhMlWHtNhkATA Gb9vkAyYUn1fHjF8sKTy21QKEKIdZqlySw/WOAWNC76HTRtpi/WZXoEgksXd98VG q5Os77OGYEpBwMC5KCuuJBGMWuCD8ipOdkiDm0XvYiD1f97fYb69fCCObjjDXXYL z+NWnw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=FFvvJF7tAuzdXEf8C1rCyKiWwBXORlLWjqXK/CftQ Og=; b=gpmXPBIRdG9ucX2t3p81nrNXYt3DKy+7ryYXP2KcjOEVyb5FNuhAdAPLr +r+plyTBdIAVgmwKzXXC4dczGSGmnIHDADz8EUYeKBNDpn508NTKEg7uVNSOVflE SdQCHEpUEHWcFPKTp33QREkJbCP4e+MMb/1TJo07MsEdLrnzn7VhVn668wmoEkk3 FXtzLqR9BsCfH9orhkojealWWcjrdxaKmWIGQKIVcRC+vLb38bKEGtQI359v2O7j 56hm3tEbWyVycal32vLvb2+KSYWMDYhnbvU/rmoDxziuNPX0w3p7If6LD/5Bz0In wvzSsG51EpjKfUXZxW6Iy7H+cp9NA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrgedtgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 24 Jul 2021 07:36:47 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org, Gregory Etelson Cc: stable@dpdk.org, Dmitry Kozlyuk , Xiaoyun Li , Olivier Matz , andrew.rybchenko@oktetlabs.ru, ajit.khaparde@broadcom.com, jerinj@marvell.com, ferruh.yigit@intel.com, david.marchand@redhat.com, konstantin.ananyev@intel.com Date: Sat, 24 Jul 2021 13:37:13 +0200 Message-ID: <1920776.gAbG8fQetS@thomas> In-Reply-To: <20210719083309.15428-1-getelson@nvidia.com> References: <20210719083309.15428-1-getelson@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix TX checksum calculation for tunnel X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Please we need more reviews for this patch. 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 > Reviewed-by: Dmitry Kozlyuk > --- > + } 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); > + }