summaryrefslogtreecommitdiff
path: root/devtools
diff options
context:
space:
mode:
authorThomas Monjalon <[email protected]>2023-09-13 13:28:18 +0200
committerDavid Marchand <[email protected]>2023-09-22 15:42:17 +0200
commitce703c47de95528487058e7d053ec4e3ca3687c4 (patch)
treea305691a5183a55d0d90a59dc07b09a7dfec2c92 /devtools
parent531a04aa7025bb9d20ef76e6d91249ad7c863be1 (diff)
eal: force prefix for internal threads
In order to make sure all threads created in DPDK drivers and libraries have the same prefix in their name, some wrapper functions are added for internal use when creating a control thread or setting a thread name: - rte_thread_create_internal_control - rte_thread_set_prefixed_name The equivalent public functions are then forbidden for internal use: - rte_thread_create_control - rte_thread_set_name Note: the libraries and drivers conversion is done in next patches, while doing other thread-related changes. Signed-off-by: Thomas Monjalon <[email protected]> Acked-by: Morten Brørup <[email protected]> Acked-by: Tyler Retzlaff <[email protected]> Acked-by: Konstantin Ananyev <[email protected]>
Diffstat (limited to 'devtools')
-rwxr-xr-xdevtools/checkpatches.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index eae8d00804..b3ef5ed0cf 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -167,6 +167,14 @@ check_forbidden_additions() { # <patch>
-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
"$1" || res=1
+ # forbid non-internal thread in drivers and libs
+ awk -v FOLDERS='lib drivers' \
+ -v EXPRESSIONS="rte_thread_(set_name|create_control)\\\(" \
+ -v RET_ON_FAIL=1 \
+ -v MESSAGE='Prefer rte_thread_(set_prefixed_name|create_internal_control)' \
+ -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' \