Re: [PATCH net-next 04/12] net/mlx5: HWS, Refactor pool implementation
From: Michal Kubiak
Date: Wed Apr 09 2025 - 17:26:19 EST
On Tue, Apr 08, 2025 at 05:00:48PM +0300, Tariq Toukan wrote:
> From: Vlad Dogaru <vdogaru@xxxxxxxxxx>
>
> Refactor the pool implementation to remove unused flags and clarify its
> usage. A pool represents a single range of STEs or STCs which are
> allocated at pool creation time.
>
> Pools are used under three patterns:
>
> 1. STCs are allocated one at a time from a global pool using a bitmap
> based implementation.
>
> 2. Action STEs are allocated in power-of-two blocks using a buddy
> algorithm.
>
> 3. Match STEs do not use allocation, since insertion into these tables
> is based on hashes or direct addressing. In such cases we use a pool
> only to create the STE range.
>
> 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>
Thanks,
Reviewed-by: Michal Kubiak <michal.kubiak@xxxxxxxxx>