OSDN Git Service

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)
commita00cd87880a3afa88055aa5f43ee6386c67895a8
treea6b37b4856075023255829b33393a6ec21d2e864
parent3b72422dea971142aa38a787b941a058e04fdb13
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