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 DA797A04A5 for ; Thu, 3 Mar 2022 07:29:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CDA1D42763; Thu, 3 Mar 2022 07:29:37 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 6261740141; Thu, 3 Mar 2022 07:29:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646288975; x=1677824975; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=vSvjpBfZlsRh+4Gjl5s2A8TpyfjAbJ5vlM133SbFv7E=; b=JtZ5eo9E2WKYVd1eotIrtYdKq4PwhYFajJPQw29BRv5Pjvk7FhRMnSJA pQ0kcQy3i66Es2SROIWANZuci9U94xw1RF1sUTfLab4t5fNF9Xes/R+sn +QPuGgA88vgKeuRqSFSokjKZttFOvkwVGI1ivfMDu1HNFNRiMv+M+wZrb 9mvr1b81Gt8e0BfHr5fLMI9a2JpuuUEgbPCL1G/C8ikxYHq6S42JLJsvz 04+vT44RTpC193bcDx7mI0CAdZXBN5oUBojrxI8rtO5n17P61ClO+H8RR 3SHLQ3Mi7NpLE6kndf0l6UovBfppdHYjo5OQJDXFOfKE6jiyXPRxamKx2 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10274"; a="252418873" X-IronPort-AV: E=Sophos;i="5.90,151,1643702400"; d="scan'208";a="252418873" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Mar 2022 22:29:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,151,1643702400"; d="scan'208";a="641991823" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga004.jf.intel.com with ESMTP; 02 Mar 2022 22:29:34 -0800 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) by ORSMSX605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 2 Mar 2022 22:29:33 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21 via Frontend Transport; Wed, 2 Mar 2022 22:29:33 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.46) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.21; Wed, 2 Mar 2022 22:29:33 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mFY0riSrrb7tEg1T/Qwa74e4e7+zGGD/kUmVdBtLMcSJiXAVH/6oaEJH1E73G04cyo3Fg5OB/GO1az0ZD08d3yN57VvonL7d5Sjcc5/fkJo1+SPKn7OdXIWoxccTplwsyZceVvwAZLtjZHo5oONWp2CS+7+v+UmY/weZuEN9wNQOWtMscAKuwXIw/DMzpI9vh/Yl+hdg0h86yAmSAL+idj6ZgSZus5pw2GxMSAUfe2Cm50gySOFA9fr96Yf8rtX1t6sffv1SCxbYGHXuj7rrtGXTrr9za4oEhmCr37pvwvEoinnlbxEDnN3bnTm2eUSh7fZIIGcnD47or+HbaD2i4A== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6UG7BNojOj31mCIFGtBxGqlT7Ls7004/rG2zLfNiCKo=; b=etggAJOOKxyYbpWWJU+ZpdBtRHkKgB4DqjuC5J5Ncw+z+WzZzHHXFRkCqzMrTV57Zbkl+G3NIZTwCTSr3MeDj1MmPTUTiLau4a/FE0WWcrl4baxkZk0L2n0G0n30KI+yV2PLKQk0izK4k+a+EssnyQPyzYtB4jlaEJo4SXiKDWtEigaOA5ojcJ0hINgvSltREuAho2ApN98ThqokLnOmhNvM0I0iqxahaStceMSt+7JNJf7+rbMgswq+/CD0bJAjfpZYnzq7yt3uEtsKSSsaItmgRGmDEqw5WmFtbGTkxJ04LwhQ9K+QDFQEMyrttJHHB8cLTbcyj8QtB91l5TLfrg== 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 Received: from DM6PR11MB3516.namprd11.prod.outlook.com (2603:10b6:5:72::13) by DM6PR11MB3131.namprd11.prod.outlook.com (2603:10b6:5:6d::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Thu, 3 Mar 2022 06:29:31 +0000 Received: from DM6PR11MB3516.namprd11.prod.outlook.com ([fe80::1c27:af5d:3e9e:d172]) by DM6PR11MB3516.namprd11.prod.outlook.com ([fe80::1c27:af5d:3e9e:d172%4]) with mapi id 15.20.5017.027; Thu, 3 Mar 2022 06:29:31 +0000 From: "Zhang, Yuying" To: "Zhang, Qi Z" , "Liu, KevinX" , dev CC: "Yang, Qiming" , "Yang, SteveX" , "Yigit, Ferruh" , "Xing, Beilei" , "Li, Xiaoyun" , "dpdk stable" Subject: RE: [PATCH v2 2/2] app/testpmd: fix SW L4 checksum in multi-segments Thread-Topic: [PATCH v2 2/2] app/testpmd: fix SW L4 checksum in multi-segments Thread-Index: AQHYLFMlrs00y3ib2keKn/3foNx3rKyqaiWQgALL45A= Date: Thu, 3 Mar 2022 06:29:31 +0000 Message-ID: References: <20211224150925.3296471-1-kevinx.liu@intel.com> <20211229093702.1930214-1-kevinx.liu@intel.com> <20211229093702.1930214-3-kevinx.liu@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 68675500-7939-4854-6c01-08d9fcdf2d65 x-ms-traffictypediagnostic: DM6PR11MB3131:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: UiEQBC/LGrm4UIMFNVa1KlD/hhPs4lsRrqIpZq46TBb1kGSn1M29WhQ+tDTFPeW7UJDeFP2c7cO5wlC4bCNHZaV5/Z4TFuQ8mRWsn26V6a1WRBxrZutvZXz8kvyZbcyaUnI8JbuLNWR3iuGXtWQys3xPxjp1gH0p4Emd/jYGLtUX+slIr5+fIKmc0a19JF6N1+u9Bg/eoUnZcao1tIYr6oEEXdNsVZRQRcrhXBfgEi6P7abGYTi5TZZSjhRCs9/MJRoRFqhqdOdoQ0GR3MVkZOtpAJ/k6WIvF3HvdYE+cX/mAiDgWxgk3xpTw9XyEgDFBtelpZ/XDadjZIRrsHzAB/XK0rp+AHt0aBqMEeXJ1ljfj4l7pGzMUAZT9AKnKamgbU8sqEpOol5tknyHnQ3iV/E95ueerlRryADjcjvV6s049rTfqDefhQhmu13MEEH7dAhTNjgYYfBGuUo8Fd6eR18mAmmikQ/+aB36FRwzpe2jqDAhkokI7yEA8mdDZ6ilj1wiZvHqF1WxVF2WlBjWd+5Q68YKa7SDJRbQjQOqinWk8T0PgTvrmaxgNCUUpsmOuD3fH0/c1rKLHurgyvkoZNHlZ0WiWDmqzAMjjj6hEffXdszLYSaSNKo3cqzP+P1u+81RQH7IJ3mRBcTuYRiRrbOVWZG6rTAG2WDgZVcAwiFGQuXQp0JjAD5Xz7TqbYPVzhkiUVKFDUxV53O5wiXMIg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3516.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(66556008)(66946007)(38070700005)(8676002)(4326008)(33656002)(38100700002)(450100002)(64756008)(66446008)(122000001)(66476007)(9686003)(76116006)(2906002)(53546011)(7696005)(6506007)(82960400001)(71200400001)(52536014)(508600001)(8936002)(83380400001)(86362001)(54906003)(186003)(26005)(5660300002)(110136005)(316002)(55016003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?MH+f98/ynqpC/gdO7bQDmXshRTbdExJLQgrnAIUnViBrfVADjXN3f0PRUBN8?= =?us-ascii?Q?/4PfD7mPGNkmnUKRaRgEfADQMwVnibR1/vuHBWnPoEKPx0UqGSJNAjqFtArp?= =?us-ascii?Q?G18xwebDnawiCbaJoz7WLAyaovntzFSp5uYkoi+7v+l8tLhCMuEvVDm5nEte?= =?us-ascii?Q?Y6dNR5psHoldoxxQCa/Q9YLP7B4lh57ZID2rg6b42aoF4/WyvDK3VBDIe6iQ?= =?us-ascii?Q?m/YT7n6Srkepci0gwXPngnUBiZLpw4uVHM4fv9LHNYSo6bpoVZcD9DpWp7NS?= =?us-ascii?Q?WYVIbhz2mH4ZLoqebbrsCKNC6yX8lpXaDBQdBR1tjRqGHE9CWLQu49FlJ8Ne?= =?us-ascii?Q?XePkMuCBB9mhddUgHXPulG1Z6RtO03omOQRRyVnkWxzavdWI0UbQ3QoGqf5w?= =?us-ascii?Q?+ypgC2q/r+y15YMohmhkZO27Rg3j4u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q?v6nWhpLCVPzW6HLUZ4rqbYN/YbCxBCPH/obf3Pm4Od8qHn90kSG0TufZzO8H?= =?us-ascii?Q?eTqT0LyG+w8zlUxKXtzMDF18VpcKGm50Az1e+sJ7M/VeBIE7tURNYT84VKHn?= =?us-ascii?Q?YSWWeIr/4O7iIzgR0W4TFfYeoQLVn5ABfdkAGUE6NDwCb058x800m3+QulJz?= =?us-ascii?Q?+UiRpgAteInPzpDJIw2lNZDAsY+0uPAaSPTQ8+Q+KDCbSLhjgASCy6GMdsdJ?= =?us-ascii?Q?AKe0LVEUAslUVisFV/VTE18g0F7eXXY0EHdT7nDIhIfCpDti/fcKdCQIqxkb?= =?us-ascii?Q?zbzAVRvIbpcbUNaSeMsUYR8=3D?= 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: DM6PR11MB3516.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 68675500-7939-4854-6c01-08d9fcdf2d65 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2022 06:29:31.8226 (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: GWsuh6KNI7aEJwmJO4cds6H9aK9oRMGxWaiv7Y0/pYoQDkz5cLj4aWpu//W/bfIbeabwxMt6hN34PX7kp6lLww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3131 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org LGTM. > > -----Original Message----- > > From: Liu, KevinX > > Sent: Wednesday, December 29, 2021 5:37 PM > > To: dev@dpdk.org > > Cc: Yang, Qiming ; Zhang, Qi Z > > ; Yang, SteveX ; Yigit, > > Ferruh ; Liu, KevinX ; > > stable@dpdk.org > > Subject: [PATCH v2 2/2] app/testpmd: fix SW L4 checksum in > > multi-segments > > > > Testpmd forwards packets in checksum mode that it needs to calculate > > the checksum of each layer's protocol. > > > > In process_inner_cksums, when parsing tunnel packets, inner L4 offset > > should be outer_l2_len + outer_l3_len + l2_len + l3_len. > > > > In process_outer_cksums, when parsing tunnel packets, outer L4 offset > > should be outer_l2_len + outer_l3_len. > > > > Fixes: e6b9d6411e91 ("app/testpmd: add SW L4 checksum in multi- > > segments") > > Cc: stable@dpdk.org > > > > Signed-off-by: Kevin Liu Acked-by: Yuying Zhang > > --- > > app/test-pmd/csumonly.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index > > 02bc3929c7..c235456e58 100644 > > --- a/app/test-pmd/csumonly.c > > +++ b/app/test-pmd/csumonly.c >=20 >=20 > > @@ -513,7 +513,7 @@ process_inner_cksums(void *l3_hdr, const struct > > testpmd_offload_info *info, ol_flags |=3D RTE_MBUF_F_TX_UDP_CKSUM; } > > else { if (info->is_tunnel) -l4_off =3D info->l2_len + > > +l4_off =3D info->outer_l2_len + > > info->outer_l3_len + > > info->l2_len + info->l3_len; > > else > > @@ -536,7 +536,7 @@ process_inner_cksums(void *l3_hdr, const struct > > testpmd_offload_info *info, ol_flags |=3D RTE_MBUF_F_TX_TCP_CKSUM; } > > else { if (info->is_tunnel) -l4_off =3D info->l2_len + > > info->outer_l3_len + > > +l4_off =3D info->outer_l2_len + info- > > >outer_l3_len + > > info->l2_len + info->l3_len; > > else > > l4_off =3D info->l2_len + info->l3_len; @@ - > > 625,7 +625,7 @@ process_outer_cksums(void *outer_l3_hdr, struct > > testpmd_offload_info *info, if (udp_hdr->dgram_cksum !=3D 0) { > > udp_hdr->dgram_cksum =3D 0; udp_hdr->dgram_cksum =3D > > get_udptcp_checksum(m, outer_l3_hdr, > > -info->l2_len + info->outer_l3_len, > > +info->outer_l2_len + info- > > >outer_l3_len, > > info->outer_ethertype); > > } > > > > -- > > 2.33.1 >=20