[PATCH 22.11] net/mlx5: fix testpmd crash by action template
Thomas Monjalon
thomas at monjalon.net
Mon Mar 6 11:55:49 CET 2023
This patch is not specific to testpmd.
We should drop "testpmd" from the title.
Something like "fix crash on flow action template failure"
06/03/2023 10:15, Rongwei Liu:
> When action template creation fails the testpmd expects error
> details.
> The driver did not set the error structure and testpmd failed with a
> segmentation fault.
>
> Fixes: 836b5c9b5e0e ("net/mlx5: add action template management")
> Cc: stable at dpdk.org
> Signed-off-by: Rongwei Liu <rongweil at nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
> ---
> drivers/net/mlx5/mlx5_flow_hw.c | 15 ++++++++++++++-
> 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
> index b4a80f977f..9e5f263ccf 100644
> --- a/drivers/net/mlx5/mlx5_flow_hw.c
> +++ b/drivers/net/mlx5/mlx5_flow_hw.c
> @@ -4946,6 +4950,9 @@ flow_hw_actions_template_create(struct rte_eth_dev *dev,
> mlx5dr_action_template_destroy(at->tmpl);
> mlx5_free(at);
> }
> + rte_flow_error_set(error, rte_errno,
> + RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,
> + "Failed to create action template");
> return NULL;
> }
>
More information about the stable
mailing list