Re: [PATCH net] net/mlx5: Lag, Return error when enabling MPESW without LAG support
From: Daniel Machon
Date: Thu Nov 12 2026 - 07:31:45 EST
> From: Uri Dar <udar@xxxxxxxxxx>
>
> When firmware reports a function as not LAG capable (lag_master=0 or
> num_lag_ports < 2), mlx5_lag_add_mdev() creates no LAG object for it.
> Enabling multiport E-Switch on such a device returns 0 from
> mlx5_lag_mpesw_queue_work(), so
> "devlink dev param set ... esw_multiport value true" reports success
> although nothing was enabled, and a following "devlink dev param show"
> still reports false.
>
> Return -EOPNOTSUPP instead. mlx5_lag_mpesw_disable() ignores the return
> value, so disabling keeps its current behavior.
>
> Fixes: a32327a3a02c ("net/mlx5: Lag, Control MultiPort E-Switch single FDB mode")
> Signed-off-by: Uri Dar <udar@xxxxxxxxxx>
> Reviewed-by: Shay Drori <shayd@xxxxxxxxxx>
> Signed-off-by: Tariq Toukan <tariqt@xxxxxxxxxx>
> ---
Reviewed-by: Daniel Machon <daniel.machon@xxxxxxxxxxxxx>