[PATCH v2] net/mlx5: fix index choosing in TAG modification

Raslan Darawsheh rasland at nvidia.com
Sun Jan 7 13:36:16 CET 2024


Hi,

> -----Original Message-----
> From: Michael Baum <michaelba at nvidia.com>
> Sent: Monday, November 27, 2023 6:01 PM
> To: dev at dpdk.org
> Cc: Matan Azrad <matan at nvidia.com>; Raslan Darawsheh
> <rasland at nvidia.com>; Slava Ovsiienko <viacheslavo at nvidia.com>; Ori Kam
> <orika at nvidia.com>; Suanming Mou <suanmingm at nvidia.com>; Gregory
> Etelson <getelson at nvidia.com>; stable at dpdk.org
> Subject: [PATCH v2] net/mlx5: fix index choosing in TAG modification
> 
> When MPLS modification support was added [1], the "tag_index" field was
> added into "rte_flow_action_modify_data" structure.
> As part of this change, the "RTE_FLOW_FIELD_TAG" type moved to use it for
> tag array instead of using "level" field.
> Using "level" is still supported for backwards compatibility when "tag_index"
> field is zero.
> 
> The "mlx5_flow_field_id_to_modify_info()" function calls
> "flow_hw_get_reg_id()" function with "level" without checking first whether
> "tag_index" field is valid.
> 
> This patch calls first to "flow_tag_index_get()" function to get the index before
> sending it to "flow_hw_get_reg_id()" function.
> 
> [1] commit c23626f27b09 ("ethdev: add MPLS header modification")
> 
> Fixes: 04e740e69512 ("net/mlx5: separate registers usage per port")
> Cc: getelson at nvidia.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Michael Baum <michaelba at nvidia.com>
> Acked-by: Ori Kam <orika at nvidia.com>
> ---
> v2: fix the commit reference format.
> 
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh


More information about the dev mailing list