]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx4: Add mlx4_bitmap zone allocator
authorMatan Barak <matanb@mellanox.com>
Thu, 11 Dec 2014 08:57:56 +0000 (10:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Dec 2014 19:47:35 +0000 (14:47 -0500)
commit40135db565955c74afc99286d378b9d423b35ff2
tree789d8dd281b3589c555c73b5ec455cab646dad32
parenta967a99a459500d6a5a807eea01c368ce404143e
net/mlx4: Add mlx4_bitmap zone allocator

The zone allocator is a mechanism which manages a few mlx4_bitmaps.

When allocating a resource, the user indicates the desired zone of
which this resource will be allocated from. If possible, the resource
will be allocated from this zone. Otherwise, the resource will be
allocated from a less-than, equal-to, higher-than priority zone,
according to the desired zone's properties with that respective
allocation order.

Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/alloc.c
drivers/net/ethernet/mellanox/mlx4/mlx4.h