[dpdk-test-report] |WARNING| pw73041 [RFC PATCH 1/1] Add l2reflect measurement application

checkpatch at dpdk.org checkpatch at dpdk.org
Fri Jul 3 17:18:59 CEST 2020


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

_coding style issues_


WARNING:LEADING_SPACE: please, no spaces at the start of a line
#138: FILE: examples/l2reflect/l2reflect.h:18:
+       TRACE_TYPE_HELO,$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#139: FILE: examples/l2reflect/l2reflect.h:19:
+       TRACE_TYPE_EHLO,$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#140: FILE: examples/l2reflect/l2reflect.h:20:
+       TRACE_TYPE_RSET,$

WARNING:LEADING_SPACE: please, no spaces at the start of a line
#141: FILE: examples/l2reflect/l2reflect.h:21:
+       TRACE_TYPE_QUIT,$

ERROR:C99_COMMENTS: do not use C99 // comments
#152: FILE: examples/l2reflect/l2reflect.h:32:
+	S_ELECT_LEADER = 1, // elect the initial sender

ERROR:C99_COMMENTS: do not use C99 // comments
#153: FILE: examples/l2reflect/l2reflect.h:33:
+	S_RESET_TRX = 2, // reset the counters

ERROR:C99_COMMENTS: do not use C99 // comments
#154: FILE: examples/l2reflect/l2reflect.h:34:
+	S_RUNNING = 4, // measurement S_RUNNING

ERROR:C99_COMMENTS: do not use C99 // comments
#155: FILE: examples/l2reflect/l2reflect.h:35:
+	S_LOCAL_TERM = 8, // terminated by local event

ERROR:C99_COMMENTS: do not use C99 // comments
#156: FILE: examples/l2reflect/l2reflect.h:36:
+	S_REMOTE_TERM = 16, // terminated by remote event

ERROR:C99_COMMENTS: do not use C99 // comments
#176: FILE: examples/l2reflect/l2reflect.h:56:
+#endif // _L2REFLECT_H_

WARNING:TYPO_SPELLING: 'befor' may be misspelled - perhaps 'before'?
#257: FILE: examples/l2reflect/main.c:75:
+/* warmup a few round befor starting the measurement */

ERROR:INITIALISED_STATIC: do not initialise statics to 0
#267: FILE: examples/l2reflect/main.c:85:
+static atomic_int sleep_start = 0;

ERROR:INITIALISED_STATIC: do not initialise statics to 0
#269: FILE: examples/l2reflect/main.c:87:
+static uint64_t rounds = 0;

ERROR:INITIALISED_STATIC: do not initialise statics to 0
#290: FILE: examples/l2reflect/main.c:108:
+static uint32_t l2reflect_q = 0;

ERROR:GLOBAL_INITIALISERS: do not initialise globals to NULL
#298: FILE: examples/l2reflect/main.c:116:
+struct rte_mempool *l2reflect_pktmbuf_pool = NULL;

WARNING:SPACING: space prohibited between function name and open parenthesis '('
#407: FILE: examples/l2reflect/main.c:225:
+__attribute__((__format__ (__printf__, 1, 0)))

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#433: FILE: examples/l2reflect/main.c:251:
+	unsigned ret;

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#478: FILE: examples/l2reflect/main.c:296:
+l2reflect_new_pkt(unsigned type)

WARNING:QUOTED_WHITESPACE_BEFORE_NEWLINE: unnecessary whitespace before a quoted newline
#540: FILE: examples/l2reflect/main.c:358:
+	       " %02X:%02X:%02X:%02X:%02X:%02X 

",

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#567: FILE: examples/l2reflect/main.c:385:
+l2reflect_rx_filter(struct rte_mbuf **bufs, unsigned nb_rx, unsigned data_only)

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#567: FILE: examples/l2reflect/main.c:385:
+l2reflect_rx_filter(struct rte_mbuf **bufs, unsigned nb_rx, unsigned data_only)

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#571: FILE: examples/l2reflect/main.c:389:
+	unsigned i, ret;

