Thread (6 messages) 6 messages, 3 authors, 2025-12-04

Re: [PATCH net 1/2] net/mlx5: make enable_mpesw idempotent

From: Simon Horman <horms@kernel.org>
Date: 2025-12-02 15:23:53
Also in: linux-rdma, lkml

On Mon, Dec 01, 2025 at 05:13:27PM +0200, Tariq Toukan wrote:
From: Moshe Shemesh <redacted>

The enable_mpesw() function returns -EINVAL if ldev->mode is not
MLX5_LAG_MODE_NONE. This means attempting to enable MPESW mode when it's
already enabled will fail. In contrast, disable_mpesw() properly checks
if the mode is MLX5_LAG_MODE_MPESW before proceeding, making it
naturally idempotent and safe to call multiple times.

Fix enable_mpesw() to return success if mpesw is already enabled.

Fixes: a32327a3a02c ("net/mlx5: Lag, Control MultiPort E-Switch single FDB mode")
Signed-off-by: Moshe Shemesh <redacted>
Reviewed-by: Shay Drori <redacted>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help