From: checkpatch@dpdk.org
To: test-report@dpdk.org
Cc: Gregory Etelson <getelson@nvidia.com>
Subject: |WARNING| pw133301 [PATCH v6 08/10] net/mlx5: support HWS mirror action
Date: Wed, 25 Oct 2023 13:25:54 +0200 (CEST) [thread overview]
Message-ID: <20231025112554.62746120A1D@dpdk.org> (raw)
In-Reply-To: <20231025112232.201606-9-getelson@nvidia.com>
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/133301
_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, 1007 lines checked
parent reply other threads:[~2023-10-25 11:25 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20231025112232.201606-9-getelson@nvidia.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231025112554.62746120A1D@dpdk.org \
--to=checkpatch@dpdk.org \
--cc=getelson@nvidia.com \
--cc=test-report@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).