]> 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)
commit628be966364c79e9c9bd667d5542730249d48627
tree789d8dd281b3589c555c73b5ec455cab646dad32
parent5400ced1747a5868d5a9ce2abba1be5cba11524a
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