[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da99b127-878a-4acf-b2b4-8ff7c41e1fe6@intel.com>
Date: Mon, 13 Jan 2025 11:00:11 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Tariq Toukan <tariqt@...dia.com>, "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Eric
Dumazet" <edumazet@...gle.com>, Andrew Lunn <andrew+netdev@...n.ch>
CC: <netdev@...r.kernel.org>, Saeed Mahameed <saeedm@...dia.com>, Gal Pressman
<gal@...dia.com>, Leon Romanovsky <leonro@...dia.com>, Mark Bloch
<mbloch@...dia.com>, Moshe Shemesh <moshe@...dia.com>, Chris Mi
<cmi@...dia.com>, Shay Drori <shayd@...dia.com>
Subject: Re: [PATCH net 3/8] net/mlx5: SF, Fix add port error handling
On 1/13/2025 7:40 AM, Tariq Toukan wrote:
> From: Chris Mi <cmi@...dia.com>
>
> If failed to add SF, error handling doesn't delete the SF from the
> SF table. But the hw resources are deleted. So when unload driver,
> hw resources will be deleted again. Firmware will report syndrome
> 0x68def3 which means "SF is not allocated can not deallocate".
>
> Fix it by delete SF from SF table if failed to add SF.
>
> Fixes: 2597ee190b4e ("net/mlx5: Call mlx5_sf_id_erase() once in mlx5_sf_dealloc()")
> Signed-off-by: Chris Mi <cmi@...dia.com>
> Reviewed-by: Shay Drori <shayd@...dia.com>
> Signed-off-by: Tariq Toukan <tariqt@...dia.com>
> ---
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
> drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c b/drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c
> index a96be98be032..b96909fbeb12 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c
> @@ -257,6 +257,7 @@ static int mlx5_sf_add(struct mlx5_core_dev *dev, struct mlx5_sf_table *table,
> return 0;
>
> esw_err:
> + mlx5_sf_function_id_erase(table, sf);
> mlx5_sf_free(table, sf);
> return err;
> }
Powered by blists - more mailing lists