DPDK patches and discussions
 help / color / mirror / Atom feed
From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: Gaetan Rivet <grive@u256.net>,
	Bruce Richardson <bruce.richardson@intel.com>,
	Thomas Monjalon <thomas@monjalon.net>,
	Nicolas Chautru <nicolas.chautru@intel.com>,
	Yipeng Wang <yipeng1.wang@intel.com>,
	Sameh Gobriel <sameh.gobriel@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,
	Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	Olivier Matz <olivier.matz@6wind.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Joyce Kong <joyce.kong@arm.com>,
	Erik Gabriel Carrillo <erik.g.carrillo@intel.com>,
	Liang Ma <liangma@liangbit.com>,
	Peter Mccarthy <peter.mccarthy@intel.com>,
	Jerin Jacob <jerinj@marvell.com>,
	Maciej Czekaj <mczekaj@marvell.com>,
	David Hunt <david.hunt@intel.com>,
	Ruifeng Wang <ruifeng.wang@arm.com>,
	Min Zhou <zhoumin@loongson.cn>,
	David Christensen <drc@linux.vnet.ibm.com>,
	Stanislaw Kardach <kda@semihalf.com>,
	david.marchand@redhat.com, stephen@networkplumber.org,
	mb@smartsharesystems.com,
	Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH 2/4] devtools: forbid use of GCC atomic builtins
Date: Mon, 31 Jul 2023 14:07:39 -0700	[thread overview]
Message-ID: <1690837661-27573-3-git-send-email-roretzla@linux.microsoft.com> (raw)
In-Reply-To: <1690837661-27573-1-git-send-email-roretzla@linux.microsoft.com>

Refrain from using compiler __atomic_xxx builtins DPDK now uses standard
C11 atomics atomic_xxx.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 devtools/checkpatches.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 43f5e36..a32f02e 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -102,6 +102,14 @@ check_forbidden_additions() { # <patch>
 		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
 		"$1" || res=1
 
+	# refrain from using compiler __atomic_xxx builtins
+	awk -v FOLDERS="lib drivers app examples" \
+		-v EXPRESSIONS="__atomic_.*\\\(" \
+		-v RET_ON_FAIL=1 \
+		-v MESSAGE='Using __atomic_xxx builtins' \
+		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+		"$1" || res=1
+
 	# refrain from using compiler __atomic_thread_fence()
 	# It should be avoided on x86 for SMP case.
 	awk -v FOLDERS="lib drivers app examples" \
-- 
1.8.3.1


  parent reply	other threads:[~2023-07-31 21:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-31 21:07 [PATCH 0/4] eal: update public API to use stdatomic atomics Tyler Retzlaff
2023-07-31 21:07 ` [PATCH 1/4] build: require minimum c11 compiler Tyler Retzlaff
2023-07-31 21:07 ` Tyler Retzlaff [this message]
2023-07-31 21:07 ` [PATCH 3/4] eal: adapt rte pause APIs to use C11 atomics Tyler Retzlaff
2023-07-31 21:07 ` [PATCH 4/4] eal: adapt rte spinlock and rwlock " Tyler Retzlaff
2023-08-01  5:03 ` [PATCH v2 0/4] eal: update public API to use stdatomic atomics Tyler Retzlaff
2023-08-01  5:03   ` [PATCH v2 1/4] build: require minimum c11 compiler Tyler Retzlaff
2023-08-01  5:03   ` [PATCH v2 2/4] devtools: forbid use of GCC atomic builtins Tyler Retzlaff
2023-08-01  5:03   ` [PATCH v2 3/4] eal: adapt rte pause APIs to use C11 atomics Tyler Retzlaff
2023-08-01  5:03   ` [PATCH v2 4/4] eal: adapt rte spinlock and rwlock " Tyler Retzlaff
2023-08-01  7:33   ` [PATCH v2 0/4] eal: update public API to use stdatomic atomics Morten Brørup
2023-08-01 17:07   ` Tyler Retzlaff
2023-08-02  5:13 ` [PATCH v3 " Tyler Retzlaff
2023-08-02  5:13   ` [PATCH v3 1/4] build: require minimum c11 compiler Tyler Retzlaff
2023-08-02  5:13   ` [PATCH v3 2/4] devtools: forbid use of GCC atomic builtins Tyler Retzlaff
2023-08-02  5:13   ` [PATCH v3 3/4] eal: adapt rte pause APIs to use C11 atomics Tyler Retzlaff
2023-08-02  5:13   ` [PATCH v3 4/4] eal: adapt rte spinlock and rwlock " Tyler Retzlaff
2023-08-02  5:31 ` [PATCH v4 0/4] eal: update public API to use stdatomic atomics Tyler Retzlaff
2023-08-02  5:31   ` [PATCH v4 1/4] build: require minimum c11 compiler Tyler Retzlaff
2023-08-02  5:31   ` [PATCH v4 2/4] devtools: forbid use of GCC atomic builtins Tyler Retzlaff
2023-08-02  5:31   ` [PATCH v4 3/4] eal: adapt rte pause APIs to use C11 atomics Tyler Retzlaff
2023-08-02  5:31   ` [PATCH v4 4/4] eal: adapt rte spinlock and rwlock " Tyler Retzlaff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1690837661-27573-3-git-send-email-roretzla@linux.microsoft.com \
    --to=roretzla@linux.microsoft.com \
    --cc=anatoly.burakov@intel.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bruce.richardson@intel.com \
    --cc=david.hunt@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=drc@linux.vnet.ibm.com \
    --cc=erik.g.carrillo@intel.com \
    --cc=grive@u256.net \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=jerinj@marvell.com \
    --cc=joyce.kong@arm.com \
    --cc=kda@semihalf.com \
    --cc=konstantin.v.ananyev@yandex.ru \
    --cc=liangma@liangbit.com \
    --cc=mb@smartsharesystems.com \
    --cc=mczekaj@marvell.com \
    --cc=nicolas.chautru@intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=peter.mccarthy@intel.com \
    --cc=ruifeng.wang@arm.com \
    --cc=sameh.gobriel@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    --cc=vladimir.medvedkin@intel.com \
    --cc=yipeng1.wang@intel.com \
    --cc=zhoumin@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).