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 3B5BA42B91; Thu, 25 May 2023 00:50:39 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9FEC40FDF; Thu, 25 May 2023 00:50:38 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 617C640A82 for ; Thu, 25 May 2023 00:50:36 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 80CAF20FBA76; Wed, 24 May 2023 15:50:35 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 80CAF20FBA76 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1684968635; bh=3kwiAq1ySQc22WSy9f+AZEGyD6du4n216pCDoOxvd4I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IcxviZEON5Kl+yx58S1UIVScBzMtMOD/J09crmWRkKlBh7V1x6ZZiZ55BgpXWaSsu uEM9QZpdoRV72pY8wLaEl4gRw31l6OfD2ocPgXwopn2WKFfdF4KOyjk6gyMEdlK9bw NTW7XeRBEHJZGH8J8UMJqsHu24nz+P50I/XBSZ4g= Date: Wed, 24 May 2023 15:50:35 -0700 From: Tyler Retzlaff To: David Marchand Cc: dev@dpdk.org, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com, thomas@monjalon.net, stephen@networkplumber.org, mb@smartsharesystems.com, Ferruh Yigit Subject: Re: [PATCH v3 0/7] replace rte atomics with GCC builtin atomics Message-ID: <20230524225035.GA5524@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1679084388-19267-1-git-send-email-roretzla@linux.microsoft.com> <1679612036-30773-1-git-send-email-roretzla@linux.microsoft.com> <20230524154701.GA7766@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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 On Wed, May 24, 2023 at 10:06:24PM +0200, David Marchand wrote: > On Wed, May 24, 2023 at 5:47 PM Tyler Retzlaff > wrote: > > On Wed, May 24, 2023 at 02:40:43PM +0200, David Marchand wrote: > > > Hello Tyler, > > > > > > On Thu, Mar 23, 2023 at 11:54 PM Tyler Retzlaff > > > wrote: > > > > > > > > Replace the use of rte_atomic.h types and functions, instead use GCC > > > > supplied C++11 memory model builtins. > > > > > > > > This series covers the libraries and drivers that are built on Windows. > > > > > > > > The code has be converted to use the __atomic builtins but there are > > > > additional during conversion i notice that there may be some issues > > > > that need to be addressed. > > > > > > > > I'll comment in the patches where my concerns are so the maintainers > > > > may comment. > > > > > > > > v3: > > > > * style, don't use c99 comments > > > > > > > > v2: > > > > * comment code where optimizations may be possible now that memory > > > > order can be specified. > > > > * comment code where operations should potentially be atomic so that > > > > maintainers can review. > > > > * change a couple of variables labeled as counters to be unsigned. > > > > > > > > Tyler Retzlaff (7): > > > > ring: replace rte atomics with GCC builtin atomics > > > > stack: replace rte atomics with GCC builtin atomics > > > > dma/idxd: replace rte atomics with GCC builtin atomics > > > > net/ice: replace rte atomics with GCC builtin atomics > > > > net/ixgbe: replace rte atomics with GCC builtin atomics > > > > net/null: replace rte atomics with GCC builtin atomics > > > > net/ring: replace rte atomics with GCC builtin atomics > > > > > > > > drivers/dma/idxd/idxd_internal.h | 3 +-- > > > > drivers/dma/idxd/idxd_pci.c | 8 +++++--- > > > > drivers/net/ice/ice_dcf.c | 1 - > > > > drivers/net/ice/ice_dcf_ethdev.c | 1 - > > > > drivers/net/ice/ice_ethdev.c | 12 ++++++++---- > > > > drivers/net/ixgbe/ixgbe_bypass.c | 1 - > > > > drivers/net/ixgbe/ixgbe_ethdev.c | 18 ++++++++++++------ > > > > drivers/net/ixgbe/ixgbe_ethdev.h | 3 ++- > > > > drivers/net/ixgbe/ixgbe_flow.c | 1 - > > > > drivers/net/ixgbe/ixgbe_rxtx.c | 1 - > > > > drivers/net/null/rte_eth_null.c | 28 ++++++++++++++++++---------- > > > > drivers/net/ring/rte_eth_ring.c | 26 ++++++++++++++++---------- > > > > lib/ring/rte_ring_core.h | 1 - > > > > lib/ring/rte_ring_generic_pvt.h | 12 ++++++++---- > > > > lib/stack/rte_stack_lf_generic.h | 16 +++++++++------- > > > > 15 files changed, 79 insertions(+), 53 deletions(-) > > > > > > > > > > There is still some code using the DPDK "legacy" atomic API, but I > > > guess this will be converted later. > > > > Yes, it will be converted later. > > > > If I did it correctly... the series was an attempt to move away > > from the legacy API where there was a dependency on EAL that would > > change when moving to stdatomic. I'm hoping that the remaining use of > > the legacy API are not sensitive to the theoretical ABI surface > > changing when that move is complete. > > Ok. > > > > > As you proposed, I dropped patch 1 on the ring library (waiting for > > > ARM to provide an alternative) and applied this series, thanks. > > > > > > Note: Thomas, Ferruh, we will have to be careful when merging subtrees > > > to make sure we are not reintroducing those again (like for example > > > net/ice). > > Well, I have some second thought about this series so I did not push > it to dpdk.org yet. Understood. It's very important to have these reviewed well so no objection just hope we can get them reviewed properly soon. > Drivers maintainers were not copied so I would like another pair of > eyes on the series: ideally no /* Note: */ should be left when merging > those patches. The /* Note: */ was explicitly requested by other reviewers as they were concerned we would lose track of opportunities to weaken ordering after switching from __sync to __atomic. Is your request that the comments now be removed? Thanks! > I'll reply individually on the patches. > > > -- > David Marchand