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 762F9A00C4 for ; Tue, 20 Sep 2022 18:10:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6DF4641148; Tue, 20 Sep 2022 18:10:41 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by mails.dpdk.org (Postfix) with ESMTP id 686544069B; Tue, 20 Sep 2022 18:10:39 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 87B4D5C00F8; Tue, 20 Sep 2022 12:10:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 20 Sep 2022 12:10:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1663690236; x= 1663776636; bh=qmZtUdLSInaL9utsQpMgvgXLMZon1eetPzOWyhgNNxc=; b=w DPHgIReeChs2jZZa2OlIOJHLL4AvAP0KkYg2/w1tiIdKZH+hNsn4Y5cLjgg3lCzN fLMnUDq6sloRqtfsym2IVeNm902TfigeatedPP2oNtA4OZWxKgfQMwKMrXMHbVqd MMR4N4qNLFK3pngTzy/LPHuUUTubKzaF3JgH0WjlhsXyDZU5RfCBpkKv0nhwnO01 nryrHyIRyXM/XY2sla+Xc3T58iXKl5ITKtrdXu3GWjJv07Vy7iAT0bUFTcCpDkm4 TnPVwRbwv3BTbCFgQus0E9BYBfVKAyIDe0iIyUSPlcUGJEtWbMFmUpQTOjIwFuCY MtluAWmqJzBzyvK/GH7Lw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1663690236; x= 1663776636; bh=qmZtUdLSInaL9utsQpMgvgXLMZon1eetPzOWyhgNNxc=; b=T JS7Y0ieVhvnCaIliyCQVohEYTKecofQ/Fl0haWKkzqV9k/9PHc/gZYUCXjq3FnuO DBydaJuCaVXgWlpIe/l3tnlSwyE9WBnvyYKGN6GLmVUmVZ75PO206ONRXEHTy2sL gbBlOQE4mydOxlE/SCm8l9VNnMnORFP29rs4ir4taAveORIQyB3QdmOfGs4ywmKm DYYPBvJGiWeqKdrwQBvy3xsh+MNYpeC8/wjJb4OZWlWj8l2t0z1Tbi9qSALmhGwl v2/xrSumgpNghe+vFIzrmFHNPW5tr0efswIAAxv2CI9SFByLj0P5rsWD7UIcRh+D lqXlYpGJTnJUrBxpsvs5Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvledgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtudenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeefhfejleeuvdevtddutdeutdevhfeijeethfffueejhfetuddu vedtkedtieekffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Sep 2022 12:10:33 -0400 (EDT) From: Thomas Monjalon To: Mattias =?ISO-8859-1?Q?R=F6nnblom?= Cc: Olivier Matz , David Marchand , dev@dpdk.org, Emil Berg , "bruce.richardson@intel.com" , "stephen@networkplumber.org" , "stable@dpdk.org" , "bugzilla@dpdk.org" , "dev@dpdk.org" , Onar Olsen , Morten =?ISO-8859-1?Q?Br=F8rup?= Subject: Re: [PATCH v3 2/2] net: have checksum routines accept unaligned data Date: Tue, 20 Sep 2022 18:10:32 +0200 Message-ID: <3633838.MHq7AAxBmi@thomas> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" 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 20/09/2022 14:09, Mattias R=F6nnblom: > On 2022-07-11 15:25, Olivier Matz wrote: > > On Mon, Jul 11, 2022 at 02:11:32PM +0200, Mattias R=F6nnblom wrote: > >> __rte_raw_cksum() (used by rte_raw_cksum() among others) accessed its > >> data through an uint16_t pointer, which allowed the compiler to assume > >> the data was 16-bit aligned. This in turn would, with certain > >> architectures and compiler flag combinations, result in code with SIMD > >> load or store instructions with restrictions on data alignment. > >> > >> This patch keeps the old algorithm, but data is read using memcpy() > >> instead of direct pointer access, forcing the compiler to always > >> generate code that handles unaligned input. The __may_alias__ GCC > >> attribute is no longer needed. > >> > >> The data on which the Internet checksum functions operates are almost > >> always 16-bit aligned, but there are exceptions. In particular, the > >> PDCP protocol header may (literally) have an odd size. > >> > >> Performance impact seems to range from none to a very slight > >> regression. > >> > >> Bugzilla ID: 1035 > >> Cc: stable@dpdk.org > >=20 > > Fixes: 6006818cfb26 ("net: new checksum functions") > >=20 > >> --- > >> > >> v3: > >> * Use RTE_ALIGN_FLOOR() in the pointer arithmetic (Olivier Matz). > >> v2: > >> * Simplified the odd-length conditional (Morten Br=F8rup). > >> > >> Reviewed-by: Morten Br=F8rup > >> > >> Signed-off-by: Mattias R=F6nnblom > >=20 > > Acked-by: Olivier Matz > >=20 > > Thank you! >=20 > Are there any plans to merge this patchset? Applied, thanks. Sorry for the delay.