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 BAD3443028; Fri, 11 Aug 2023 03:32:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F12C40E03; Fri, 11 Aug 2023 03:32:08 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id AE34040DFB; Fri, 11 Aug 2023 03:32:05 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id C06D920FD043; Thu, 10 Aug 2023 18:32:04 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com C06D920FD043 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1691717524; bh=OGcf+UtqOGyazOGRdp3hch6M6hTCJYr2DBEObHi951M=; h=From:To:Cc:Subject:Date:From; b=c9pPQ0TrZUvYajsV6/8odgcfcyXzI2DOe/xSwxmu6qRu4Mo7zvS6nR2ptC9cu/Ed2 KGA80ymJtcer4qKGO7LfAm+Ud/1X6aXMjTXoR2awqEBax+A+Oq3QAjUyvRWj+Ux7vd Re0cy7rdJK94iL09q+JyA4X4830Wn1VuLZlPR7D4= From: Tyler Retzlaff To: dev@dpdk.org Cc: techboard@dpdk.org, Bruce Richardson , Honnappa Nagarahalli , Ruifeng Wang , Jerin Jacob , Sunil Kumar Kori , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , Joyce Kong , David Christensen , Konstantin Ananyev , David Hunt , Thomas Monjalon , David Marchand , Tyler Retzlaff Subject: [PATCH 0/6] RFC optional rte optional stdatomics API Date: Thu, 10 Aug 2023 18:31:55 -0700 Message-Id: <1691717521-1025-1-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 This series introduces API additions prefixed in the rte namespace that allow the optional use of stdatomics.h from C11 using enable_stdatomics=true for targets where enable_stdatomics=false no functional change is intended. Be aware this does not contain all changes to use stdatomics across the DPDK tree it only introduces the minimum to allow the option to be used which is a pre-requisite for a clean CI (probably using clang) that can be run with enable_stdatomics=true enabled. It is planned that subsequent series will be introduced per lib/driver as appropriate to further enable stdatomics use when enable_stdatomics=true. Notes: * additional libraries beyond EAL make visible atomics use across the API/ABI surface they will be converted in the next series. * the eal: add rte atomic qualifier with casts patch needs some discussion as to whether or not the legacy rte_atomic APIs should be converted to work with enable_stdatomic=true right now some implementation dependent casts are used to prevent cascading / having to convert too much in the intial series. * windows will obviously need complete conversion of libraries including atomics that are not crossing API/ABI boundaries. those conversions will introduced in separate series as new along side the existing msvc series. Please keep in mind we would like to prioritize the review / acceptance of this patch since it needs to be completed in the 23.11 merge window. Thank you all for the discussion that lead to the formation of this series. Tyler Retzlaff (6): eal: provide rte stdatomics optional atomics API eal: adapt EAL to present rte optional atomics API eal: add rte atomic qualifier with casts distributor: adapt for EAL optional atomics API changes bpf: adapt for EAL optional atomics API changes devtools: forbid new direct use of GCC atomic builtins app/test/test_mcslock.c | 6 +- config/meson.build | 1 + config/rte_config.h | 1 + devtools/checkpatches.sh | 8 ++ lib/bpf/bpf_pkt.c | 6 +- lib/distributor/distributor_private.h | 2 +- lib/distributor/rte_distributor_single.c | 44 ++++----- lib/eal/arm/include/rte_atomic_64.h | 32 +++--- lib/eal/arm/include/rte_pause_64.h | 26 ++--- lib/eal/arm/rte_power_intrinsics.c | 8 +- lib/eal/common/eal_common_trace.c | 16 +-- lib/eal/include/generic/rte_atomic.h | 66 ++++++++----- lib/eal/include/generic/rte_pause.h | 41 ++++---- lib/eal/include/generic/rte_rwlock.h | 47 ++++----- lib/eal/include/generic/rte_spinlock.h | 19 ++-- lib/eal/include/meson.build | 1 + lib/eal/include/rte_mcslock.h | 50 +++++----- lib/eal/include/rte_pflock.h | 24 ++--- lib/eal/include/rte_seqcount.h | 18 ++-- lib/eal/include/rte_stdatomic.h | 162 +++++++++++++++++++++++++++++++ lib/eal/include/rte_ticketlock.h | 42 ++++---- lib/eal/include/rte_trace_point.h | 4 +- lib/eal/ppc/include/rte_atomic.h | 50 +++++----- lib/eal/x86/include/rte_atomic.h | 4 +- lib/eal/x86/include/rte_spinlock.h | 2 +- lib/eal/x86/rte_power_intrinsics.c | 7 +- meson_options.txt | 1 + 27 files changed, 445 insertions(+), 243 deletions(-) create mode 100644 lib/eal/include/rte_stdatomic.h -- 1.8.3.1