]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit631da68f6de2a6bc35fd3400d4f8aeab6baacf5a
tree216bc4b55c6308b7bedf38524abe012f22ff8393
parent8da6ff88d1cbf7d8b0d7d53f2953d0eba8fc0527
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