]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - drivers/net/ethernet/mellanox/mlxsw/spectrum.c
mlxsw: spectrum: Better represent KVDL partitions
authorIdo Schimmel <idosch@mellanox.com>
Sun, 22 Oct 2017 21:11:44 +0000 (23:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Oct 2017 04:23:06 +0000 (05:23 +0100)
commita875a2ee2db8970dd93b8d287e35b8eba72f0a89
tree4f1d2fc18400d7c5f304dcd60b1fa9d29da66dda
parente69cd9d75ee797a46e1d2703226f0478d05bca10
mlxsw: spectrum: Better represent KVDL partitions

The KVD linear (KVDL) allocator currently consists of a very large
bitmap that reflects the KVDL's usage. The boundaries of each partition
as well as their allocation size are represented using defines.

This representation requires us to patch all the functions that act on a
partition whenever the partitioning scheme is changed. In addition, it
does not enable the dynamic configuration of the KVDL using the
up-coming resource manager.

Add objects to represent these partitions as well as the accompanying
code that acts on them to perform allocations and de-allocations.

In the following patches, this will allow us to easily add another
partition as well as new operations to act on these partitions.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c