Merge branch 'mlxsw-Update-main-pool-computation-and-pool-size-limits'
authorDavid S. Miller <davem@davemloft.net>
Thu, 24 Oct 2019 04:31:31 +0000 (21:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Oct 2019 04:31:31 +0000 (21:31 -0700)
commit8ef0c0409e6bd42ec63a405f27ed632bb45f905c
tree216bc4b55c6308b7bedf38524abe012f22ff8393
parent06cd9da58fb25526bd1a4b0f36e25e1a8824ea1f
parentbc9f6e94bcb5652860c1b3bc82ca27697c496b4d
Merge branch 'mlxsw-Update-main-pool-computation-and-pool-size-limits'

Ido Schimmel says:

====================
mlxsw: Update main pool computation and pool size limits

Petr says:

In Spectrum ASICs, the shared buffer is an area of memory where packets are
kept until they can be transmitted. 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 when validating shared
buffer pool size configuration. However, the total size also includes
headrooms and reserved space, which really cannot be used for shared buffer
pools. Patch #1 mends this and has mlxsw use the guaranteed size.

To configure default pool sizes, mlxsw has historically hard-coded one or
two smallish pools, and one "main" pool that took most of the shared buffer
(that would be pool 0 on ingress and pool 4 on egress). During the
development of Spectrum-2, it became clear that the shared buffer size
keeps shrinking as bugs are identified and worked around. In order to
prevent having to tweak the size of pools 0 and 4 to catch up with updates
to values reported by the FW, patch #2 changes the way these pools are set.
Instead of hard-coding a fixed value, the main pool now takes whatever is
left from the guaranteed size after the smaller pool(s) are taken into
account.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>