net/mlx5e: kTLS, Fix missing error unwind when enabling RX offload
Subsystems (5)
Tariq Toukan
maintainerPATCH RESEND 1/1 net/mlx5e: kTLS, Fix missing error unwind when enabling RX offload
From: Xuanqiang Luo <[email protected]>
Since commit abed42f9cd80 ("net/mlx5e: Conditionally create async ICOSQ"), the async ICOSQ is only created when an XDP program is attached or priv->ktls_rx_was_enabled is set. When TLS RX offload is enabled for the first time, mlx5e_ktls_set_feature_rx() sets the flag and reopens the channels so that they get the queue, but it ignores the return value of mlx5e_safe_reopen_channels().
If the reopen fails, mlx5e_safe_switch_params() keeps the old channels, which have no async ICOSQ, while NETIF_F_HW_TLS_RX is still reported as enabled. The next offloaded RX connection then dereferences the NULL c->async_icosq in post_rx_param_wqes(). Enabling the feature again does not help, as the flag is already set and the reopen is skipped.
Propagate the error, clear the flag and destroy the accel TCP flow tables again, so that the feature stays disabled and the next attempt retries the reopen.
--- drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls.c +5 -1
@@ -139,7 +139,11 @@ int mlx5e_ktls_set_feature_rx(struct net_device *netdev, bool enable) err =mlx5e_accel_fs_tcp_create (priv->fs);if (!err && !priv->ktls_rx_was_enabled) { priv->ktls_rx_was_enabled = true; -mlx5e_safe_reopen_channels (priv); + err =mlx5e_safe_reopen_channels (priv); +if (err) { + priv->ktls_rx_was_enabled = false; +mlx5e_accel_fs_tcp_destroy (priv->fs); + } } }else {mlx5e_accel_fs_tcp_destroy (priv->fs);
base-commit: b71c101bbb9814d163c00234d43c41f0a17907d4
Signature · 1 line
2.44.0
[email protected]
AI reviewThis is an automated message. This series looks like a fix, but its commit messages seem to be missing some information:
Hi!
This is an automated message. This series looks like a fix, but its commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during development, syzbot report, manual code inspection, LLM or static analysis tool scan.
- Whether the issue was actually triggered, or is only theoretical (e.g. found by code inspection). If it was triggered please include the symptoms, like the stack trace or error messages.
- What hardware the change was tested on. For driver fixes please mention the device (and if relevant firmware version) used for testing, or say that the change was not tested on real hardware.
Please do not repost the series just to address the above. Instead, reply to this email with the missing information, so that reviewers can take it into account. If the series needs another revision for other reasons, please include the information in the commit messages then.
The evaluation is done by an LLM so it may be wrong, if you think that is the case please reply and explain.
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Tue, 10 Nov 2026 12:17:09 +0200 you wrote:
From: Xuanqiang Luo <[email protected]>
Since commit
abed42f9cd80("net/mlx5e: Conditionally create async ICOSQ"), the async ICOSQ is only created when an XDP program is attached orpriv->ktls_rx_was_enabledis set. When TLS RX offload is enabled for the first time,mlx5e_ktls_set_feature_rx()sets the flag and reopens the channels so that they get the queue, but it ignores the return value ofmlx5e_safe_reopen_channels().[...]
Here is the summary with links:
- [net,RESEND] net/mlx5e: kTLS, Fix missing error unwind when enabling RX offload
https://git.kernel.org/netdev/net/c/343672bad641
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html