[dpdk-test-report] |WARNING| pw91522 [PATCH v7 1/2] ethdev: add pre-defined meter policy API

checkpatch at dpdk.org checkpatch at dpdk.org
Thu Apr 15 06:57:24 CEST 2021


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

_coding style issues_


WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#2543: FILE: lib/librte_ethdev/rte_mtr.h:520:
+#define rte_mtr_policy_pass_color(policy) \
+struct rte_mtr_meter_policy_params policy = \
+{ \
+	.actions[RTE_COLOR_GREEN] = (struct rte_flow_action[]) { \
+		{ \
+			.type = RTE_FLOW_ACTION_TYPE_METER_COLOR, \
+			.conf = &(struct rte_flow_action_meter_color) { \
+				.color = RTE_COLOR_GREEN, \
+			}, \
+		}, \
+		{ \
+			.type = RTE_FLOW_ACTION_TYPE_END, \
+		}, \
+	}, \
+	.actions[RTE_COLOR_YELLOW] = (struct rte_flow_action[]) { \
+		{ \
+			.type = RTE_FLOW_ACTION_TYPE_METER_COLOR, \
+			.conf = &(struct rte_flow_action_meter_color) { \
+				.color = RTE_COLOR_YELLOW, \
+			}, \
+		}, \
+		{ \
+		.type = RTE_FLOW_ACTION_TYPE_END, \
+		}, \
+	}, \
+	.actions[RTE_COLOR_RED] = (struct rte_flow_action[]) { \
+		{ \
+			.type = RTE_FLOW_ACTION_TYPE_METER_COLOR, \
+			.conf = &(struct rte_flow_action_meter_color) { \
+				.color = RTE_COLOR_RED, \
+			}, \
+		}, \
+		{ \
+			.type = RTE_FLOW_ACTION_TYPE_END, \
+		}, \
+	}, \
+};

WARNING:TRAILING_SEMICOLON: macros should not use a trailing semicolon
#2585: FILE: lib/librte_ethdev/rte_mtr.h:562:
+#define rte_mtr_policy_drop_red(policy) \
+struct rte_mtr_meter_policy_params policy = \
+{ \
+	.actions[RTE_COLOR_GREEN] = NULL, \
+	.actions[RTE_COLOR_YELLOW] = NULL, \
+	.actions[RTE_COLOR_RED] = (struct rte_flow_action[]) { \
+		{ \
+			.type = RTE_FLOW_ACTION_TYPE_DROP, \
+		}, \
+		{ \
+			.type = RTE_FLOW_ACTION_TYPE_END, \
+		}, \
+	}, \
+};

total: 0 errors, 2 warnings, 2489 lines checked


More information about the test-report mailing list