Re: [PATCH net-next 03/12] net/mlx5: HWS, Make pool single resource
From: Michal Kubiak
Date: Wed Apr 09 2025 - 16:08:30 EST
On Tue, Apr 08, 2025 at 05:00:47PM +0300, Tariq Toukan wrote:
> From: Vlad Dogaru <vdogaru@xxxxxxxxxx>
>
> The pool implementation claimed to support multiple resources, but this
> does not really make sense in context. Callers always allocate a single
> STC or STE chunk of exactly the size provided.
>
> The code that handled multiple resources was unused (and likely buggy)
> due to the combination of flags passed by callers.
>
> Simplify the pool by having it handle a single resource. As a result of
> this simplification, chunks no longer contain a resource offset (there
> is now only one resource per pool), and the get_base_id functions no
> longer take a chunk parameter.
>
> Signed-off-by: Vlad Dogaru <vdogaru@xxxxxxxxxx>
> Reviewed-by: Yevgeny Kliteynik <kliteyn@xxxxxxxxxx>
> Reviewed-by: Mark Bloch <mbloch@xxxxxxxxxx>
> Signed-off-by: Tariq Toukan <tariqt@xxxxxxxxxx>
Nice code simplification!
Thanks,
Reviewed-by: Michal Kubiak <michal.kubiak@xxxxxxxxx>