Re: [PATCH net-next 04/12] net/mlx5: HWS, Refactor pool implementation

Michal Kubiak
2025-04-09T21:25:05Z

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

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