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 D88FB41EB1; Thu, 16 Mar 2023 16:25:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDB1742D4B; Thu, 16 Mar 2023 16:25:45 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id ED0B640DF6 for ; Thu, 16 Mar 2023 16:25:44 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7134A5C0172; Thu, 16 Mar 2023 11:25:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 16 Mar 2023 11:25:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type: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= 1678980344; x=1679066744; bh=IuI97NTdT/79SVK65w4BbD9VD45GV10WKFH UruFptmU=; b=D6GLOprlx+j+1uOPSKnhh02jXn+KfFGq/DAQ+GmTZOsUg0oco40 sZbO6EiavTQ2mmDEj3QO/LUyz16QdZFNH0x2WRJEHLC8lVGUBIZnIM3WBaVV36Da 16021GzkC3R/GMq0ub9lwBRRAsZRt1jgNfK7hT+6ATy36rU2DWE0LnE1rCBPctte U6rmtbbZwQp4f6xVx9VzMYnqhkSEzLv0qArY5MJWAdIGmWGpers8Ytnd/TuEH6LH l3n09x/YqPofn5kLQR5TNaMCxi2lWv2NctX3ubusg6y/95hKqRCorrbv1y2xY8Ct Iu1Twq3xsRn3AJK5frkjvoHtAK6wMgQg61Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type: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= 1678980344; x=1679066744; bh=IuI97NTdT/79SVK65w4BbD9VD45GV10WKFH UruFptmU=; b=DVq8VD4TuxX97n9QZ9J6zY7+hDvqktF+YMpAz9VJoTcfGDk4kKs HzOjD7yjjEQ00JgNu074PjFkSM6HaseBMBWVfxHDV/Acz62LeShq5YAiB8HSF57K ytNGie6yAiHfP4eQVjt0QpR3eTr1UL4AXFWnt78ONb6HHMlejNnkTuv4V5zn9Hvo nHQNci0rXpldEDRopKN0G065qp4uH/UExcfN+qwY1DXvQ3KeWtOUE1UnQO6/GWCY Hjzi1+U7Xf57+uRulPkMBhIOFtObHFc7Q8H0o4wQFfdC6tI/8tWim3DJQ69lNLY/ saQUO91YOEXcuqqEuk4/4pU/iMhiwEFa5jg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeftddgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 16 Mar 2023 11:25:43 -0400 (EDT) From: Thomas Monjalon To: Tyler Retzlaff , Bruce Richardson Cc: dev@dpdk.org, Honnappa.Nagarahalli@arm.com, Ruifeng.Wang@arm.com Subject: Re: [PATCH v2 00/16] replace __atomic operations returning new value Date: Thu, 16 Mar 2023 16:25:41 +0100 Message-ID: <13221889.uLZWGnKmhe@thomas> In-Reply-To: References: <1678486530-20688-1-git-send-email-roretzla@linux.microsoft.com> <1678914945-10638-1-git-send-email-roretzla@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 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".