[dpdk-test-report] |WARNING| pw68257 [PATCH] eal: Place EAL thread stack in a reserved per-lcore memzone

checkpatch at dpdk.org checkpatch at dpdk.org
Mon Apr 13 11:10:06 CEST 2020


Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/68257

_coding style issues_


WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#76: 
Reserve a per-lcore 4MB memzone and allocate thread stack of EAL threads there for better NUMA locality of stack-allocated variables

WARNING:LONG_LINE: line over 90 characters
#104: FILE: lib/librte_eal/linux/eal.c:1233:
+		snprintf(thread_stack_name, sizeof thread_stack_name, "rte:lcore:%s:%d:threadstack", rte_eal_process_type() == RTE_PROC_PRIMARY ? "p" : "s", i);

WARNING:SIZEOF_PARENTHESIS: sizeof thread_stack_name should be sizeof(thread_stack_name)
#104: FILE: lib/librte_eal/linux/eal.c:1233:
+		snprintf(thread_stack_name, sizeof thread_stack_name, "rte:lcore:%s:%d:threadstack", rte_eal_process_type() == RTE_PROC_PRIMARY ? "p" : "s", i);

WARNING:LONG_LINE: line over 90 characters
#107: FILE: lib/librte_eal/linux/eal.c:1236:
+			if ((mz = rte_memzone_reserve(thread_stack_name, thread_stack_size, lcore_config[i].socket_id, 0)) == NULL) {

ERROR:ASSIGN_IN_IF: do not use assignment in if condition
#107: FILE: lib/librte_eal/linux/eal.c:1236:
+			if ((mz = rte_memzone_reserve(thread_stack_name, thread_stack_size, lcore_config[i].socket_id, 0)) == NULL) {

WARNING:BRACES: braces {} are not necessary for single statement blocks
#107: FILE: lib/librte_eal/linux/eal.c:1236:
+			if ((mz = rte_memzone_reserve(thread_stack_name, thread_stack_size, lcore_config[i].socket_id, 0)) == NULL) {
+				rte_panic("Cannot allocate memzone for thread stack");
+			}

WARNING:BRACES: braces {} are not necessary for single statement blocks
#113: FILE: lib/librte_eal/linux/eal.c:1242:
+		if (pthread_attr_setstack(&attr, thread_stack, thread_stack_size) < 0) {
+			rte_panic("Cannot set thread stack
");
+		}

WARNING:LONG_LINE: line over 90 characters
#116: FILE: lib/librte_eal/linux/eal.c:1245:
+		RTE_LOG(DEBUG, EAL, "Thread stack for lcore %d on socket %d set to %p
", i, lcore_config[i].socket_id, thread_stack);

total: 1 errors, 7 warnings, 32 lines checked
Warning in /lib/librte_eal/linux/eal.c:
Using rte_panic/rte_exit


More information about the test-report mailing list