[dpdk-test-report] |WARNING| pw76034 [PATCH 39/40] examples/pipeline: add l2fwd with MAC swap example

checkpatch at dpdk.org checkpatch at dpdk.org
Wed Sep 9 01:17:54 CEST 2020


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

_coding style issues_


WARNING:AVOID_EXTERNS: externs should be avoided in .c files
#99: FILE: examples/pipeline/cli.c:734:
+int pipeline_setup_l2fwd_macswp(struct rte_swx_pipeline *p);

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#133: FILE: examples/pipeline/example_l2fwd_macswp.c:15:
+#define CHECK(condition)                                                       \
+do {                                                                           \
+	if (!(condition)) {                                                    \
+		printf("Error in function %s at line %d
",                    \
+			__FUNCTION__, __LINE__);                               \
+		return -1;                                                     \
+	}                                                                      \
+} while (0)

WARNING:USE_FUNC: __func__ should be used instead of gcc specific __FUNCTION__
#137: FILE: examples/pipeline/example_l2fwd_macswp.c:19:
+			__FUNCTION__, __LINE__);                               \

WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
#162: FILE: examples/pipeline/example_l2fwd_macswp.c:44:
+static const char *action_macswp_instructions[] = {

WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
#172: FILE: examples/pipeline/example_l2fwd_macswp.c:54:
+static const char *table_stub_actions[] = {"macswp"};

WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
#190: FILE: examples/pipeline/example_l2fwd_macswp.c:72:
+static const char *pipeline_instructions[] = {

WARNING:AVOID_EXTERNS: externs should be avoided in .c files
#199: FILE: examples/pipeline/example_l2fwd_macswp.c:81:
+int

total: 0 errors, 7 warnings, 220 lines checked


More information about the test-report mailing list