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 4B95C41EB1; Thu, 16 Mar 2023 17:17:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E646740DF6; Thu, 16 Mar 2023 17:17:07 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 7DC8540DDC for ; Thu, 16 Mar 2023 17:17:06 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id C6E2020C56BB; Thu, 16 Mar 2023 09:17:05 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C6E2020C56BB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1678983425; bh=TdwAEXvu8T/shJDc7pntsVpuFBIbeXSLnncWH4f1Vvk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CALdl4rF0AkPf85ATIZcmWy1glLEhN0/9U4chDL6OqnT1PXy+Z247fDggj6ySg/AD deAN6LDvGWTJP3gFnDaTRRLfS7t60TyYLI58RncacdjxBLRdFNknj+CtA5MLmNnexZ mFVLVUrFuHSUC21Rftg0N2d3bqy5Eli6djDTlk7U= Date: Thu, 16 Mar 2023 09:17:05 -0700 From: Tyler Retzlaff To: Thomas Monjalon Cc: Bruce Richardson , dev@dpdk.org, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com Subject: Re: [PATCH v2 00/16] replace __atomic operations returning new value Message-ID: <20230316161705.GA8277@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1678486530-20688-1-git-send-email-roretzla@linux.microsoft.com> <1678914945-10638-1-git-send-email-roretzla@linux.microsoft.com> <13221889.uLZWGnKmhe@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <13221889.uLZWGnKmhe@thomas> 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 Thu, Mar 16, 2023 at 04:25:41PM +0100, Thomas Monjalon wrote: > 16/03/2023 11:03, Bruce Richardson: > > On Wed, Mar 15, 2023 at 02:15:29PM -0700, Tyler Retzlaff wrote: > > > This series replaces uses of __atomic_{add,and,or,sub,xor}_fetch with > > > __atomic_fetch_{add,and,or,sub,xor} intrinsics where the new value > > > is used. > [...] > > > Tyler Retzlaff (16): > > > app/test: use previous value atomic fetch operations > > > common/cnxk: use previous value atomic fetch operations > > > common/mlx5: use previous value atomic fetch operations > > > drivers/event: use previous value atomic fetch operations > > > net/af_xdp: use previous value atomic fetch operations > > > net/cnxk: use previous value atomic fetch operations > > > net/cxgbe: use previous value atomic fetch operations > > > net/iavf: use previous value atomic fetch operations > > > net/mlx5: use previous value atomic fetch operations > > > net/octeontx: use previous value atomic fetch operations > > > raw/ifpga: use previous value atomic fetch operations > > > bbdev: use previous value atomic fetch operations > > > eal: use previous value atomic fetch operations > > > ipsec: use previous value atomic fetch operations > > > mbuf: use previous value atomic fetch operations > > > rcu: use previous value atomic fetch operations > > > > > I am wondering how we go about ensuring that we don't introduce any more of > > these atomic_X_fetch intrinsics. Is there some way we can add a compiler > > warning for them or have a checkpatch check, for example? > > In devtools/checkpatches.sh, we are checking for these patterns: > rte_atomic[0-9][0-9]_.*\( > __atomic_thread_fence\( > > Feel free to add more "forbidden patterns". > > yes, i was going to do this before end of week but got interrupted by other work. i will introduce a patch for checkpatches.sh standalone asap that can be merged before these changes.