]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: DR, Handle ICM memory via buddy allocation instead of buckets
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Mon, 14 Sep 2020 12:05:56 +0000 (15:05 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 5 Nov 2020 20:09:29 +0000 (12:09 -0800)
commite785a9cff5f6f376bbfbb637395070bd1716c24e
treea6b37b4856075023255829b33393a6ec21d2e864
parent7144d4ff4b38afd02e648119dbd400ec7d9e7ac8
net/mlx5: DR, Handle ICM memory via buddy allocation instead of buckets

Till now in order to manage the ICM memory we used bucket
mechanism, which kept a bucket per specified size (sizes were
between 1 block to 2^21 blocks).

Now changing that with buddy-system mechanism, which gives us much
more flexible way to manage the ICM memory.
Its biggest advantage over the bucket is by using the same ICM memory
area for all the sizes of blocks, which reduces the memory consumption.

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_types.h