• Ido Schimmel's avatar
    mlxsw: spectrum: Add ability to query KVDL allocation size · d672aec4
    Ido Schimmel authored
    The current KVDL allocation API allows the user to specify the requested
    number of entries, but the user has no way of knowing how many entries
    were actually allocated.
    
    This works because existing users (e.g., router) request the exact
    number they end up using. With the introduction of large adjacency
    groups, this will change, as the router will have the ability to choose
    from several allocation sizes, where larger allocations provide higher
    accuracy with respect to requested weights and better resilience against
    nexthop failures.
    
    One option is to have the router try several allocations of descending
    size until one succeeds, but a better way is to simply allow it to query
    the actual allocation size and then size its request accordingly.
    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>
    d672aec4
spectrum.h 19.8 KB