[dpdk-dev] [PATCH 2/2] devtools: forbid rte symbols in cnxk base driver

jerinj at marvell.com jerinj at marvell.com
Wed Oct 4 14:27:53 CEST 2023


From: Jerin Jacob <jerinj at 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 at redhat.com>
Signed-off-by: Jerin Jacob <jerinj at 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



More information about the dev mailing list