[PATCH] net/mlx5: fix err message overwrite for actions translation
Dariusz Sosnowski
dsosnowski at nvidia.com
Thu Feb 20 10:49:20 CET 2025
> -----Original Message-----
> From: Junfeng Guo <junfengg at nvidia.com>
> Sent: Thursday, February 20, 2025 08:09
> To: dev at dpdk.org
> Cc: Dariusz Sosnowski <dsosnowski at nvidia.com>; Slava Ovsiienko
> <viacheslavo at nvidia.com>; Bing Zhao <bingz at nvidia.com>; Ori Kam
> <orika at nvidia.com>; Suanming Mou <suanmingm at nvidia.com>; Matan Azrad
> <matan at nvidia.com>; Minggang(Gavin) Li <gavinl at nvidia.com>; Jiawei(Jonny)
> Wang <jiaweiw at nvidia.com>; stable at dpdk.org
> Subject: [PATCH] net/mlx5: fix err message overwrite for actions translation
>
> Function __flow_hw_translate_actions_template contains several encapsulated
> functions that already have internal error handling process via rte_flow_error_set
> for each case.
>
> Thus the one (rte_flow_error_set) within the goto statement `err` at the end of
> __flow_hw_translate_actions_template function may be redundant for those
> failed cases. As a result, the error messages would all be overwritten as "fail to
> create rte table", making it displayed at quite large granularity.
>
> To prevent above error messages overwrite, this patch add a local variable `struct
> rte_flow_error sub_error` to the function and pass this `sub_error` instead of
> `error` to each sub-function. Under error handling process (`err` label), if
> `sub_error` was updated, copy its contents to `error` and return. If it was not
> updated, return default error message (`fail to create rte table`).
>
> Also refactor the logic for SEND_TO_KERNEL, COUNT and AGE actions in above
> function to align the error handling process.
>
> Fixes: f13fab23922b ("net/mlx5: add flow jump action")
> Cc: suanmingm at nvidia.com
> Cc: stable at dpdk.org
>
> Signed-off-by: Junfeng Guo <junfengg at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Best regards,
Dariusz Sosnowski
More information about the stable
mailing list