• Petr Machata's avatar
    mlxsw: spectrum: Use guaranteed buffer size as pool size limit · 914c4fc1
    Petr Machata authored
    There are two resources associated with shared buffer size:
    cap_total_buffer_size, and cap_guaranteed_shared_buffer. So far, mlxsw has
    been using the former as a limit to determine how large a pool size is
    allowed to be. However, the total size also includes headrooms and reserved
    space, which really cannot be used for shared buffer pools.
    
    Therefore convert mlxsw to use the latter resource as a limit. Adjust
    hard-coded pool sizes to be the guaranteed size minus 256000 bytes for CPU
    port pool. On Spectrum-1 that actually leads to an increase. A follow-up
    patch will have this size calculated automatically.
    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>
    914c4fc1
spectrum_qdisc.c 20.9 KB