[PATCH v3] net/mlx5: add validation for indirect actions
Raslan Darawsheh
rasland at nvidia.com
Thu Jun 4 11:32:15 CEST 2026
Hi,
On 14/05/2026 10:33 PM, Rayane Boussanni wrote:
> This patch implements missing validation logic for RSS and Connection
> Tracking (ConnTrack) indirect actions in the Hardware Steering (HWS)
> flow engine.
>
> Previously, these actions were accepted without being validated
> against hardware capabilities, which could lead to unexpected behavior
> when applying flow rules. The specialist validation functions
> (mlx5_hw_validate_action_rss and mlx5_hw_validate_action_conntrack)
> already existed but were not wired up to the indirect action handler.
>
> The signature of flow_hw_validate_action_indirect was updated to
> include the actions template attributes (attr), allowing it to pass
> the necessary traffic direction context (ingress/egress/transfer)
> to the underlying validation specialists. For indirect RSS, only the
> template attributes are validated, as the RSS configuration itself is
> already validated when the indirect action handle is created.
>
> Reported-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Signed-off-by: Rayane Boussanni <rboussanni at gmail.com>
> ---
> v3:
> - Fix segfault reported by Dariusz Sosnowski when an actions template
> references an indirect RSS action. v2 called
> mlx5_hw_validate_action_rss() on the indirect path, which
> dereferences action->conf as struct rte_flow_action_rss. For indirect
> actions action->conf is an opaque action handle, not an RSS config.
> Add bool is_indirect to mlx5_hw_validate_action_rss() so the indirect
> path validates only the template attributes
> (ingress/egress/transfer).
>
> drivers/net/mlx5/mlx5_flow_hw.c | 36 ++++++++++++++++++++++++++++++---
> 1 file changed, 33 insertions(+), 3 deletions(-)
>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
More information about the dev
mailing list