* |WARNING| pw126816 [PATCH] examples/l3fwd: add hard code to collect empty poll and NIC counters
[not found] <20230511082519.4168523-1-feifei.wang2@arm.com>
@ 2023-05-11 8:26 ` checkpatch
2023-05-11 8:26 ` |SUCCESS| " qemudev
2023-05-11 8:30 ` qemudev
2 siblings, 0 replies; 3+ messages in thread
From: checkpatch @ 2023-05-11 8:26 UTC (permalink / raw)
To: test-report; +Cc: Feifei Wang
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/126816
_coding style issues_
WARNING:TYPO_SPELLING: 'stoping' may be misspelled - perhaps 'stopping'?
#59:
stoping l3fwd, thread will print the info above.
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#85: FILE: examples/l3fwd/l3fwd.h:60:
+ uint32_t nb_rx_pkts[16];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#86: FILE: examples/l3fwd/l3fwd.h:61:
+ uint32_t num_loop[16];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#87: FILE: examples/l3fwd/l3fwd.h:62:
+ uint32_t none_loop[16];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#88: FILE: examples/l3fwd/l3fwd.h:63:
+ uint32_t no_full_loop[16];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#89: FILE: examples/l3fwd/l3fwd.h:64:
+ float none_loop_per[16];$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#90: FILE: examples/l3fwd/l3fwd.h:65:
+ float no_full_loop_per[16];$
ERROR:CODE_INDENT: code indent should use tabs where possible
#105: FILE: examples/l3fwd/l3fwd.h:132:
+ struct rte_eth_xstat *xstats;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#105: FILE: examples/l3fwd/l3fwd.h:132:
+ struct rte_eth_xstat *xstats;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#106: FILE: examples/l3fwd/l3fwd.h:133:
+ int cnt_xstats, idx_xstat;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#106: FILE: examples/l3fwd/l3fwd.h:133:
+ int cnt_xstats, idx_xstat;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#107: FILE: examples/l3fwd/l3fwd.h:134:
+ struct rte_eth_xstat_name *xstats_names;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#107: FILE: examples/l3fwd/l3fwd.h:134:
+ struct rte_eth_xstat_name *xstats_names;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#109: FILE: examples/l3fwd/l3fwd.h:136:
+ printf("###### NIC extended statistics for port %-2d
", port_id);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#109: FILE: examples/l3fwd/l3fwd.h:136:
+ printf("###### NIC extended statistics for port %-2d
", port_id);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#110: FILE: examples/l3fwd/l3fwd.h:137:
+ if (!rte_eth_dev_is_valid_port(port_id)) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#110: FILE: examples/l3fwd/l3fwd.h:137:
+ if (!rte_eth_dev_is_valid_port(port_id)) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#111: FILE: examples/l3fwd/l3fwd.h:138:
+ fprintf(stderr, "Error: Invalid port number %i
", port_id);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#111: FILE: examples/l3fwd/l3fwd.h:138:
+ fprintf(stderr, "Error: Invalid port number %i
", port_id);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#112: FILE: examples/l3fwd/l3fwd.h:139:
+ return;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#112: FILE: examples/l3fwd/l3fwd.h:139:
+ return;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#113: FILE: examples/l3fwd/l3fwd.h:140:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#113: FILE: examples/l3fwd/l3fwd.h:140:
+ }$
ERROR:CODE_INDENT: code indent should use tabs where possible
#115: FILE: examples/l3fwd/l3fwd.h:142:
+ /* Get count */$
ERROR:CODE_INDENT: code indent should use tabs where possible
#116: FILE: examples/l3fwd/l3fwd.h:143:
+ cnt_xstats = rte_eth_xstats_get_names(port_id, NULL, 0);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#116: FILE: examples/l3fwd/l3fwd.h:143:
+ cnt_xstats = rte_eth_xstats_get_names(port_id, NULL, 0);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#117: FILE: examples/l3fwd/l3fwd.h:144:
+ if (cnt_xstats < 0) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#117: FILE: examples/l3fwd/l3fwd.h:144:
+ if (cnt_xstats < 0) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#118: FILE: examples/l3fwd/l3fwd.h:145:
+ fprintf(stderr, "Error: Cannot get count of xstats
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#118: FILE: examples/l3fwd/l3fwd.h:145:
+ fprintf(stderr, "Error: Cannot get count of xstats
");$
ERROR:CODE_INDENT: code indent should use tabs where possible
#119: FILE: examples/l3fwd/l3fwd.h:146:
+ return;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#119: FILE: examples/l3fwd/l3fwd.h:146:
+ return;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#120: FILE: examples/l3fwd/l3fwd.h:147:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#120: FILE: examples/l3fwd/l3fwd.h:147:
+ }$
ERROR:CODE_INDENT: code indent should use tabs where possible
#122: FILE: examples/l3fwd/l3fwd.h:149:
+ /* Get id-name lookup table */$
ERROR:CODE_INDENT: code indent should use tabs where possible
#123: FILE: examples/l3fwd/l3fwd.h:150:
+ xstats_names = malloc(sizeof(struct rte_eth_xstat_name) * cnt_xstats);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#123: FILE: examples/l3fwd/l3fwd.h:150:
+ xstats_names = malloc(sizeof(struct rte_eth_xstat_name) * cnt_xstats);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#124: FILE: examples/l3fwd/l3fwd.h:151:
+ if (xstats_names == NULL) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#124: FILE: examples/l3fwd/l3fwd.h:151:
+ if (xstats_names == NULL) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#125: FILE: examples/l3fwd/l3fwd.h:152:
+ fprintf(stderr, "Cannot allocate memory for xstats lookup
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#125: FILE: examples/l3fwd/l3fwd.h:152:
+ fprintf(stderr, "Cannot allocate memory for xstats lookup
");$
ERROR:CODE_INDENT: code indent should use tabs where possible
#126: FILE: examples/l3fwd/l3fwd.h:153:
+ return;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#126: FILE: examples/l3fwd/l3fwd.h:153:
+ return;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#127: FILE: examples/l3fwd/l3fwd.h:154:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#127: FILE: examples/l3fwd/l3fwd.h:154:
+ }$
ERROR:CODE_INDENT: code indent should use tabs where possible
#128: FILE: examples/l3fwd/l3fwd.h:155:
+ if (cnt_xstats != rte_eth_xstats_get_names($
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#128: FILE: examples/l3fwd/l3fwd.h:155:
+ if (cnt_xstats != rte_eth_xstats_get_names($
ERROR:CODE_INDENT: code indent should use tabs where possible
#129: FILE: examples/l3fwd/l3fwd.h:156:
+ port_id, xstats_names, cnt_xstats)) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#129: FILE: examples/l3fwd/l3fwd.h:156:
+ port_id, xstats_names, cnt_xstats)) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#130: FILE: examples/l3fwd/l3fwd.h:157:
+ fprintf(stderr, "Error: Cannot get xstats lookup
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#130: FILE: examples/l3fwd/l3fwd.h:157:
+ fprintf(stderr, "Error: Cannot get xstats lookup
");$
ERROR:CODE_INDENT: code indent should use tabs where possible
#131: FILE: examples/l3fwd/l3fwd.h:158:
+ free(xstats_names);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#131: FILE: examples/l3fwd/l3fwd.h:158:
+ free(xstats_names);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#132: FILE: examples/l3fwd/l3fwd.h:159:
+ return;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#132: FILE: examples/l3fwd/l3fwd.h:159:
+ return;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#133: FILE: examples/l3fwd/l3fwd.h:160:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#133: FILE: examples/l3fwd/l3fwd.h:160:
+ }$
ERROR:CODE_INDENT: code indent should use tabs where possible
#135: FILE: examples/l3fwd/l3fwd.h:162:
+ /* Get stats themselves */$
ERROR:CODE_INDENT: code indent should use tabs where possible
#136: FILE: examples/l3fwd/l3fwd.h:163:
+ xstats = malloc(sizeof(struct rte_eth_xstat) * cnt_xstats);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#136: FILE: examples/l3fwd/l3fwd.h:163:
+ xstats = malloc(sizeof(struct rte_eth_xstat) * cnt_xstats);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#137: FILE: examples/l3fwd/l3fwd.h:164:
+ if (xstats == NULL) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#137: FILE: examples/l3fwd/l3fwd.h:164:
+ if (xstats == NULL) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#138: FILE: examples/l3fwd/l3fwd.h:165:
+ fprintf(stderr, "Cannot allocate memory for xstats
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#138: FILE: examples/l3fwd/l3fwd.h:165:
+ fprintf(stderr, "Cannot allocate memory for xstats
");$
ERROR:CODE_INDENT: code indent should use tabs where possible
#139: FILE: examples/l3fwd/l3fwd.h:166:
+ free(xstats_names);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#139: FILE: examples/l3fwd/l3fwd.h:166:
+ free(xstats_names);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#140: FILE: examples/l3fwd/l3fwd.h:167:
+ return;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#140: FILE: examples/l3fwd/l3fwd.h:167:
+ return;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#141: FILE: examples/l3fwd/l3fwd.h:168:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#141: FILE: examples/l3fwd/l3fwd.h:168:
+ }$
ERROR:CODE_INDENT: code indent should use tabs where possible
#142: FILE: examples/l3fwd/l3fwd.h:169:
+ if (cnt_xstats != rte_eth_xstats_get(port_id, xstats, cnt_xstats)) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#142: FILE: examples/l3fwd/l3fwd.h:169:
+ if (cnt_xstats != rte_eth_xstats_get(port_id, xstats, cnt_xstats)) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#143: FILE: examples/l3fwd/l3fwd.h:170:
+ fprintf(stderr, "Error: Unable to get xstats
");$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#143: FILE: examples/l3fwd/l3fwd.h:170:
+ fprintf(stderr, "Error: Unable to get xstats
");$
ERROR:CODE_INDENT: code indent should use tabs where possible
#144: FILE: examples/l3fwd/l3fwd.h:171:
+ free(xstats_names);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#144: FILE: examples/l3fwd/l3fwd.h:171:
+ free(xstats_names);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#145: FILE: examples/l3fwd/l3fwd.h:172:
+ free(xstats);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#145: FILE: examples/l3fwd/l3fwd.h:172:
+ free(xstats);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#146: FILE: examples/l3fwd/l3fwd.h:173:
+ return;$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#146: FILE: examples/l3fwd/l3fwd.h:173:
+ return;$
ERROR:CODE_INDENT: code indent should use tabs where possible
#147: FILE: examples/l3fwd/l3fwd.h:174:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#147: FILE: examples/l3fwd/l3fwd.h:174:
+ }$
ERROR:CODE_INDENT: code indent should use tabs where possible
#149: FILE: examples/l3fwd/l3fwd.h:176:
+ /* Display xstats */$
ERROR:CODE_INDENT: code indent should use tabs where possible
#150: FILE: examples/l3fwd/l3fwd.h:177:
+ for (idx_xstat = 0; idx_xstat < cnt_xstats; idx_xstat++) {$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#150: FILE: examples/l3fwd/l3fwd.h:177:
+ for (idx_xstat = 0; idx_xstat < cnt_xstats; idx_xstat++) {$
ERROR:CODE_INDENT: code indent should use tabs where possible
#151: FILE: examples/l3fwd/l3fwd.h:178:
+ printf("%s: %"PRIu64"
",$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#151: FILE: examples/l3fwd/l3fwd.h:178:
+ printf("%s: %"PRIu64"
",$
ERROR:CODE_INDENT: code indent should use tabs where possible
#152: FILE: examples/l3fwd/l3fwd.h:179:
+ xstats_names[idx_xstat].name,$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#152: FILE: examples/l3fwd/l3fwd.h:179:
+ xstats_names[idx_xstat].name,$
ERROR:CODE_INDENT: code indent should use tabs where possible
#153: FILE: examples/l3fwd/l3fwd.h:180:
+ xstats[idx_xstat].value);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#153: FILE: examples/l3fwd/l3fwd.h:180:
+ xstats[idx_xstat].value);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#154: FILE: examples/l3fwd/l3fwd.h:181:
+ }$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#154: FILE: examples/l3fwd/l3fwd.h:181:
+ }$
ERROR:CODE_INDENT: code indent should use tabs where possible
#155: FILE: examples/l3fwd/l3fwd.h:182:
+ free(xstats_names);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#155: FILE: examples/l3fwd/l3fwd.h:182:
+ free(xstats_names);$
ERROR:CODE_INDENT: code indent should use tabs where possible
#156: FILE: examples/l3fwd/l3fwd.h:183:
+ free(xstats);$
WARNING:LEADING_SPACE: please, no spaces at the start of a line
#156: FILE: examples/l3fwd/l3fwd.h:183:
+ free(xstats);$
WARNING:AVOID_EXTERNS: externs should be avoided in .c files
#170: FILE: examples/l3fwd/l3fwd_lpm.c:44:
+extern struct lcore_stats stats[RTE_MAX_LCORE];
WARNING:LONG_LINE: line length of 119 exceeds 100 columns
#213: FILE: examples/l3fwd/l3fwd_lpm.c:244:
+ stats[lcore_id].none_loop_per[i] = (float)stats[lcore_id].none_loop[i]/stats[lcore_id].num_loop[i]*100;
WARNING:LONG_LINE: line length of 125 exceeds 100 columns
#214: FILE: examples/l3fwd/l3fwd_lpm.c:245:
+ stats[lcore_id].no_full_loop_per[i] = (float)stats[lcore_id].no_full_loop[i]/stats[lcore_id].num_loop[i]*100;
ERROR:SPACING: space required after that ',' (ctx:VxV)
#243: FILE: examples/l3fwd/main.c:1603:
+ printf("queue_id:%d
",queue);
^
WARNING:LONG_LINE: line length of 144 exceeds 100 columns
#246: FILE: examples/l3fwd/main.c:1606:
+ stats[lcore_id].num_loop[queue], stats[lcore_id].none_loop[queue], stats[lcore_id].no_full_loop[queue]);
WARNING:LONG_LINE: line length of 119 exceeds 100 columns
#248: FILE: examples/l3fwd/main.c:1608:
+ stats[lcore_id].none_loop_per[queue], stats[lcore_id].no_full_loop_per[queue]);
total: 48 errors, 55 warnings, 164 lines checked
^ permalink raw reply [flat|nested] 3+ messages in thread