|WARNING| pw167086 [RFC PATCH] NEW: pile stack and mempool driver
checkpatch at dpdk.org
checkpatch at dpdk.org
Sat Aug 1 10:09:25 CEST 2026
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/167086
_coding style issues_
WARNING:LONG_LINE: line length of 107 exceeds 100 columns
#157: FILE: app/test/test_stack.c:103:
+ popped_objs[STACK_SIZE - RTE_STACK_PILE_BULK_SIZE - i], i, bulk_sz);
ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#247: FILE: app/test/test_stack_perf.c:17:
+#define MAX_BURST RTE_MEMPOOL_CACHE_MAX_SIZE / 2
BUT SEE:
do {} while (0) advice is over-stated in a few situations:
The more obvious case is macros, like MODULE_PARM_DESC, invoked at
file-scope, where C disallows code (it must be in functions). See
$exceptions if you have one to add by name.
More troublesome is declarative macros used at top of new scope,
like DECLARE_PER_CPU. These might just compile with a do-while-0
wrapper, but would be incorrect. Most of these are handled by
detecting struct,union,etc declaration primitives in $exceptions.
Theres also macros called inside an if (block), which "return" an
expression. These cannot do-while, and need a ({}) wrapper.
Enjoy this qualification while we work to improve our heuristics.
WARNING:TYPO_SPELLING: 'mimick' may be misspelled - perhaps 'mimic'?
#381: FILE: doc/guides/prog_guide/stack_lib.rst:126:
+implementations (and uses type casting to mimick C++ class inheritance).
^^^^^^
WARNING:MACRO_ARG_UNUSED: Argument 'alignment' is not used in function-like macro
#529: FILE: lib/eal/include/rte_common.h:574:
+#define __rte_assume_aligned(ptr, alignment) (ptr)
ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)"
#1012: FILE: lib/stack/rte_stack.h:56:
+ sizeof(struct rte_stack_lf_elem *) + sizeof(void*),
ERROR:POINTER_LOCATION: "foo * const * bar" should be "foo * const *bar"
#1096: FILE: lib/stack/rte_stack.h:178:
+rte_stack_push(struct rte_stack *s, void * const * __rte_restrict obj_table, unsigned int n)
ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1113: FILE: lib/stack/rte_stack.h:204:
+rte_stack_pop(struct rte_stack *s, void ** __rte_restrict obj_table, unsigned int n)
ERROR:POINTER_LOCATION: "foo * const * bar" should be "foo * const *bar"
#1143: FILE: lib/stack/rte_stack_lf.h:37:
+ void * const * __rte_restrict obj_table,
ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1152: FILE: lib/stack/rte_stack_lf.h:74:
+__rte_stack_lf_pop(struct rte_stack *s, void ** __rte_restrict obj_table,
ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1174: FILE: lib/stack/rte_stack_lf_c11.h:102:
+ void ** __rte_restrict obj_table,
ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1187: FILE: lib/stack/rte_stack_lf_generic.h:77:
+ void ** __rte_restrict obj_table,
ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1200: FILE: lib/stack/rte_stack_lf_stubs.h:33:
+ void ** __rte_restrict obj_table,
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#1219: FILE: lib/stack/rte_stack_pile.c:10:
+ unsigned int bulk = (count + RTE_STACK_PILE_BULK_SIZE - 1) / RTE_STACK_PILE_BULK_SIZE;$
WARNING:LONG_LINE: line length of 111 exceeds 100 columns
#1220: FILE: lib/stack/rte_stack_pile.c:11:
+ struct rte_stack_pile_bulk_elem * bulk_elems = (struct rte_stack_pile_bulk_elem *)(&s->stack_pile + 1);
ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#1220: FILE: lib/stack/rte_stack_pile.c:11:
+ struct rte_stack_pile_bulk_elem * bulk_elems = (struct rte_stack_pile_bulk_elem *)(&s->stack_pile + 1);
ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#1221: FILE: lib/stack/rte_stack_pile.c:12:
+ struct rte_stack_lf_elem * solo_elems = (struct rte_stack_lf_elem *)&bulk_elems[bulk];
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#1235: FILE: lib/stack/rte_stack_pile.c:26:
+ unsigned int bulk = (count + RTE_STACK_PILE_BULK_SIZE - 1) / RTE_STACK_PILE_BULK_SIZE;$
ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1320: FILE: lib/stack/rte_stack_pile.h:72:
+ void ** __rte_restrict obj_table,
WARNING:LONG_LINE: line length of 161 exceeds 100 columns
#1323: FILE: lib/stack/rte_stack_pile.h:75:
+ struct rte_stack_pile_bulk_elem *first = (struct rte_stack_pile_bulk_elem *)__rte_stack_lf_pop_elems(list, num, NULL, (struct rte_stack_lf_elem **)last);
WARNING:LONG_LINE: line length of 131 exceeds 100 columns
#1331: FILE: lib/stack/rte_stack_pile.h:83:
+ rte_memcpy(&obj_table[i * RTE_STACK_PILE_BULK_SIZE], tmp->objs, sizeof(void *) * RTE_STACK_PILE_BULK_SIZE);
ERROR:POINTER_LOCATION: "foo * const * bar" should be "foo * const *bar"
#1351: FILE: lib/stack/rte_stack_pile.h:103:
+ void * const * __rte_restrict obj_table,
WARNING:UNNECESSARY_ELSE: else is not generally useful after a break or return
#1367: FILE: lib/stack/rte_stack_pile.h:119:
+ return 0;
+ else
WARNING:LONG_LINE: line length of 106 exceeds 100 columns
#1385: FILE: lib/stack/rte_stack_pile.h:137:
+ __rte_stack_pile_bulk_push_elems(&pile->free_bulk, bulk_first, bulk_last, n_bulk);
WARNING:LONG_LINE: line length of 143 exceeds 100 columns
#1413: FILE: lib/stack/rte_stack_pile.h:165:
+ rte_memcpy(tmp_bulk->objs, &obj_table[(n_bulk - i - 1) * RTE_STACK_PILE_BULK_SIZE], sizeof(void *) * RTE_STACK_PILE_BULK_SIZE);
ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1435: FILE: lib/stack/rte_stack_pile.h:187:
+ void ** __rte_restrict obj_table,
WARNING:UNNECESSARY_ELSE: else is not generally useful after a break or return
#1451: FILE: lib/stack/rte_stack_pile.h:203:
+ return 0;
+ else
WARNING:LONG_LINE_COMMENT: line length of 116 exceeds 100 columns
#1459: FILE: lib/stack/rte_stack_pile.h:211:
+ /* Not available. Retry with fewer bulk elements; objects to be fetched as solo elements instead. */
WARNING:LONG_LINE: line length of 126 exceeds 100 columns
#1473: FILE: lib/stack/rte_stack_pile.h:225:
+ solo_first = __rte_stack_lf_pop_elems(&pile->solo, n_solo, &obj_table[n_bulk * RTE_STACK_PILE_BULK_SIZE], &solo_last);
ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#1478: FILE: lib/stack/rte_stack_pile.h:230:
+ alignas(RTE_CACHE_LINE_SIZE) void * obj_frag[RTE_STACK_PILE_BULK_SIZE];
WARNING:LONG_LINE: line length of 101 exceeds 100 columns
#1486: FILE: lib/stack/rte_stack_pile.h:238:
+ __rte_stack_pile_bulk_push_elems(&pile->bulk, bulk_first, bulk_last, n_bulk);
WARNING:LONG_LINE: line length of 117 exceeds 100 columns
#1499: FILE: lib/stack/rte_stack_pile.h:251:
+ solo_first = __rte_stack_lf_pop_elems(&pile->free_solo, RTE_STACK_PILE_BULK_SIZE - n_solo, NULL, &solo_last);
WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#1521: FILE: lib/stack/rte_stack_pile.h:273:
+ __rte_stack_lf_push_elems(&pile->solo, solo_first, solo_last, RTE_STACK_PILE_BULK_SIZE - n_solo);
ERROR:POINTER_LOCATION: "foo * const * bar" should be "foo * const *bar"
#1582: FILE: lib/stack/rte_stack_std.h:24:
+__rte_stack_std_push(struct rte_stack *s, void * const * __rte_restrict obj_table,
ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#1588: FILE: lib/stack/rte_stack_std.h:27:
+ struct rte_stack_std * __rte_restrict stack = &s->stack_std;
ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1589: FILE: lib/stack/rte_stack_std.h:28:
+ void ** __rte_restrict stack_objs;
ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1618: FILE: lib/stack/rte_stack_std.h:60:
+__rte_stack_std_pop(struct rte_stack *s, void ** __rte_restrict obj_table, unsigned int n)
ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#1623: FILE: lib/stack/rte_stack_std.h:62:
+ struct rte_stack_std * __rte_restrict stack = &s->stack_std;
ERROR:POINTER_LOCATION: "foo ** bar" should be "foo **bar"
#1625: FILE: lib/stack/rte_stack_std.h:64:
+ void ** __rte_restrict stack_objs;
total: 21 errors, 17 warnings, 1371 lines checked
Warning in lib/mempool/rte_mempool.c:
Using rte_panic/rte_exit
Warning in lib/stack/rte_stack_pile.h:
Adding __rte_always_inline; prefer plain inline
Warning in app/test/test_stack.c:
Using compilers pragma is not allowed
More information about the test-report
mailing list