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 E13E641EAF; Thu, 16 Mar 2023 11:03:39 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3BFD42B7E; Thu, 16 Mar 2023 11:03:39 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 6CBE240FDF for ; Thu, 16 Mar 2023 11:03:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678961018; x=1710497018; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=AXkHi6qgMtLJQ0bDC66kIlK3sVincmxy0m0DGD93W1I=; b=j2/mu4F2AsqxFTUQbpgLcO47FjNR2FEhUJ3skHekeqw9GY298lFGLcsU gsSwNAplZMPxpfhMWyZvAdPP6+jXCI7MY0qQnghtVioD74fLwVy8ehJ5W wnTGxPKgQ3N8mZc4UwQPqr1U1zIQrsX8YBFCFEpUiAjcBzwsgrnRzu/G9 uSxkcW5fzcIHl8ef7TaeU74nCHGUDM+S2mM1v3GgoRY5MmhzpCJiSf0lp rRF2NQrmp6mJeVjYByeWs1CNnA/USrs9MimQD/ur9hK99KMSKXBH2rRwt wFDqFKjaoq3mhV2gQ6voEqYwA2HRaToOZjgXTY83oX5p/V/Vm2wfLhtGY w==; X-IronPort-AV: E=McAfee;i="6500,9779,10650"; a="317594521" X-IronPort-AV: E=Sophos;i="5.98,265,1673942400"; d="scan'208";a="317594521" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2023 03:03:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10650"; a="679845193" X-IronPort-AV: E=Sophos;i="5.98,265,1673942400"; d="scan'208";a="679845193" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga002.jf.intel.com with ESMTP; 16 Mar 2023 03:03:35 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 16 Mar 2023 03:03:33 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21 via Frontend Transport; Thu, 16 Mar 2023 03:03:33 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.106) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.21; Thu, 16 Mar 2023 03:03:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bbnWyOSXF3531GnmlM/Y8v8Pm/TnOc+usFzyM30SXpVd10XVVsI/Oq269ZwpqNrNDag6eXZKYtiSL77YeZMkBdZvhbnlxbHcdKXM/sJLLprIWW5Kx0UNLy2V+TCdhHQ9oScWDddLW5rmMzOjG3u2y6vaY4wzq0VPgDW8dWDCIGKOxzqfyokTyG5l0GJrsPAlwgC3HFOU5Aeb390SV96C8ZcbouN5ZKhymcy3QkCdWV7BXgauHEaVOVw3ROj6QmVL5ho2bwa8nMpA44u4u4nZ1+hPf5Ie8MzMOD6QsDq+8T0eQ+H0lPhnck3roVAumkvMRWViXs82D8m0mmbFo25N3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bzDwfroPHuMUG3sTGHp4wL2aaNs1kqm2A5UXqJRBCQ0=; b=fl7mf+/t/nXFq2Ug/F/A6USm+nYZOrlUbsiXvOSQP4XH8BwWArpEiJu0KjtfpCEfP5Db7q/CtCCY5XYX1g92a2WL4GzLXqvwy2ZN9QZMVOa9gtdaOiZKMGKYeDtJWrY7D1vwKT3cyIdPcuE4oNaZBZWrNt/8ECXrZ/6iitv/h26xoYU7HWJA2T+ky2PlCChTyHVjMIQEurUWBIgAhnjqdbdVE1+7wpSRxx7HdoaMM4+2h73wrR4ZInL5NU74HBsCnCpwKazghkJ238va1TNx/QJYLm0mQfSO9L3Ms6gjzMnp9N1OQ5nwPx6ll57Icq7mW3PVGwB+N+MiksGN0DYqbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by PH8PR11MB7072.namprd11.prod.outlook.com (2603:10b6:510:214::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19; Thu, 16 Mar 2023 10:03:31 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::18d0:ac53:aa1d:d19c]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::18d0:ac53:aa1d:d19c%5]) with mapi id 15.20.6178.024; Thu, 16 Mar 2023 10:03:31 +0000 Date: Thu, 16 Mar 2023 10:03:24 +0000 From: Bruce Richardson To: Tyler Retzlaff CC: , , , Subject: Re: [PATCH v2 00/16] replace __atomic operations returning new value Message-ID: References: <1678486530-20688-1-git-send-email-roretzla@linux.microsoft.com> <1678914945-10638-1-git-send-email-roretzla@linux.microsoft.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1678914945-10638-1-git-send-email-roretzla@linux.microsoft.com> X-ClientProxiedBy: LO3P123CA0009.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:ba::14) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|PH8PR11MB7072:EE_ X-MS-Office365-Filtering-Correlation-Id: b0c7da16-16b4-4bc7-c967-08db2605b24c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yi8Vn6lq0het+mjjpbS7eETirdgxXpSPQtpjJuSGMc666+14kMxdgkmvqxSed7Fc1vCnmiXy4y0NLHUKX+tBitx9CZwHZMBBAr2TOHVAWNNC+uZ3qDCDcMzTCp4c2oucN1XZR02X2TaR7ihK3PBBrGaL4ymsbRZI00NJxVddCV6qp7i8NjIdDGI0NHEDmxBpmWXnelKMNWK88mBeGecJE4TBTr7TvzGHpcG7W3eq7X680O7rSU7fVd1rLEu/0QkLEBnYSErRrTP1Riz6+65Tc85QgUbAczYuNp2rUiAPm7Pd5vTyWs7kRsIgPqYekBbLX7ZzwhZvK9JQhKYnvmuZvahM8FzvCBgBZQYvdxatnr3XI//6dVcHtiTSwF76GuqMUSunIRwJzThovR8e5FuQpRZ+6fZf759JBj2VGofha38T6q+IWl96JJ2825kfTQSvA35GdSNovFfTYUU2VsrfBQn71MU4C43Cszt3L8tBfUCGJIcx6MgyGiA6zO1cQMFzGfmyLsOweQkokW1wayF6ybX5mGVYMOqUujSpROEmH765vQqwgZma2M8q6Wsq/CAkpw+yBIsCggzccsEW8BHDNB5T6zMTskv+LkQ61YGgTcYwmJ43Vbo1rmIxGtAylpMTc70Gqk93YqKkzHO20A1kpA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(396003)(136003)(366004)(39860400002)(376002)(346002)(451199018)(6666004)(6486002)(82960400001)(186003)(5660300002)(44832011)(8936002)(83380400001)(66556008)(8676002)(41300700001)(4326008)(66946007)(2906002)(66476007)(26005)(478600001)(38100700002)(316002)(6916009)(6512007)(86362001)(6506007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?1AWpOyAxEATBPH0GgmvJ17RCP76PeBhhxs+g5GlZU53rIGebz4WPCPCJu25W?= =?us-ascii?Q?IofSpPsW6XIqbKbrX/98S8dVmho+HK7RtNFVHsESYDZY0TBafdm/2DggFhou?= =?us-ascii?Q?WlE4H04caPczjTqYynXWLE/Yb1v0l4IqQZm16yhu9fF8Kn4l0QlH89ycMZ6m?= =?us-ascii?Q?2/+zhVKYPSemOFaY5v+MVebtYFgE/82Fyugcj1kwfDweHyc8wdYycjJ1HSk/?= =?us-ascii?Q?4CzzwGHCCQIv9am11DMP1Mnm0Hebq+IiAg4eFGApQP6z1zGFcmFx29fYubIZ?= =?us-ascii?Q?GZXOZf9FqHCfMO4pnn5ahTDrzhMCxrySv5nfnt6bbIrqoFsKssbnwamZGExI?= =?us-ascii?Q?gkG6UgPHk+75FmUxZLe9j6ALYIGpmRbHDqLooBaTeXQZPkGa6HuqAbKOAV6f?= =?us-ascii?Q?x8AmTPvdn8mvbesZEY/+b1D+npyJB/89ZZwFa5GRgaUhiPwJeQzqlMxDkzYM?= =?us-ascii?Q?qBo/pEaahgoXTiiLwmeOxc6XrfVu9qLKdh0UvAEytFzaxzGhyvcPXl5LtNn7?= =?us-ascii?Q?+vkGwfLL22YxhYMbOTfKRKpIuGhI/jldWp7b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28h8rUS0oS9c53doheHJNpi2eBT3XWKkw/4JQeBtzsp?= =?us-ascii?Q?k3+NE0c7MPFEVjUd33jYeLtGM8WPGe+kJdcilUCM8ePKhl+x+8TAOPxBbjOf?= =?us-ascii?Q?cIFEWPeQHxW9dLR2LxlJ5+acz7wYyVk/im15JYYVcivEk7Hfvw6Wt6jNvs33?= =?us-ascii?Q?wA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: b0c7da16-16b4-4bc7-c967-08db2605b24c X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Mar 2023 10:03:31.3782 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yCt+gWfzlCGIy62Py5vGbElfbw513cs8XgFvpWVDO+fN9GKgfyoI+xbvcZCvSlNCqgNzKMxIdK05EHQsNvsPc8IzcIKUmaMi6cQu9nVBoMc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB7072 X-OriginatorOrg: intel.com 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, 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. > > This series is being separated from the other similar series in > an effort to reduce the chance of mistakes being spotted in review > since the usages in this case consume the returned / new value. > > v2: > * remove unnecessary casts of signed to unsigned arguments when > using generic __atomic builtins. > * remove inappropriate cast of signed negative value on addend. > > 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?