• Petr Machata's avatar
    mlxsw: spectrum_buffers: Keep mlxsw_sp_sb_pms in mlxsw_sp_sb_vals · cc1ce6ff
    Petr Machata authored
    The SBPM register can be used to configure quotas for packets ingressing
    from a certain pool to a certain port, and egressing from a certain pool
    to a certain port. The default configuration depends on the chip type.
    Therefore keep it in struct mlxsw_sp_sb_vals. Redirect the one reference
    from the global array to the field.
    
    Because the pool descriptor ID is implicit in the ordering of array
    members, both this array and the pool descriptor array have the same
    length. Therefore reuse mlxsw_sp_sb.pool_dess_len for the purpose of
    determining the length of SBPM array.
    
    Drop the now useless MLXSW_SP_SB_PMS_LEN.
    Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    cc1ce6ff
spectrum_buffers.c 30.4 KB