mlxsw: spectrum_buffers: Calculate the size of the main pool
authorPetr Machata <petrm@mellanox.com>
Wed, 23 Oct 2019 06:05:00 +0000 (09:05 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Oct 2019 04:31:31 +0000 (21:31 -0700)
commitbc9f6e94bcb5652860c1b3bc82ca27697c496b4d
tree216bc4b55c6308b7bedf38524abe012f22ff8393
parent914c4fc1b792dd963f9606b2e8b33e3d6606eb84
mlxsw: spectrum_buffers: Calculate the size of the main pool

Instead of hard-coding the size of the largest pool, calculate it from the
reported guaranteed shared buffer size and sizes of other pools (currently
only the CPU port pool).

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c