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 965E541C4D; Thu, 9 Feb 2023 10:04:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 832F840EDC; Thu, 9 Feb 2023 10:04:28 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 5DCF740DF8 for ; Thu, 9 Feb 2023 10:04:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675933467; x=1707469467; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=Sv4UHmoDTcbKOyeeD/0UAjWSVvb51MqSn3ok+Ff/NTA=; b=Nm7eYc2qGT6PCPTnFnsHS3sZxuEemZI5QtRwBuajhZS9YcHJOonHJ/pe p2eRRMRDSjVyGFQGoDbAhv2y+54RO7SygOfqpG7lqzxRx4GbmcWEC0c/l rfyZsnTAqBE4jW0FIayojBIpQwy/7+zg4MGCN3MKy+wwUMu/Pdm2vnjlB TAUh0DiQHK0pEilwbsn0Fp2ABQqc+2E3b0vUTBt+Ye76ebobwCuwFM22s /CN2j7BWiCt4IKbZoT3jcyZVYNxbwhK36LAzB7KhonfwKv1XToNvTGUbu Oc45C1rqGa4lPi0udAgkCo5B4Lk4T4Tr1L2iDGzT8NWJn6nr+LA71QNhr w==; X-IronPort-AV: E=McAfee;i="6500,9779,10615"; a="330081631" X-IronPort-AV: E=Sophos;i="5.97,283,1669104000"; d="scan'208";a="330081631" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2023 01:04:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10615"; a="736260985" X-IronPort-AV: E=Sophos;i="5.97,283,1669104000"; d="scan'208";a="736260985" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga004.fm.intel.com with ESMTP; 09 Feb 2023 01:04:26 -0800 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.16; Thu, 9 Feb 2023 01:04:25 -0800 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Thu, 9 Feb 2023 01:04:25 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Thu, 9 Feb 2023 01:04:25 -0800 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.49) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Thu, 9 Feb 2023 01:04:25 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TpQphaVWO8fZSJIUJ7c8IrpNhEv+35/RL/eaaIif5wqedcGAulhKpo8SvX6AMYLQPHpWwUY6AaZhniLk6sxGWz6Kc909CRdW9MWlp7OzHCTCVswlGA/s7W8Drm20nL5TgESyRFmDa8QnuRx4nzLb/P0kSJITbPhLmnwhIznF1NVSMbaZJo9qIatY+UmxHGqMtjNIespLEJIo3C8dB1I+MGdkoAp+V/CMEvNTb/VhzPkAmbAFCuTZxidhGjAOS79GZh+c6qRpWMirrbElrhzFYoXnmdUE1fJTq5rN2+iZle6s3W6RitN9K7uC+HojjixSxrZZXAaJOhqujwWf0R4F2A== 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=IRNsd2wJl9hkfO3wsxu6hV5RGXPxFVA5PN7RDl6p1a4=; b=h9U1gb4VNoxlZhUwbjRUUwX0TgFUlz/3wdaECoZZUOY08tPWotqg/zDV75uVLAb0FcmgPKhdGQ6nOffG/ntWSFYRCDQcFinrxdNuOKFrR1NScAazuCr35so3b+AcWrsH1W56lM1D8uoqjDfvqZk1X5gIjHs8Mq2MkeXGt2ypLW/8RX/wYUKAUPA6RD/RgA1pnSJ0z7h9jZr7Og0qzLXRR5lWNghEFJ1OCkUMzRrCY14ghidkAInf/0gOOAL+Jj2o/F0J7GzdI/O+nFknpCWKUImiaESh9mEFTgwIugKWfbIUYJnDNT2mzCC6ooHEgfrz8Dlf3R9/WOp0ZywcSssmWQ== 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 DS7PR11MB7931.namprd11.prod.outlook.com (2603:10b6:8:e5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.17; Thu, 9 Feb 2023 09:04:23 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aaba:abb7:8794:def]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aaba:abb7:8794:def%9]) with mapi id 15.20.6086.017; Thu, 9 Feb 2023 09:04:23 +0000 Date: Thu, 9 Feb 2023 09:04:16 +0000 From: Bruce Richardson To: Tyler Retzlaff CC: , , , , Subject: Re: [PATCH v2] eal: introduce atomics abstraction Message-ID: References: <1673558785-24992-1-git-send-email-roretzla@linux.microsoft.com> <1675892618-31755-1-git-send-email-roretzla@linux.microsoft.com> <1675892618-31755-2-git-send-email-roretzla@linux.microsoft.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1675892618-31755-2-git-send-email-roretzla@linux.microsoft.com> X-ClientProxiedBy: LO4P123CA0084.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:190::17) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DS7PR11MB7931:EE_ X-MS-Office365-Filtering-Correlation-Id: 170ef53f-a8fa-4bb8-c757-08db0a7ca301 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uAzMpNEF1Xo/8GfUKQv0LwRVVuUHjPPg7w286A/kuirCS7Bf/GL5IEwHpANLp5hbwhC4Z+Rc6+DqwNQwHiAW6uBVF6itsroLqUPTUm8rooZYxffxCsjEeoGMipcoFW6FELSKCttxxIIX/TL9nXqOI56CL0Wztep2EL930DP0RfyBNF2ypY+cL0PDdD5OqCAJa3/CtO4+G898W1y4F7yIWTqC7qg8AByF/iPnZXPhRdwqAt+rj/gIR67ZeyFbUwQS9zlei1ad7RT4oNrLQ0tKnTpJDtJbwmBAZS7pmhmQ1GIyvlBboQ72ozLmcnrj78YEfOBAyiCHjTrQOoxwCWNzjQ5S9hDd7mBBmyhy1iO+ATNDXTyU1gXNsmgrosLfoymsQJVqpm1tWgdz+xJFqA1qiDuGB9L2o02H/p2zKeUx9M5d2//lFQUvxq+lEK6k3ffjxTS5guTWzwgav0L4z2LencDMOzNO/ZR7M8KrbVclhdLjuehaGUWJuL2bcwJVS+r8eCUuV6mns6bVNwdqYqhHfJwqSG6dGnzqBQd4WlEqR5pJO22zdhHcJshc4T7aOYdcZLWA8VnbnN9YRNYC+Pepa2bk6uyK5CtN66m3KABqYb/HokKSjAMpq+E4Q2rDW0saJHSB2B5JFmwE9BeeUCwZwEHyvqh1NtjHLK7m2wMgaqWdy0IjCjSQD5bvEg2NHP8Y 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)(346002)(376002)(396003)(136003)(39860400002)(366004)(451199018)(6506007)(86362001)(6666004)(478600001)(6486002)(6512007)(26005)(186003)(82960400001)(83380400001)(38100700002)(8936002)(41300700001)(8676002)(5660300002)(44832011)(316002)(66946007)(2906002)(4326008)(66556008)(6916009)(66476007)(67856001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?6GNfc8g1Uy85cvUd8/iFyDprYMQadYISFcHzmTSp3Ju0qZcBuCMj6RHDar3h?= =?us-ascii?Q?CRvjBdBEF9aoquONZGB1meY8HJK5zN1g+tELYMRylJKtf1fyGW0OyT8Fgpyv?= =?us-ascii?Q?F/fcmAGIpLvPvdOT0I5yX8pPwhcQF0rRIZ0WcTcBUG8ylo/wyA0M0XsGbaIX?= =?us-ascii?Q?kAbeIG9uuZOWzmEkMpzjYpHQdJtfKr4VUT5j2NdG/W+bsyc1lPjljxpxLHCy?= =?us-ascii?Q?wYUinC50SDrYlUVZhW9xnEfKFmt+4zkIu//MGdtp/i5FzAkw9FhZi+L+9DIo?= =?us-ascii?Q?SItxoKhPLVFd5YrCTwpu0tvh45gmSvqFlBmtPzPrN5RV5djukVSEOBEWwXKS?= =?us-ascii?Q?Mh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UeRFiN?= =?us-ascii?Q?1c3/+mUykpen/tT2IbbJYeyGy2ooCHMKHYr9F6s7xNfrhMb9Ip0s2PpI/0yJ?= =?us-ascii?Q?S1wMynsY+2ES7Qf42HgEarjzceunnTE9ef/TgKLjRU5aaZINrkdtx3tDZoJ/?= =?us-ascii?Q?A7tX6pZaw3w42WJxkrEl/QdR+MHubHwNQCRyqBv/qeyiJ1DCIPyriICtL0mq?= =?us-ascii?Q?bmT5DE9T6JvaNPFML6Ul2U95EesA7VjGVJwRNRoFFJ/nDMv5761pWVZyZcV2?= =?us-ascii?Q?prxOP4IKbJqkzScgtu1R8GypAx6LRvEibg1dnIGtRDmNomGNUem9x9a1f4ne?= =?us-ascii?Q?Y5kSBp9Z+cV5WZCMfFzk81BDi8KMmk5r2bXWxf/OKg1SA35lsuzK6KAdhUbH?= =?us-ascii?Q?Hw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 170ef53f-a8fa-4bb8-c757-08db0a7ca301 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2023 09:04:23.2426 (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: RVjIBBIGQphRqqZ7vodRtHbx8UB1OnqnfFj4douJpK/3dxIIpLSw502xIW5B/sez7hXmzMElWJo8I7FQHfe90z7hNCULgvYQdnVaUBLr40c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB7931 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, Feb 08, 2023 at 01:43:38PM -0800, Tyler Retzlaff wrote: > Introduce atomics abstraction that permits optional use of standard C11 > atomics when meson is provided the new enable_stdatomics=true option. > > Signed-off-by: Tyler Retzlaff > --- > config/meson.build | 11 ++++ > lib/eal/arm/include/rte_atomic_32.h | 6 ++- > lib/eal/arm/include/rte_atomic_64.h | 6 ++- > lib/eal/include/generic/rte_atomic.h | 96 +++++++++++++++++++++++++++++++++- > lib/eal/loongarch/include/rte_atomic.h | 6 ++- > lib/eal/ppc/include/rte_atomic.h | 6 ++- > lib/eal/riscv/include/rte_atomic.h | 6 ++- > lib/eal/x86/include/rte_atomic.h | 8 ++- > meson_options.txt | 2 + > 9 files changed, 139 insertions(+), 8 deletions(-) > > diff --git a/config/meson.build b/config/meson.build > index 26f3168..25dd628 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -255,6 +255,17 @@ endif > # add -include rte_config to cflags > add_project_arguments('-include', 'rte_config.h', language: 'c') > > +stdc_atomics_enabled = get_option('enable_stdatomics') > +dpdk_conf.set('RTE_STDC_ATOMICS', stdc_atomics_enabled) > + > +if stdc_atomics_enabled > +if cc.get_id() == 'gcc' or cc.get_id() == 'clang' > + add_project_arguments('-std=gnu11', language: 'c') Is there a reason for using gnu11 on gcc and clang, rather than limiting ourselves to proper c11 support? /Bruce