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 0ECA8430D4; Tue, 22 Aug 2023 23:01:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 562E443260; Tue, 22 Aug 2023 23:00:55 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 3D35E4021D; Tue, 22 Aug 2023 23:00:48 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 026252126CDB; Tue, 22 Aug 2023 14:00:46 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 026252126CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1692738047; bh=dPVf8W62lQaU2c+xjBNCA9Ps9gI6IleYBRgNhWLT75w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nIA63GDTpa24euNzErxdWrGD9BJHX5warupXZXR60O6IgCxDVtbXYJLFT9xhyufOk PBMpcvKmNHXEThtetdPpSGj+h/S9nwjHvx+bgr7ZU8LjuEyp1EvGaLnDqbzBRevbci umHoqjm4sDhNT1kNnPQOfMAXlveNRQHjsV7vPoG0= 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 v6 6/6] devtools: forbid new direct use of GCC atomic builtins Date: Tue, 22 Aug 2023 14:00:45 -0700 Message-Id: <1692738045-32363-7-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1692738045-32363-1-git-send-email-roretzla@linux.microsoft.com> References: <1691717521-1025-1-git-send-email-roretzla@linux.microsoft.com> <1692738045-32363-1-git-send-email-roretzla@linux.microsoft.com> 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 Refrain from using compiler __atomic_xxx builtins DPDK now requires the use of rte_atomic__explicit macros when operating on DPDK atomic variables. Signed-off-by: Tyler Retzlaff Suggested-by: Morten Brørup Acked-by: Bruce Richardson Acked-by: Morten Brørup Acked-by: Konstantin Ananyev --- devtools/checkpatches.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh index 43f5e36..3f051f5 100755 --- a/devtools/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -102,20 +102,20 @@ check_forbidden_additions() { # -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ "$1" || res=1 - # refrain from using compiler __atomic_thread_fence() + # refrain from using compiler __rte_atomic_thread_fence() # It should be avoided on x86 for SMP case. awk -v FOLDERS="lib drivers app examples" \ - -v EXPRESSIONS="__atomic_thread_fence\\\(" \ + -v EXPRESSIONS="__rte_atomic_thread_fence\\\(" \ -v RET_ON_FAIL=1 \ - -v MESSAGE='Using __atomic_thread_fence' \ + -v MESSAGE='Using __rte_atomic_thread_fence, prefer rte_atomic_thread_fence' \ -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ "$1" || res=1 - # refrain from using compiler __atomic_{add,and,nand,or,sub,xor}_fetch() + # refrain from using compiler __atomic_xxx builtins awk -v FOLDERS="lib drivers app examples" \ - -v EXPRESSIONS="__atomic_(add|and|nand|or|sub|xor)_fetch\\\(" \ + -v EXPRESSIONS="__atomic_.*\\\(" \ -v RET_ON_FAIL=1 \ - -v MESSAGE='Using __atomic_op_fetch, prefer __atomic_fetch_op' \ + -v MESSAGE='Using __atomic_xxx built-ins, prefer rte_atomic_xxx' \ -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \ "$1" || res=1 -- 1.8.3.1