[dpdk-test-report] |WARNING| pw76033 [PATCH 38/40] examples/pipeline: add l2fwd example

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


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

_coding style issues_


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

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#151: FILE: examples/pipeline/example_l2fwd.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__
#155: FILE: examples/pipeline/example_l2fwd.c:19:
+			__FUNCTION__, __LINE__);                               \

WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
#175: FILE: examples/pipeline/example_l2fwd.c:39:
+static const char *action_passthrough_instructions[] = {

WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
#182: FILE: examples/pipeline/example_l2fwd.c:46:
+static const char *table_stub_actions[] = {"passthrough"};

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

WARNING:AVOID_EXTERNS: externs should be avoided in .c files
#206: FILE: examples/pipeline/example_l2fwd.c:70:
+int

total: 0 errors, 7 warnings, 318 lines checked


More information about the test-report mailing list