|WARNING| pw159211 [PATCH] af_xdp kick_tx Retries instead of endless loop
checkpatch at dpdk.org
checkpatch at dpdk.org
Sun Dec 7 17:26:16 CET 2025
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/159211
_coding style issues_
WARNING:BAD_SIGN_OFF: Do not use whitespace before Signed-off-by:
#155:
Signed-off-by: Yan Yanovsky <yan.yanovsky at catonetworks.com>
ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses
#171: FILE: drivers/net/af_xdp/rte_eth_af_xdp.c:83:
+#define MAX_TX_KICK_TRIESââââ10
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:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (0, 0)
#190: FILE: drivers/net/af_xdp/rte_eth_af_xdp.c:489:
+âââââif (!tx_syscall_needed(&txq->tx))
+âââââââââââreturn;
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (0, 0)
#195: FILE: drivers/net/af_xdp/rte_eth_af_xdp.c:492:
+âââââfor (tries = 0; tries < MAX_TX_KICK_TRIES; tries++) {
[...]
+âââââââââââââââââââââââMSG_DONTWAIT) >= 0)
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (0, 0)
#196: FILE: drivers/net/af_xdp/rte_eth_af_xdp.c:493:
+âââââââââââif (send(xsk_socket__fd(txq->pair->xsk), NULL, 0,
[...]
+âââââââââââââââââbreak;
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (0, 0)
#199: FILE: drivers/net/af_xdp/rte_eth_af_xdp.c:496:
+âââââââââââif (errno != EBUSY && errno != EAGAIN && errno != EINTR)
+âââââââââââââââââbreak;
WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (0, 0)
#202: FILE: drivers/net/af_xdp/rte_eth_af_xdp.c:499:
+âââââââââââif (errno == EAGAIN) {
[...]
+âââââââââââââââââ* is lagging behind. Try pulling CQ to free room. */\
WARNING:LONG_LINE_COMMENT: line length of 106 exceeds 100 columns
#203: FILE: drivers/net/af_xdp/rte_eth_af_xdp.c:500:
+âââââââââââââââââ/* Kernel TX ring has no space or UMEM completion queue
WARNING:LONG_LINE: line length of 105 exceeds 100 columns
#204: FILE: drivers/net/af_xdp/rte_eth_af_xdp.c:501:
+âââââââââââââââââ* is lagging behind. Try pulling CQ to free room. */\
WARNING:BLOCK_COMMENT_STYLE: Block comments use * on subsequent lines
#204: FILE: drivers/net/af_xdp/rte_eth_af_xdp.c:501:
+âââââââââââââââââ/* Kernel TX ring has no space or UMEM completion queue
+âââââââââââââââââ* is lagging behind. Try pulling CQ to free room. */\
WARNING:LINE_CONTINUATIONS: Avoid unnecessary line continuations
#204: FILE: drivers/net/af_xdp/rte_eth_af_xdp.c:501:
+âââââââââââââââââ* is lagging behind. Try pulling CQ to free room. */\
WARNING:LONG_LINE: line length of 138 exceeds 100 columns
#208: FILE: drivers/net/af_xdp/rte_eth_af_xdp.c:503:
+âââââââââââââââââââââââââââââââââââXSK_RING_CONS__DEFAULT_NUM_DESCS,
WARNING:LONG_LINE: line length of 109 exceeds 100 columns
#209: FILE: drivers/net/af_xdp/rte_eth_af_xdp.c:504:
+âââââââââââââââââââââââââââââââââââcq);
total: 1 errors, 12 warnings, 0 checks, 46 lines checked
More information about the test-report
mailing list