Re: [PATCH net-next 03/12] net/mlx5: HWS, Make pool single resource

Michal Kubiak
2025-04-09T20:04:32Z

On Tue, Apr 08, 2025 at 05:00:47PM +0300, Tariq Toukan wrote:
> From: Vlad Dogaru <vdogaru@nvidia.com>
>
> 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@nvidia.com>
> Reviewed-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
> Reviewed-by: Mark Bloch <mbloch@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>

Nice code simplification!

Thanks,
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>