[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<PH7PR12MB59032B0605978DA5D664A3B4C09F2@PH7PR12MB5903.namprd12.prod.outlook.com>
Date: Sat, 7 Sep 2024 20:32:05 +0000
From: Yevgeny Kliteynik <kliteyn@...dia.com>
To: Simon Horman <horms@...nel.org>, Saeed Mahameed <saeed@...nel.org>
CC: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>, Saeed
Mahameed <saeedm@...dia.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, Tariq Toukan <tariqt@...dia.com>, Gal Pressman
<gal@...dia.com>, Leon Romanovsky <leonro@...dia.com>, Itamar Gozlan
<igozlan@...dia.com>
Subject: RE: [net-next V3 11/15] net/mlx5: HWS, added memory management
handling
> From: Simon Horman <horms@...nel.org>
> Sent: Saturday, September 7, 2024 17:28
> To: Saeed Mahameed <saeed@...nel.org>
> Cc: David S. Miller <davem@...emloft.net>; Jakub Kicinski
> <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; Eric Dumazet
> <edumazet@...gle.com>; Saeed Mahameed <saeedm@...dia.com>;
> netdev@...r.kernel.org; Tariq Toukan <tariqt@...dia.com>; Gal Pressman
> <gal@...dia.com>; Leon Romanovsky <leonro@...dia.com>; Yevgeny
> Kliteynik <kliteyn@...dia.com>; Itamar Gozlan <igozlan@...dia.com>
> Subject: Re: [net-next V3 11/15] net/mlx5: HWS, added memory management handling
>
> > + switch (pool->type) {
> > + case MLX5HWS_POOL_TYPE_STE:
> > + ste_attr.log_obj_range = log_range;
> > + ste_attr.table_type = fw_ft_type;
> > + ret = mlx5hws_cmd_ste_create(pool->ctx->mdev, &ste_attr, &obj_id);
> > + break;
> > + case MLX5HWS_POOL_TYPE_STC:
> > + stc_attr.log_obj_range = log_range;
> > + stc_attr.table_type = fw_ft_type;
> > + ret = mlx5hws_cmd_stc_create(pool->ctx->mdev, &stc_attr, &obj_id);
> > + break;
> > + default:
> > + return NULL;
>
> Sorry, but this now appears to leak resource. Maybe:
>
> goto free_resource;
>
> Or:
> ret = -EINVAL;
>
Indeed. Thanks Simon.
-- YK
Powered by blists - more mailing lists