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 9433142980; Tue, 18 Apr 2023 20:11:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6DAB44021F; Tue, 18 Apr 2023 20:11:47 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id F205F4014F for ; Tue, 18 Apr 2023 20:11:45 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2035621C1E6B; Tue, 18 Apr 2023 11:11:45 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2035621C1E6B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1681841505; bh=yptqGzcUVB7aIj4vhyvwTJPp49xzjmZXtNV0vRFxEiY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hCB+qoCnrv8U6rS7therOVfyAfNjDiPRfQrf51qXcDI0xijdsuAdN3hLWpDI7WTF1 sA2dJi/MacfsXhaCZwK3mSZpjS8fHvdE6YF5oeYadtmPZQ0lnHqJ1h67xq0OKxQ8hA EM6QnYUOrMhtm4FvtWXCd306kOqdSaRTGRhi+EBk= Date: Tue, 18 Apr 2023 11:11:45 -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: <20230418181145.GA29145@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> <20230316161705.GA8277@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230316161705.GA8277@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> 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 09:17:05AM -0700, Tyler Retzlaff wrote: > 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. just fyi, there is a series up for this. https://patchwork.dpdk.org/project/dpdk/list/?series=27613