[PATCH] net/mlx5: fix modify field action operation restriction
Raslan Darawsheh
rasland at nvidia.com
Thu Nov 6 15:04:21 CET 2025
Hi,
On 05/11/2025 10:50 AM, Maayan Kashani wrote:
> Update DV flow engine modify field validation:
> - Reject 'add' and 'sub' operations when source field is not VALUE
> or POINTER in DV flow engine.
>
> Update documentation to clarify operation support:
> - 'set' operation is supported in all modes
> - 'add' operation with VALUE/POINTER source fields is
> supported in DV/HWS mode.
> - Specify relevant HW supporting packet header as 'src' field.
> - List supported 'dst' fields.
>
> Fixes: 641dbe4fb053 ("net/mlx5: support modify field flow action")
> Cc: stable at dpdk.org
>
> Signed-off-by: Maayan Kashani <mkashani at nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
>
> #. In template tables of group 0, the modify action must be fully masked.
>
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
> index f765f941162..95ca57e8c46 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -5642,6 +5642,13 @@ flow_dv_validate_action_modify_field(struct rte_eth_dev *dev,
> }
> if (src_data->field != RTE_FLOW_FIELD_VALUE &&
> src_data->field != RTE_FLOW_FIELD_POINTER) {
> + if (conf->operation != RTE_FLOW_MODIFY_SET)
> + return rte_flow_error_set(error, ENOTSUP,
> + RTE_FLOW_ERROR_TYPE_ACTION_CONF,
> + &conf->operation,
> + "modify field action type add is not"
> + " supported when src field type is"
> + " not value/pointer");
> if (root)
> return rte_flow_error_set(error, ENOTSUP,
> RTE_FLOW_ERROR_TYPE_ACTION, action,
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
More information about the dev
mailing list