automatic DPDK test reports
 help / color / mirror / Atom feed
* |WARNING| pw133372 [PATCH v7 08/10] net/mlx5: support HWS mirror action
       [not found] <20231026071229.300162-9-getelson@nvidia.com>
@ 2023-10-26  7:16 ` checkpatch
  0 siblings, 0 replies; only message in thread
From: checkpatch @ 2023-10-26  7:16 UTC (permalink / raw)
  To: test-report; +Cc: Gregory Etelson

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

_coding style issues_


CHECK:SPACING: spaces preferred around that '*' (ctx:WxV)
#307: FILE: drivers/net/mlx5/mlx5_flow.c:1162:
+					  rte_flow_indir_action_conf *conf,
 					                             ^

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'fops' - possible side-effects?
#346: FILE: drivers/net/mlx5/mlx5_flow.c:10929:
+#define MLX5_DRV_FOPS_OR_ERR(dev, fops, drv_cb, ret)                           \
+{                                                                              \
+	struct rte_flow_attr attr = { .transfer = 0 };                         \
+	enum mlx5_flow_drv_type drv_type = flow_get_drv_type((dev), &attr);    \
+	if (drv_type == MLX5_FLOW_TYPE_MIN ||                                  \
+	    drv_type == MLX5_FLOW_TYPE_MAX) {                                  \
+		rte_flow_error_set(error, ENOTSUP,                             \
+				   RTE_FLOW_ERROR_TYPE_ACTION,                 \
+				   NULL, "invalid driver type");               \
+		return ret;                                                    \
+	}                                                                      \
+	(fops) = flow_get_drv_ops(drv_type);                                   \
+	if (!(fops) || !(fops)->drv_cb) {                                      \
+		rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, \
+				   NULL, "no action_list handler");            \
+		return ret;                                                    \
+	}                                                                      \
+}

CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'drv_cb' may be better as '(drv_cb)' to avoid precedence issues
#346: FILE: drivers/net/mlx5/mlx5_flow.c:10929:
+#define MLX5_DRV_FOPS_OR_ERR(dev, fops, drv_cb, ret)                           \
+{                                                                              \
+	struct rte_flow_attr attr = { .transfer = 0 };                         \
+	enum mlx5_flow_drv_type drv_type = flow_get_drv_type((dev), &attr);    \
+	if (drv_type == MLX5_FLOW_TYPE_MIN ||                                  \
+	    drv_type == MLX5_FLOW_TYPE_MAX) {                                  \
+		rte_flow_error_set(error, ENOTSUP,                             \
+				   RTE_FLOW_ERROR_TYPE_ACTION,                 \
+				   NULL, "invalid driver type");               \
+		return ret;                                                    \
+	}                                                                      \
+	(fops) = flow_get_drv_ops(drv_type);                                   \
+	if (!(fops) || !(fops)->drv_cb) {                                      \
+		rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, \
+				   NULL, "no action_list handler");            \
+		return ret;                                                    \
+	}                                                                      \
+}

CHECK:MACRO_ARG_REUSE: Macro argument reuse 'ret' - possible side-effects?
#346: FILE: drivers/net/mlx5/mlx5_flow.c:10929:
+#define MLX5_DRV_FOPS_OR_ERR(dev, fops, drv_cb, ret)                           \
+{                                                                              \
+	struct rte_flow_attr attr = { .transfer = 0 };                         \
+	enum mlx5_flow_drv_type drv_type = flow_get_drv_type((dev), &attr);    \
+	if (drv_type == MLX5_FLOW_TYPE_MIN ||                                  \
+	    drv_type == MLX5_FLOW_TYPE_MAX) {                                  \
+		rte_flow_error_set(error, ENOTSUP,                             \
+				   RTE_FLOW_ERROR_TYPE_ACTION,                 \
+				   NULL, "invalid driver type");               \
+		return ret;                                                    \
+	}                                                                      \
+	(fops) = flow_get_drv_ops(drv_type);                                   \
+	if (!(fops) || !(fops)->drv_cb) {                                      \
+		rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, \
+				   NULL, "no action_list handler");            \
+		return ret;                                                    \
+	}                                                                      \
+}

WARNING:MACRO_WITH_FLOW_CONTROL: Macros with flow control statements should be avoided
#346: FILE: drivers/net/mlx5/mlx5_flow.c:10929:
+#define MLX5_DRV_FOPS_OR_ERR(dev, fops, drv_cb, ret)                           \
+{                                                                              \
+	struct rte_flow_attr attr = { .transfer = 0 };                         \
+	enum mlx5_flow_drv_type drv_type = flow_get_drv_type((dev), &attr);    \
+	if (drv_type == MLX5_FLOW_TYPE_MIN ||                                  \
+	    drv_type == MLX5_FLOW_TYPE_MAX) {                                  \
+		rte_flow_error_set(error, ENOTSUP,                             \
+				   RTE_FLOW_ERROR_TYPE_ACTION,                 \
+				   NULL, "invalid driver type");               \
+		return ret;                                                    \
+	}                                                                      \
+	(fops) = flow_get_drv_ops(drv_type);                                   \
+	if (!(fops) || !(fops)->drv_cb) {                                      \
+		rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_ACTION, \
+				   NULL, "no action_list handler");            \
+		return ret;                                                    \
+	}                                                                      \
+}

CHECK:SPACING: spaces preferred around that '*' (ctx:WxV)
#392: FILE: drivers/net/mlx5/mlx5_flow.c:10975:
+					  rte_flow_op_attr *op_attr,
 					                   ^

CHECK:SPACING: spaces preferred around that '*' (ctx:WxV)
#394: FILE: drivers/net/mlx5/mlx5_flow.c:10977:
+					  rte_flow_indir_action_conf *conf,
 					                             ^

CHECK:SPACING: spaces preferred around that '*' (ctx:WxV)
#954: FILE: drivers/net/mlx5/mlx5_flow_hw.c:9658:
+		   struct rte_flow_error __rte_unused *error)
 		                                      ^

CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'encap_type' may be better as '(encap_type)' to avoid precedence issues
#963: FILE: drivers/net/mlx5/mlx5_flow_hw.c:9667:
+#define MLX5_CONST_ENCAP_ITEM(encap_type, ptr) \
+(((const struct encap_type *)(ptr))->definition)

total: 0 errors, 1 warnings, 8 checks, 1008 lines checked

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-26  7:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20231026071229.300162-9-getelson@nvidia.com>
2023-10-26  7:16 ` |WARNING| pw133372 [PATCH v7 08/10] net/mlx5: support HWS mirror action checkpatch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).