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 5A231A0C50; Sat, 24 Jul 2021 14:43:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D150A40DDA; Sat, 24 Jul 2021 14:43:29 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2063.outbound.protection.outlook.com [40.107.94.63]) by mails.dpdk.org (Postfix) with ESMTP id C26044067A; Sat, 24 Jul 2021 14:43:28 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HMk3WP3aBcRpkfLDBC89/kiyoWO2gQNxx7zHjZK8WpGoKsIW5H5TTUfwbay8MnC5dq7vu6AqxfXzyMGlZPMGDST8r8cnq1oQY0W06CDfYquysHX3mSr9zmr1p7qChSpZYot//esD7fmLXsq4arkQf6wASIHI+QGHmWJ7uKXfhF4LIo9aiBK48/VySLRQhK6nDV+03Mpy3qB2uAyGbRsyWljCRjqEPN70XJm2SOxPKRdkqePnV1aoK36q5RfXMHDqwGgVy7OWgdEUkfCBZhCyelquQWXbl2J/ql9YmyGUfmPinQeuJuie/SFK6xtEPTCVtqKSfeJQ6VeiGzP4F+EmXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=whWzyakvL3mSpULjl5Yzoa8Zs8eSMILNbQ7SXPpyZ4I=; b=NaqNmgniI6h9pVW34Wnok8guxzC+V3bM7f2cEG5A9GrrWpml69cciIKdxTAPSI9i0mKGhEjPhNGsU0jQCNlcHXoVlN2Ksng52LBWyGIHdhHIB+R0kRCbtCZpTw7/5uvWU+Hlx2LzaW5S0qQHPQ+w08Pq/Wv+GuQys/yMuECtRGFsA0GdE2Dt9wLiDBfJw71YqltODGSwUOMqJNYzeaNk0y5qILdLVrK2gYHogCjLTt+xjfNtMgLHEDcD8/f87o9HXqz9yKY1ofxvzC8r4x7uid2xJRoQHK6VRQetEwCCEb7v6cuhEZhtW9ryaOC2zHojbm8ZndI0UHf3SqPnYYjrGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=whWzyakvL3mSpULjl5Yzoa8Zs8eSMILNbQ7SXPpyZ4I=; b=Jr5HZimWtdkk/BRYy3E6a8qgb3MEb3WcKz+gyBs1JcI42GTsLzOtHdmwW0RqfYtckJkjdJa1Yz4R+Xvl9lknwFuopdBswJrZ0/4stFlQIyNSQ+IePML0xStlxxwQ9leG2TYqYg25hmDo6x1EDg0ak17ICzOvZr7Orwc7Pv0W1nYny+jj7IlIE5CRo/eDaC/RYjDHTzgRvflK1hT/W/MK/GGkW0t9iJZLwqr0MJn2Nsc+z1xTyotIiKXzfhzKupjs4bA23m0JBHZFRtHgze3HK6W087W7N/o9itEr4YCID1p+38gL54b6AAaAofmCbLw2DsAcdS+8d3KuaUUtUSXd5g== Received: from BY5PR12MB4834.namprd12.prod.outlook.com (2603:10b6:a03:1b2::17) by BYAPR12MB3558.namprd12.prod.outlook.com (2603:10b6:a03:aa::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.29; Sat, 24 Jul 2021 12:43:22 +0000 Received: from BY5PR12MB4834.namprd12.prod.outlook.com ([fe80::3814:b909:389e:4030]) by BY5PR12MB4834.namprd12.prod.outlook.com ([fe80::3814:b909:389e:4030%5]) with mapi id 15.20.4352.029; Sat, 24 Jul 2021 12:43:22 +0000 From: Gregory Etelson To: NBU-Contact-Thomas Monjalon , "dev@dpdk.org" CC: "stable@dpdk.org" , Dmitry Kozlyuk , Xiaoyun Li , Olivier Matz , "ajit.khaparde@broadcom.com" , "andrew.rybchenko@oktetlabs.ru" , "jerinj@marvell.com" , "ferruh.yigit@intel.com" , "david.marchand@redhat.com" , "konstantin.ananyev@intel.com" Thread-Topic: [dpdk-dev] [PATCH] app/testpmd: fix TX checksum calculation for tunnel Thread-Index: AQHXfHjDozFVe7zeyUGkYiPsvC5w3KtSB4yAgAARYkA= Date: Sat, 24 Jul 2021 12:43:21 +0000 Message-ID: References: <20210719083309.15428-1-getelson@nvidia.com> <1920776.gAbG8fQetS@thomas> In-Reply-To: <1920776.gAbG8fQetS@thomas> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6e8dc10b-6163-4d6d-2365-08d94ea09f47 x-ms-traffictypediagnostic: BYAPR12MB3558: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: EVU9SzoXVF8PqJ5XGVLOfVHaY9Fk4g3MSSRV6XeHCB11SPNhTtU/zvPN4bc3KHPP6iTJTaun0HRKrqpBzVX899qm8EwqMsSy9hvXGuZHPJ+aW69XNx83t5l1B4nWt8bel8WMyzKMDCF9yUiMAyCahTCd/sBWHK/WSV/qCr3Z5NbVewU4Sj1A5pKVgkEaEzBHYtAdogq8Pbh1m3z/c2eMqLdlFjxqvWOIbRPC63Elx+ppwrMzpDxHqCopaWrIrLu6TPUPglcHJ6x9ulqsNe3hmkeN+GT054QNjLcoTtnLSf3NabmTw6e+n56frD/aCmt3fRJVcmOM+AmSLl3uNjUYyFanx59ML6F1YT05vnXCWTitiaNVuVeQd2rwYWhV6u05E2BLG35ECQwKjdor+vcjwd30pD2A42KzJQEY33ysw5d59Hax4x7XQb5herWV+Pt/TkPcVANeh0XMdPnhrankQLp1PVycHmvakeTLFjrtQBM2xzp4Fmqu1aIRGOWpavHQrbTJvLvtSTsXzgRop7DoJ2DSak9obqVOimhLWWg/b7i6LtP5LC7N/hDSbVrNar6KFNqXd9Sxnyg8s00C8JE/II4WxSK5d6vb1mjccIn7hGcAfTDoxh9+up4BMdJaNJDxHDHTB2KuRc9/oSVGZB3FEFMWpj+xpxqchsMe73d5dGoY4B5MLmnK8TYrCEf0XvHqQmT76Ddx2pqNCfM+C/HQOQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR12MB4834.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(508600001)(76116006)(64756008)(33656002)(66476007)(66946007)(66556008)(66446008)(38100700002)(7416002)(8936002)(8676002)(122000001)(52536014)(110136005)(316002)(54906003)(5660300002)(9686003)(2906002)(55016002)(4326008)(6506007)(86362001)(26005)(7696005)(71200400001)(186003)(83380400001)(38070700004); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?tBdKu1oBwR5Nrn3t4chzGD0Iyc6Vhc/nT37KN4F1532HNE8FwzrTlB12PBAn?= =?us-ascii?Q?5ixDttQYZYoBorzy0QD8nP6UpZAB/wwgsy9ebtSqfrPTqLXZb64/ky6dncvy?= =?us-ascii?Q?YlaU4NpQ4IlC+ZtotrUd+0MF0/ILctcSZt2Kuqge/dUfjagPxwMkatWMHXH2?= =?us-ascii?Q?30YVBtMomXSQJzwxSzbT8+DdWVHcAIGqjIcw5306nlp5VMljbKv5bJulL4QH?= =?us-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GSqW0MV10lz/EDRm?= =?us-ascii?Q?GrulrVzRmWeS+OKAqYXzFQEDX7jhryvAWufJhgFvMpJc9haOQOhcL6bV4jPl?= =?us-ascii?Q?PdSig/FUytlJkkMtfJyG4LrQ4hefoplEpdiS44/X6r8cJcZibQpPPeUwS1Do?= =?us-ascii?Q?fmCBVYLIWpIY68eQ62+bZK/aFtNr5W6M7qMXW7GrXkG1vn9Wm6bz8t5Qzj7l?= =?us-ascii?Q?YM5g54LpUZ8EHZWVXs22svD7?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB4834.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e8dc10b-6163-4d6d-2365-08d94ea09f47 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jul 2021 12:43:22.0141 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: CDPQ7Gzs2IPK96NF8U9Lqh3DlIKcwdwb+G026vEg0st8KcItl+wtuVThfCWiwOH9lR+HXorhmaL4h7eXKFKIVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3558 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. >=20 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 >=20 > nit: no blank line between Fixes and Cc lines please >=20 > > > > Signed-off-by: Gregory Etelson > > Reviewed-by: Dmitry Kozlyuk > > --- > > + } else if (ipv4_hdr->hdr_checksum) { >=20 > Please do an explicit comparison with 0 here as it cannot be considered a= s a > boolean test. >=20 > > + ipv4_hdr->hdr_checksum =3D 0; > > ipv4_hdr->hdr_checksum =3D > > rte_ipv4_cksum(ipv4_hdr); > > + } >=20 >=20