DPDK patches and discussions
 help / color / mirror / Atom feed
From: <jerinj@marvell.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: <dev@dpdk.org>, <david.marchand@redhat.com>,
	Jerin Jacob <jerinj@marvell.com>
Subject: [dpdk-dev] [PATCH 2/2] devtools: forbid rte symbols in cnxk base driver
Date: Wed, 4 Oct 2023 17:57:53 +0530	[thread overview]
Message-ID: <20231004122753.3261337-2-jerinj@marvell.com> (raw)
In-Reply-To: <20231004122753.3261337-1-jerinj@marvell.com>

From: Jerin Jacob <jerinj@marvell.com>

cnxk base code is shared between different driver environments.

Forbid the direct usage of rte_ symbols instead use plt_
symbol as alternatives.

roc_platform.[ch] files abstract the difference of driver
environment, hence skip those files for rules check.

Suggested-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
 devtools/checkpatches.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 2635923e14..8baa4e9a04 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -223,6 +223,15 @@ check_forbidden_additions() { # <patch>
 		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
 		"$1" || res=1
 
+	# forbid using rte_ symbols in cnxk driver base code
+	awk -v FOLDERS='drivers/common/cnxk/roc_*' \
+		-v SKIP_FILES='roc_platform*' \
+		-v EXPRESSIONS="rte_ RTE_" \
+		-v RET_ON_FAIL=1 \
+		-v MESSAGE='Use plt_ symbols instead of rte_ symbols in cnxk driver base code' \
+		-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+		"$1" || res=1
+
 	return $res
 }
 
-- 
2.42.0


  reply	other threads:[~2023-10-04 12:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04 12:27 [dpdk-dev] [PATCH 1/2] devtools: support skipping forbid rule check jerinj
2023-10-04 12:27 ` jerinj [this message]
2023-11-28 11:54   ` [dpdk-dev] [PATCH 2/2] devtools: forbid rte symbols in cnxk base driver Thomas Monjalon
2023-11-17  4:34 ` [dpdk-dev] [PATCH 1/2] devtools: support skipping forbid rule check Jerin Jacob

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=20231004122753.3261337-2-jerinj@marvell.com \
    --to=jerinj@marvell.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).