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 9E3D241C51; Thu, 9 Feb 2023 13:53:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 816A94067B; Thu, 9 Feb 2023 13:53:49 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2072.outbound.protection.outlook.com [40.107.223.72]) by mails.dpdk.org (Postfix) with ESMTP id A4700400D5 for ; Thu, 9 Feb 2023 13:53:48 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XFNKHRnq2XTR1R4atTnoUmRxI1kxJbcroWPGk28Y3wYhXpID5ZNclIWTuNyn9jC8sI6Y+/W5BPsOM756bYA8Cjb1y0+1j3jtXg2l4CtbbC1fT7NC7o93KEyMI5lCuVakIi+R0nN9+gpYgGAJgod/VFYW4JfOQx0giBjC2sXNXe2M2d23d30mv+cToX92ZGqIMiOaW6OFo6sfj+vct1GhvzYPenurEtzmluINA7Qso3Gwdh7pLh+MxuskTbXWjmfPsIXMd0K36q1P0N+x4ESxeyVX9Wo+7/D6ZbPcEQfu9al0aBKCF3l2udd/phAksYu2Kkldpj5ztxq6ou1/eD7O7A== 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=9EOhc6PzcpGTchWR+lN+3YXA1BqU2bA/n7kY4AKd3sw=; b=AEq+U2VHvlVd/knm9h0KIMO0FHhaaruieXNZSDLk+9MB/c7KidjoxPC6vUwbzK6fBOrn9IraBqvp16EMFbr6/4jW6q1QRUUECx34TSFGhyoK4eM8ukiuxw9mqS+AnB6by83rhLti4qg33h+rGBWN5tbkfETuvzm7gVfc5WXCq+gWfpXuN9m6ybrJa+kiJwUvDD/qcHYR9FGW73SYaciW2ulXJuKjHRIn8vykB1UXVyCE+MHBdGC6LfHSv6vYYpIXOOwitwo+anWcXKxo87OjZy39p27dGMyfLL2UUCi6A0CSEnl2ZxRtJRt30tZwmQuaDg5kSD5Ro1gE6rX7kxLwRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9EOhc6PzcpGTchWR+lN+3YXA1BqU2bA/n7kY4AKd3sw=; b=osz/cdQQZH9ZTVUOWtfSu0lXgEUd7fR3Vu2Tvj4KGx2EQxjcH0BdcAYfmVtIMnfo9pT5bQOTSmBSFZlqY/n4WjTMQ1YncaSlcusdaJnREKi+tOv3VzII5lvYzW9gsq0ooRvrhcvYOtnXQbSSj7Wdl1dXQ6GU0tC1/SIZX3ehsv4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM4PR12MB5136.namprd12.prod.outlook.com (2603:10b6:5:393::23) 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 12:53:47 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48%6]) with mapi id 15.20.6086.017; Thu, 9 Feb 2023 12:53:47 +0000 Message-ID: Date: Thu, 9 Feb 2023 12:53:41 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v2] eal: introduce atomics abstraction Content-Language: en-US To: Bruce Richardson , Tyler Retzlaff Cc: dev@dpdk.org, david.marchand@redhat.com, thomas@monjalon.net, mb@smartsharesystems.com, Honnappa.Nagarahalli@arm.com 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> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0048.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ac::8) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB5136:EE_ X-MS-Office365-Filtering-Correlation-Id: a2c00216-9392-4187-5be6-08db0a9caeba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7PzU8GckMSm8sA/ZCVqcTp36ChnQmqq4JMkLB/w7SENRZQAi6RVc+d1sIeKwhTInlzdKfGCV1sp6c5JWorgbfrx2tMe8+vtwUR/CyNLWxnsV4NHaelUUvXWUTWZCWWMnA/tosQGMdzUVskZ4w5xbtr6mpmb7N1ORzKhRgr/O6PEv1u5qxVDVIiQyK/QzGbji+zrDbZeRzmY0mrKY7/RFsXkMihJVlc6ZGyjexmq9cQvrraGFBmv7x5V+aCePAWAKMU/ukKyJ8EmwaBDkfBV2ntKhHs/R8LVTIUgLsf1XFgkiFy2i+D5a4ipi9FfXxyAFVygu7PVpSDKA+JL/vq7tSlvgzwHEowEpwK/9Q0dtcHW/K+AZfNX999t1rneZZqsRYMXWJnGC+263BjLKZfgEX8gi3okcsq25AzGUeimo15K8Srp4ygNtk6ewlZei/sU6crtwiV+1CPTrBzo5vVGi1hG4nOROTqZGm/0aVKIXId8FCM2eDOKyktKwsIFat7bREePz7VK9m2V1oPG6AsJAPD+TVo5HU+6WjhxwOHPYOXtRuBQvu3PdVSGHLIJpLfMbG4eK4YBz69s+hRE6sVK6VSVSbfVX3GMxK4jTJmFrEcFa+Lc8QzS8Z4dwlu8paA765+iP1tdfFUPvPxTIGk8dy4ouJYxQ9wTKVmgt9WHMUmPB/TLT5SCZgOADtRJZV5nLkve61JJnWz74w+gRvtvIJYcBsiv3lqpd4p+NktomByo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(396003)(366004)(39860400002)(346002)(136003)(376002)(451199018)(4326008)(31686004)(8676002)(66556008)(66946007)(66476007)(41300700001)(38100700002)(2616005)(26005)(186003)(6512007)(2906002)(478600001)(6506007)(53546011)(316002)(6666004)(8936002)(86362001)(31696002)(6486002)(5660300002)(83380400001)(110136005)(36756003)(44832011)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Si9UMzBYVCszdE1rSXpjVFVDMGRpVnU1WGwvcWZCMzltNURZQlhzbWtqdGw5?= =?utf-8?B?clhiclVmNmphUDdYM3FFWjJ0cUhZTGpLbFFWTjhFNEtXdDZLUVRzQk1JUndL?= =?utf-8?B?T2xTU0Y2ZXVYSjI5NjY1bGtnS2xmZlFFTDhzbGFwOUxzWjJGejNyaXVTbS8y?= =?utf-8?B?ZXFwNkMyblRicVhzcXRKdnNmM2drcnJmQW0vb1ppcnRPbFVnRGZYUk02RXJt?= =?utf-8?B?V2RacjBhMnFpUStMd3k2c3NyN2lJNStwZDFWMWpjOHhwakt4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9GdEc1dFdRdFFQYW5jZWR2cFhCVWZq?= =?utf-8?Q?SIlkrpq1DBiRbJHA5GVH6ceqb?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2c00216-9392-4187-5be6-08db0a9caeba X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Feb 2023 12:53:46.8630 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: woA0G5SlHqHW6dKV4A10CCckzSlAzRs5EzKRlBzxbv/Mx3Tb1kjJtnRbynTk5CaL X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5136 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 2/9/2023 9:04 AM, Bruce Richardson wrote: > 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? > +1 to stick to c11 standard instead of relying compiler extensions