From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <stable-bounces@dpdk.org> Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 762F9A00C4 for <public@inbox.dpdk.org>; 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: <xms:--UpY1IKGBSJOpisBRS2OVPMJohfNPks2BvQRQ-XQ63C4euSuNTy6A> <xme:--UpYxItEA-52Up4qj1RaBUNN5Dwst1kXtqmS-xpyyoNhg0EyIktUsoZNjuoyjmbC QOegZ8mNH5HEELPWw> X-ME-Received: <xmr:--UpY9u0WRKEmWEJdsnFe_UyjMZhVVIABmClMGp_rcgDrdzvhot1I9EQFP8Bri1eYcrINlJRTUA3Y8RctrBFZe0UlA> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvledgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthhqredttddtudenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpeefhfejleeuvdevtddutdeutdevhfeijeethfffueejhfetuddu vedtkedtieekffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: <xmx:--UpY2YvdlHouxfSdK5WJlPlKM-xSU6VDSwvhX0ffnq9rDj_l41H1A> <xmx:--UpY8aWM0Bil5iH4rWHaEJNqUgn7tCijYCjXkN7EPau3eImGd5KFw> <xmx:--UpY6Cy2-JC2Gy2I5TjBoRfRkJHaIBorULWJK8MLMGmx2mVI_osGQ> <xmx:_OUpY5RmZdY_66tTZQ-hbn9d0SV5Bg_l-OetlhmPWB9cT5wZH6aK9w> Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 20 Sep 2022 12:10:33 -0400 (EDT) From: Thomas Monjalon <thomas@monjalon.net> To: Mattias =?ISO-8859-1?Q?R=F6nnblom?= <mattias.ronnblom@ericsson.com> Cc: Olivier Matz <olivier.matz@6wind.com>, David Marchand <david.marchand@redhat.com>, dev@dpdk.org, Emil Berg <emil.berg@ericsson.com>, "bruce.richardson@intel.com" <bruce.richardson@intel.com>, "stephen@networkplumber.org" <stephen@networkplumber.org>, "stable@dpdk.org" <stable@dpdk.org>, "bugzilla@dpdk.org" <bugzilla@dpdk.org>, "dev@dpdk.org" <dev@dpdk.org>, Onar Olsen <onar.olsen@ericsson.com>, Morten =?ISO-8859-1?Q?Br=F8rup?= <mb@smartsharesystems.com> 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: <fad3c7f5-3ce8-7c0e-7a80-937efcbcdac4@ericsson.com> References: <YswKoLL5BCS7qvrZ@platinum> <YswkufcP5FlwEgj8@platinum> <fad3c7f5-3ce8-7c0e-7a80-937efcbcdac4@ericsson.com> 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 <stable.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/stable>, <mailto:stable-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/stable/> List-Post: <mailto:stable@dpdk.org> List-Help: <mailto:stable-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/stable>, <mailto:stable-request@dpdk.org?subject=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 <mb@smartsharesystems.com> > >> > >> Signed-off-by: Mattias R=F6nnblom <mattias.ronnblom@ericsson.com> > >=20 > > Acked-by: Olivier Matz <olivier.matz@6wind.com> > >=20 > > Thank you! >=20 > Are there any plans to merge this patchset? Applied, thanks. Sorry for the delay.