[PATCH] net/mlx5: fix VXLAN and NVGRE encap in async flow API
Raslan Darawsheh
rasland at nvidia.com
Tue Mar 24 13:28:32 CET 2026
Hi,
On 19/03/2026 2:53 PM, Dariusz Sosnowski wrote:
> If masked VXLAN_ENCAP or NVGRE_ENCAP flow action
> was used in actions template, then packets were being
> encapsulated into an empty header (all zeroes)
> instead of a header based on provided item definition.
>
> Offending commit has decoupled translation of VXLAN/NVGRE
> tunnel definition from creation of HW action - previously
> this was done in a single function mlx5_tbl_translate_reformat().
> This was done to adjust HWS flow engine for sync flow API.
> This decoupling has introduced a bug for async flow API.
> Translated packet tunnel headers were not used for creation of masked
> encap action.
> Specifically, mlx5_tbl_translate_reformat() function has properly
> translated tunnel definition to tunnel headers,
> but a result of that was not propagated to
> mlx5_tbl_create_reformat_action().
> As a result, zeroed HW buffer was used in place of real data.
>
> This patch fixes that by moving tunnel header translation out of
> mlx5_tbl_translate_reformat() to dedicated handling for VXLAN/NVGRE
> encap flow actions and ensuring that this data is propagated correctly.
> On top of that, translation code for VXLAN/NVGRE is unified
> (it is functionally similar) to reduce code duplication.
>
> Fixes: 9bbe38744a57 ("net/mlx5: set encap as shared flow action")
> Cc: mkashani at nvidia.com
> Cc: stable at dpdk.org
>
> Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Acked-by: Bing Zhao <bingz at nvidia.com>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
More information about the dev
mailing list