• P
    mlxsw: spectrum: Use guaranteed buffer size as pool size limit · 914c4fc1
    Petr Machata 提交于
    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: NPetr Machata <petrm@mellanox.com>
    Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    914c4fc1
spectrum_buffers.c 39.6 KB