[dpdk-test-report] |WARNING| pw76035 [PATCH 40/40] examples/pipeline: add VXLAN encap example

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


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

_coding style issues_


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

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#133: FILE: examples/pipeline/example_vxlan.c:13:
+#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_vxlan.c:17:
+			__FUNCTION__, __LINE__);                               \

WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
#189: FILE: examples/pipeline/example_vxlan.c:69:
+static const char *drop_instructions[] = {

WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
#249: FILE: examples/pipeline/example_vxlan.c:129:
+static const char *vxlan_encap_instructions[] = {

WARNING:TYPO_SPELLING: 'haders' may be misspelled - perhaps 'headers'?
#250: FILE: examples/pipeline/example_vxlan.c:130:
+	/* Copy from table entry to haders and metadata. */

WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
#279: FILE: examples/pipeline/example_vxlan.c:159:
+static const char *table_actions[] = {"drop", "vxlan_encap"};

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

WARNING:AVOID_EXTERNS: externs should be avoided in .c files
#311: FILE: examples/pipeline/example_vxlan.c:191:
+int

total: 0 errors, 9 warnings, 482 lines checked


More information about the test-report mailing list