Re: [PATCH net-next v2] net/mlx5e: kTLS, Simplify error unwind in mlx5e_ktls_set_feature_rx()
From: Tariq Toukan
Date: Wed Nov 18 2026 - 04:55:46 EST
On 18/11/2026 4:58, Xuanqiang Luo wrote:
From: Xuanqiang Luo <luoxuanqiang@xxxxxxxxxx>
mlx5e_ktls_set_feature_rx() has become harder to follow: the error
handling is nested in the conditions and the main flow is conditional.
Handle the disable case first, handle the error cases in conditionals,
and keep the main flow unconditional. Use goto to unlock on the early
returns.
No functional change intended.
Suggested-by: Simon Horman <horms@xxxxxxxxxx>
Suggested-by: Tariq Toukan <tariqt@xxxxxxxxxx>
Link: https://lore.kernel.org/all/20261029134019.GG257209@xxxxxxxxxxxxxxxx/
Signed-off-by: Xuanqiang Luo <luoxuanqiang@xxxxxxxxxx>
---
Changes:
v2:
- Handle the disable case first and keep the enable argument unchanged,
instead of reusing it as a flag to destroy the tables. (Suggested by
Tariq.)
v1: https://lore.kernel.org/all/20261116110830.2850785-1-xuanqiang.luo@xxxxxxxxx/
Thanks for the update, this is what I had in mind.
Reviewed-by: Tariq Toukan <tariqt@xxxxxxxxxx>