OSDN Git Service

net/mlx5: DR, Add buddy allocator utilities
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Mon, 14 Sep 2020 12:05:30 +0000 (15:05 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 5 Nov 2020 20:09:29 +0000 (12:09 -0800)
commit3b72422dea971142aa38a787b941a058e04fdb13
treedc34d443f47ee31417b2c3edb44e119eef833ec2
parent8a8a1023000e7afd6f9a19319589e124c706d953
net/mlx5: DR, Add buddy allocator utilities

Add implementation of SW Steering variation of buddy allocator.

The buddy system for ICM memory uses 2 main data structures:
- Bitmap per order, that keeps the current state of allocated
  blocks for this order
- Indicator for the number of available blocks per each order

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/Makefile
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_buddy.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/steering/mlx5dr.h