• Ido Schimmel's avatar
    mlxsw: spectrum: Better represent KVDL partitions · a875a2ee
    Ido Schimmel authored
    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: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a875a2ee
spectrum.c 129 KB