|SUCCESS| net/mlx5: add validation for indirect actions
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Fri Apr 17 18:40:02 CEST 2026
Test-Label: ai-code-review
Test-Status: SUCCESS
https://dpdk.org/patch/163174
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-04-17
git sha 63149-1-rboussanni at gmail.com
Author: Rayane Boussanni <rboussanni at gmail.com>
Subject: [PATCH] net/mlx5: add validation for indirect actions
This patch implements missing validation logic for RSS and Connection
Tracking (ConnTrack) indirect actions in the Hardware Steering (HWS)
flow engine.
> diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
> index bca5b2769e..fc5d59be98 100644
> --- a/drivers/net/mlx5/mlx5_flow_hw.c
> +++ b/drivers/net/mlx5/mlx5_flow_hw.c
> @@ -346,6 +346,21 @@ mlx5_flow_ct_init(struct rte_eth_dev *dev,
> uint32_t nb_conn_tracks,
> uint16_t nb_queue);
>
The forward declarations added here appear to reference functions that may
already be declared earlier in this file. Are mlx5_hw_validate_action_rss()
and mlx5_hw_validate_action_conntrack() defined later in this same file? If
so, these forward declarations are needed. However, can you verify that these
declarations match the actual function signatures exactly, particularly the
parameter order and const qualifiers?
> +static int
> +mlx5_hw_validate_action_rss(struct rte_eth_dev *dev,
> + const struct rte_flow_action *action,
> + const struct rte_flow_action *mask,
> + const struct rte_flow_actions_template_attr *attr,
> + uint64_t action_flags,
> + struct rte_flow_error *error);
> +static int
> +mlx5_hw_validate_action_conntrack(struct rte_eth_dev *dev,
> + const struct rte_flow_action *action,
> + const struct rte_flow_action *mask,
> + const struct rte_flow_actions_template_attr *attr,
> + uint64_t action_flags,
> + struct rte_flow_error *error);
Does this code have whitespace alignment issues? The indentation for the
continuation lines appears to use spaces for alignment rather than tabs,
which violates the DPDK coding style that requires tabs for indentation. The
parameters should align with the opening parenthesis of the function using
tabs followed by spaces only if needed.
> @@ -6595,6 +6610,7 @@ flow_hw_validate_action_meter_mark(struct rte_eth_dev *dev,
> return 0;
> }
>
> +
Is this blank line intentional? Adding extra blank lines between functions
can cause inconsistency with the existing code style. DPDK coding standards
typically use a single blank line between functions.
[ ... ]
> @@ -6637,11 +6656,16 @@ flow_hw_validate_action_indirect(struct rte_eth_dev *dev,
> *action_flags |= MLX5_FLOW_ACTION_METER;
> break;
> case RTE_FLOW_ACTION_TYPE_RSS:
> - /* TODO: Validation logic (same as flow_hw_actions_validate) */
> + ret = mlx5_hw_validate_action_rss(dev, action, mask, attr, *action_flags, error);
> + if (ret < 0)
> + return ret;
Does this code properly check the return value? The comparison "ret < 0"
suggests that mlx5_hw_validate_action_rss() returns negative on error. Can
you confirm that this is consistent with how the function is actually
implemented and with DPDK conventions for validation functions? Also, does
the error parameter get properly populated by mlx5_hw_validate_action_rss()
before this function returns?
> *action_flags |= MLX5_FLOW_ACTION_RSS;
> break;
> case RTE_FLOW_ACTION_TYPE_CONNTRACK:
> - /* TODO: Validation logic (same as flow_hw_actions_validate) */
> + ret = mlx5_hw_validate_action_conntrack(dev, action, mask, attr,
> + *action_flags, error);
Does this line continuation alignment follow DPDK coding style? The second
line should be indented to align with the opening parenthesis on the previous
line, but it appears to use space-based alignment instead of the required
tabs.
> + if (ret < 0)
> + return ret;
> *action_flags |= MLX5_FLOW_ACTION_CT;
> break;
[ ... ]
> @@ -7352,6 +7376,7 @@ mlx5_flow_hw_actions_validate(struct rte_eth_dev *dev,
> case RTE_FLOW_ACTION_TYPE_INDIRECT:
> ret = flow_hw_validate_action_indirect(dev, action,
> mask,
> + attr,
Does this line have a whitespace alignment problem? The indentation for the
new "attr," parameter appears inconsistent with the lines above it. The
continuation should align with the opening parenthesis using tabs and spaces
according to DPDK coding style, but this line seems to use extra spaces for
alignment instead.
More information about the test-report
mailing list