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 73DA7A0C40; Wed, 28 Jul 2021 07:08:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EE82740E64; Wed, 28 Jul 2021 07:08:01 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 24E4C40142; Wed, 28 Jul 2021 07:07:59 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10058"; a="298162339" X-IronPort-AV: E=Sophos;i="5.84,275,1620716400"; d="scan'208";a="298162339" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jul 2021 22:07:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,275,1620716400"; d="scan'208";a="464537938" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga008.jf.intel.com with ESMTP; 27 Jul 2021 22:07:56 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Tue, 27 Jul 2021 22:07:56 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Tue, 27 Jul 2021 22:07:56 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.46) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Tue, 27 Jul 2021 22:07:55 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UqtfHXaqASjFIMB/KcAv5gR+/K1MQglUcIwsK2kSu7vOvWfvEpQuugQObHiuvvq1mXTrYW0hpwEhgYp259TLg/nKC6V8OchgdBP049KgrWq17Zer1y/SCO/0eix9bKthhofJ5+P5uhgpzRSj95yMNMZEXxpmcN6m8gekXXJIAr7xlpCyYKBP1y3WYP9RprrPBpo8n+aBzcuT02IQ25Rdg/RvIq38yGGfIaqMAwo/3STHDJzn0HRZVHBL10lY4sAq0G24kYEeH/IuWvckmTsw6N3UqI7zAJkXOllTtiwYSh1hfHgUEJ4nB7ThC00ExJR8gxImyULTNgfpRek/JstPUw== 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=19vjZq4uuWxDyEzOu7PHL/U7Bo5PYR5vDRdWkk+KJqI=; b=N+d+m8YECe0PJMbMC37oDvhZot5q64zLxbQCuNyjHuAsTPOT0EOidgSvmv7fQvIl1K2SxsSzulzxXMgRLQyVJwd1l6BTT/nG7Q+ka5m49/cYIxGf3DwQVxfSKH1HTHvpRqoGDKQvCIfOEFQYWX+xLslzkCdzFk30N0GoUmfU7PNBLsfK3txW48s2QqoLcS3HHHD915IFclXCyE4SLOyRDJkW0s+QN1p5GrcfVFuwnvPeoSoSg1HzBEMq7nTKGlKSbLPD4oahOymN6tWHjlcYfQUpanz3XldBrHQt92sUKEqlT2OTG9ud6sTSXzbC452GERlAN7VZL3cKBo48V6nfkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=19vjZq4uuWxDyEzOu7PHL/U7Bo5PYR5vDRdWkk+KJqI=; b=qOafAEW4eiDgLClSoSVlFW2lF4yPRYqN2gMY6dCnXFd6p4OOrZTwgNpHi1o9wT4z4yGLYDb98kaAy54HLawEqt18IdrAh964d94ohV49+o5nU6YsGzsqqawooh23vQb0VEqcUQoerjPHrIoF2uC8pncwEqtkfOF4shRcTuvqwb8= Received: from DM4PR11MB5534.namprd11.prod.outlook.com (2603:10b6:5:391::22) by DM5PR11MB1626.namprd11.prod.outlook.com (2603:10b6:4:9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4352.29; Wed, 28 Jul 2021 05:07:54 +0000 Received: from DM4PR11MB5534.namprd11.prod.outlook.com ([fe80::87d:1217:a7cc:dd72]) by DM4PR11MB5534.namprd11.prod.outlook.com ([fe80::87d:1217:a7cc:dd72%8]) with mapi id 15.20.4373.018; Wed, 28 Jul 2021 05:07:54 +0000 From: "Li, Xiaoyun" To: Gregory Etelson , "dev@dpdk.org" CC: Ajit Khaparde , Olivier Matz , Andrew Rybchenko , "Yigit, Ferruh" , Thomas Monjalon , "stable@dpdk.org" Thread-Topic: [PATCH v2] app/testpmd: fix TX checksum calculation for tunnel Thread-Index: AQHXguh//5ZWmqhrSkih6B6TwK7JwqtX1www Date: Wed, 28 Jul 2021 05:07:54 +0000 Message-ID: References: <20210719083309.15428-1-getelson@nvidia.com> <20210727130757.30724-1-getelson@nvidia.com> In-Reply-To: <20210727130757.30724-1-getelson@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a2f47d55-5e0e-4c86-843f-08d95185a869 x-ms-traffictypediagnostic: DM5PR11MB1626: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4303; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: A2ED1KxPFv7f1I4ikSa18raMjKDWOmELofKvyuDJfgnx2Q30QGAMT/AyIV8XuCT4N9ffIfP1cWG863+iV9rBI9VJkxYnVN+R5uDhMktHzlnW8bJGG9tE1VxiJ5Q6hE9ggsJmWL6Owm38KG39Ais6NKZMwkYS/98Z45C6bQDcm5mcooE0jsKm5j5qoqJKoqnUp+mLgGVEO9ZwtmM77L/P7oeh0TDY5AMQQWIFmFLz4K/34f4/yMc7968xSteM8cW/YpGz/mT3bqFUGY0Va9mwRoxiROJlJCjiSmFEtRWWp2ZZAprtAcCA1/5oA399tl5SZ82safbugDOKEeskWNDZq2oJeSX/gFTVyPfSZxAHoYXtHPRAlwGWpuFDF1ICoyxeAx9fQEN+ko3sPi72/bZU+E75thKDY+Lrrtu/k9u1KVWPC2hNy7aAlpzxYDdXZBggs4Oe91SSlST+YS3OjTR+XzeGDcBViPwvb/2MSgULG7LHAf43vSTbAKAMviucQDStsraie9ky7Afe0NY/pc9MueQ02RwsyLmcqawMIaJf0M76DzCX1cqXWixWsvGYwPnnD7Uy5ILC9Dv+TfZIJ52aK0kU4TTB9nth3P1rZHfm9NnuUgw4C54+937rboJYlUqBqKtIsxJGp5DrXQsyzz1uhwVODNs+DTCatN0m53NYJs5RXKz06bBasu7yViEUTRVm3ppZbKR/sF3S4SoX/gIEaA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5534.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(366004)(396003)(376002)(346002)(136003)(52536014)(64756008)(53546011)(33656002)(7696005)(38100700002)(5660300002)(4326008)(8936002)(55016002)(83380400001)(316002)(54906003)(478600001)(66946007)(9686003)(110136005)(122000001)(8676002)(26005)(86362001)(71200400001)(2906002)(6506007)(66446008)(66556008)(186003)(66476007)(76116006)(38070700005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?83kMp7Od486SmjIA0SfnpME3iNG5an4kbPtHn+1XQ0W26OJKTgozgzIvzmWg?= =?us-ascii?Q?LCSZHy3nA3Tz2pqERTN+XmMqXAFjv+CIH6u0pdyDGFRvMEqd/9m26iojYb6y?= =?us-ascii?Q?wBZkWAEkeLj+NNZmw55xEVAwRSMjvFV2l9nX0izqKF5ZpYI4Kqi6iO1fXsG4?= =?us-ascii?Q?oDPIMFFN27CB3cmykl6/F5igdhIRrZCUTTjJIdfOJSobH2iFhFKoAXqYyovV?= =?us-ascii?Q?NC2KCvCB92dJ8+SOvj4RwfNOuGgq7CEgXFwCwd9dgBM32kUABz+LJa7MJQyP?= =?us-ascii?Q?1Ypt6fji4G68xEQTeRKMNyZ9IBwH2Jge4Aq647qulDnBMUlIU1FK8JpsHXOZ?= =?us-ascii?Q?zW/NGTy5qJYGhrhO0Kn5v0NFSdlbgRfJWRmtMeVUlnpktej8g+ks/6wP525d?= =?us-ascii?Q?g5OBSkPuM7vn+skF6qbR0qJeNnSFpjLlmcaiYMfeuedobLobUECaXYLQ+VPf?= =?us-ascii?Q?mR0DD8rVjIVBsQa43xMXqp0ZVA+tDG5aCuNKW5WpcO6oGcHESyzrcTvLQE3u?= =?us-ascii?Q?xAYOzg919ykGSNuVjxgaHqtb6Gz0VhC7r1f2heRNViujVDLF1l6rQOjALerM?= =?us-ascii?Q?3lVOKw59Lf7UJ56TrWF+Wq6DYqq2bN4ee8OeAe+ANVP6Pa4i4ZNVUK/d1/vP?= =?us-ascii?Q?V2Fejg7lxmbAmX66jd76eu8BJ8jCsajB3XSTOddJPNh1CxM1+YdTh4u9DhTU?= =?us-ascii?Q?Fa5sy26rQCWvT0+DEGtHI6LxaDkEmxA3Kfk74bLOvtKyHTzb1HN/9dTLlDDz?= =?us-ascii?Q?ya4l7N5RB8pY1KEShPEbuJAyXo48xOMfudgE8O85d7N9yT1GYXETgtS8vfRB?= =?us-ascii?Q?ykBAMqhpRV6SrTkWmHFWDnc2WbrhX+ZpYC8dsrzPQH1INkaAKE89Lee8alWt?= =?us-ascii?Q?z/TRGL7a2HOJcafu06nASTbFPqDx5mVaCToV+4YZIQePoHAsheyCNYTpGYE8?= =?us-ascii?Q?SWq4lchB5C4YChg5xd+9x1fkYHhqMGP/Nq9x0dMJPE8C8K4yuoSbEar7dl0V?= =?us-ascii?Q?1NXuTPDA5GjMYoK2fv7H6ZVOK2jLArMpUN5kJo7ABED61850vQ+X0JwjD10w?= =?us-ascii?Q?s1qGJmF/Ef508MsY5rSk/l4H6tgoDDDL5n8Rfdcln07iegF/gzyusN4EJtbj?= =?us-ascii?Q?NpAel57pTWiMKNXfV7cmGOg7OKTywLw3+RiN8XKqWYjdkNZZhxYG9YjOGraH?= =?us-ascii?Q?4XeSAPF09lxlDB3iNMaQvEJUHXmj8kjDM1NFWC9Pnf+aThtrBihWwoFfofcT?= =?us-ascii?Q?k0Xfcv717oxt+Ayjzd/Q0dmaDxrhz6kzql7IGuRPpsz3Rll+y/3l9NcssAa/?= =?us-ascii?Q?hV4lZDcEvXshFZVd1PNxO3l2?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5534.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2f47d55-5e0e-4c86-843f-08d95185a869 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Jul 2021 05:07:54.6269 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zZg0xJoA3JnKwyx2+pZsA6cQLuDfVWvZp7V+/jmZfJK52Xpk26iuxsCl1erwHWNMoKFsTC3h4jk+dhKW4vXTEg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1626 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] 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" > -----Original Message----- > From: Gregory Etelson > Sent: Tuesday, July 27, 2021 21:08 > To: dev@dpdk.org > Cc: getelson@nvidia.com; Ajit Khaparde ; > Olivier Matz ; Andrew Rybchenko > ; Yigit, Ferruh ; > Thomas Monjalon ; stable@dpdk.org; Li, Xiaoyun > > Subject: [PATCH v2] app/testpmd: fix TX checksum calculation for tunnel >=20 > TX checksum of a tunnelled packet can be calculated for outer headers onl= y 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. >=20 > Fixes: 51f694dd40f5 ("app/testpmd: rework checksum forward engine") > Cc: stable@dpdk.org >=20 > Signed-off-by: Gregory Etelson > --- > 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(-) >=20 Acked-by: Xiaoyun Li