• Petr Machata's avatar
    mlxsw: spectrum: Track buffer sizes in struct mlxsw_sp_hdroom · aa7c0621
    Petr Machata authored
    So far, port buffers were always autoconfigured. When dcbnl_setbuffer
    callback is implemented, it will allow the user to change the buffer size
    configuration by hand. The sizes therefore need to be a configuration
    parameter, not always deduced, and therefore belong to struct
    mlxsw_sp_hdroom, where the configuration routine should take them from.
    
    Update mlxsw_sp_port_headroom_set() to update these sizes. Have the
    function update the sizes even for the case that a given buffer is not
    used.
    
    Additionally, change the loop iteration end to DCBX_MAX_BUFFERS instead of
    IEEE_8021QAZ_MAX_TCS. The value is the same, but the semantics differ.
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Reviewed-by: default avatarJiri Pirko <jiri@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    aa7c0621
spectrum.c 127 KB