summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorJerin Jacob <[email protected]>2023-10-04 17:57:53 +0530
committerThomas Monjalon <[email protected]>2023-11-28 12:46:30 +0100
commitdd88f51a57255e93640cc880fd1e09ed6ffe1912 (patch)
treeb6f35379f05fd65994059cb2794f3cf1649499c4 /devtools
parent7e421ae345f48e4855fac86f07c10200eb92893b (diff)
devtools: forbid DPDK API in cnxk base driver
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 <[email protected]> Signed-off-by: Jerin Jacob <[email protected]>
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/checkpatches.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 066449d147..10b79ca2bc 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -175,6 +175,15 @@ check_forbidden_additions() { # <patch>
-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
"$1" || res=1
+ # forbid rte_ symbols in cnxk base driver
+ 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_ API in cnxk base driver' \
+ -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+ "$1" || res=1
+
# forbid inclusion of driver specific headers in apps and examples
awk -v FOLDERS='app examples' \
-v EXPRESSIONS='include.*_driver\\.h include.*_pmd\\.h' \