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 8AE6643095; Fri, 18 Aug 2023 08:55:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7100742D0C; Fri, 18 Aug 2023 08:55:28 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id B46D140395; Fri, 18 Aug 2023 08:55:26 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id B9854206EE; Fri, 18 Aug 2023 08:55:24 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH v4 1/6] eal: provide rte stdatomics optional atomics API Date: Fri, 18 Aug 2023 08:55:19 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87B19@smartserver.smartshare.dk> In-Reply-To: <20230817190937.GA12307@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v4 1/6] eal: provide rte stdatomics optional atomics API Thread-Index: AdnRPmB+U++ux+9eQgCAUU3M7gP9VgAXjEIQ References: <1691717521-1025-1-git-send-email-roretzla@linux.microsoft.com> <1692221931-32334-1-git-send-email-roretzla@linux.microsoft.com> <1692221931-32334-2-git-send-email-roretzla@linux.microsoft.com> <98CBD80474FA8B44BF855DF32C47DC35D87B15@smartserver.smartshare.dk> <20230817190937.GA12307@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Tyler Retzlaff" Cc: , , "Bruce Richardson" , "Honnappa Nagarahalli" , "Ruifeng Wang" , "Jerin Jacob" , "Sunil Kumar Kori" , =?iso-8859-1?Q?Mattias_R=F6nnblom?= , "Joyce Kong" , "David Christensen" , "Konstantin Ananyev" , "David Hunt" , "Thomas Monjalon" , "David Marchand" 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 > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > Sent: Thursday, 17 August 2023 21.10 >=20 > On Thu, Aug 17, 2023 at 01:45:21PM +0200, Morten Br=F8rup wrote: > > > From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com] > > > Sent: Wednesday, 16 August 2023 23.39 > > > > > > Provide API for atomic operations in the rte namespace that may > > > optionally be configured to use C11 atomics with meson > > > option enable_stdatomics=3Dtrue > > > > > > Signed-off-by: Tyler Retzlaff > > > Reviewed-by: Morten Br=F8rup > > > --- > > > > Speed blindness during my review... I have now spotted a couple of = copy- > paste typos: > > > > > +#define rte_atomic_compare_exchange_weak_explicit( \ > > > + ptr, expected, desired, succ_memorder, fail_memorder) \ > > > + atomic_compare_exchange_strong_explicit( \ > > > > atomic_compare_exchange_weak_explicit, not strong. >=20 > yikes, thanks for catching that cut & past error >=20 > > > > > + ptr, expected, desired, succ_memorder, fail_memorder) > > > + > > > > [...] > > > > > +#define rte_atomic_flag_clear_explicit(ptr, memorder) \ > > > + atomic_flag_clear(ptr, memorder) > > > > atomic_flag_clear_explicit(ptr, memorder), missing _explicit. >=20 > yes, currently unused otherwise it would have failed to compie Yes, I guessed something similar, when I spotted this... two parameters = being passed to a single-parameter function. >=20 > i'll correct this too. >=20 > thank you for the careful review i look at the diffs over and over and > still it's hard to spot subtle swaps/exchanges of things. Yes, when reviewing many similar lines of code, the probability of = overlooking something increases rapidly, even for external reviewers. About 20 years ago, a Danish consulting company realized this, and = turned it to something positive. They set up a highly specialized = organization, Specialisterne (https://specialisterne.com/), to offer = autistic consultants for tasks like this. These autistics enjoy = repetitive tasks, and are excellent at spotting subtle differences = normal people would likely overlook.