WARNING:INDENTED_LABEL: labels should not be indented
#591: FILE: examples/l2reflect/main.c:409:
+	drop:

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#606: FILE: examples/l2reflect/main.c:424:
+	unsigned i, nb_rx;

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#675: FILE: examples/l2reflect/main.c:493:
+	unsigned lcore_id;

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#676: FILE: examples/l2reflect/main.c:494:
+	unsigned j, nb_rx, nb_evt;

WARNING:LONG_LINE_COMMENT: line over 90 characters
#748: FILE: examples/l2reflect/main.c:566:
+					/* do not count the first rounds, diff would be too high */

WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring
#750: FILE: examples/l2reflect/main.c:568:
+						if (l2reflect_hist)

WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring
#758: FILE: examples/l2reflect/main.c:576:
+						if (diff < record.min_round)

WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring
#760: FILE: examples/l2reflect/main.c:578:
+						if (diff > record.max_round) {

WARNING:DEEP_INDENTATION: Too many leading tabs - consider code refactoring
#762: FILE: examples/l2reflect/main.c:580:
+							if (l2reflect_break_usec &&

WARNING:BRACES: braces {} are not necessary for single statement blocks
#812: FILE: examples/l2reflect/main.c:630:
+		while (sleep_start) {
+			usleep(10000);
+		}

WARNING:PREFER_FALLTHROUGH: Prefer 'fallthrough;' over fallthrough comment
#860: FILE: examples/l2reflect/main.c:678:
+		/* FALLTHROUGH */

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#874: FILE: examples/l2reflect/main.c:692:
+	unsigned lcore_id;

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#960: FILE: examples/l2reflect/main.c:778:
+			 strerror(-ret), (unsigned)l2reflect_port_number);

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#966: FILE: examples/l2reflect/main.c:784:
+			 strerror(-ret), (unsigned)l2reflect_port_number);

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#971: FILE: examples/l2reflect/main.c:789:
+	       (unsigned)l2reflect_port_number,

WARNING:BRACES: braces {} are not necessary for single statement blocks
#1006: FILE: examples/l2reflect/main.c:824:
+	if (l2reflect_hist) {
+		output_histogram_snapshot();
+	}

ERROR:TRAILING_WHITESPACE: trailing whitespace
#1023: FILE: examples/l2reflect/meson.build:2:
+# Copyright(c) 2020 Siemens AG $

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1204: FILE: examples/l2reflect/stats.c:156:
+	unsigned i;

ERROR:C99_COMMENTS: do not use C99 // comments
#1208: FILE: examples/l2reflect/stats.c:160:
+	// version: 1

ERROR:C99_COMMENTS: do not use C99 // comments
#1211: FILE: examples/l2reflect/stats.c:163:
+	// cpu 0 histogram

ERROR:C99_COMMENTS: do not use C99 // comments
#1214: FILE: examples/l2reflect/stats.c:166:
+		// only write positive numbers to meed jitterplot expectations

ERROR:C99_COMMENTS: do not use C99 // comments
#1221: FILE: examples/l2reflect/stats.c:173:
+	// cpu 0 stats

ERROR:C99_COMMENTS: do not use C99 // comments
#1234: FILE: examples/l2reflect/stats.c:186:
+	// combine objects

ERROR:C99_COMMENTS: do not use C99 // comments
#1241: FILE: examples/l2reflect/stats.c:193:
+	// cleanup

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1276: FILE: examples/l2reflect/stats.h:24:
+unsigned hist_bucket_usec;

WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned'
#1285: FILE: examples/l2reflect/stats.h:33:
+	unsigned hist_size;

ERROR:C99_COMMENTS: do not use C99 // comments
#1286: FILE: examples/l2reflect/stats.h:34:
+	// each slot is 10us

ERROR:C99_COMMENTS: do not use C99 // comments
#1319: FILE: examples/l2reflect/stats.h:67:
+#endif // _STATS_H_

total: 19 errors, 31 warnings, 1213 lines checked
Warning in /examples/l2reflect/l2reflect.h:
Using compiler attribute directly


More information about the test-report mailing list