]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_buffers: Reduce pool size on Spectrum-2
authorPetr Machata <petrm@mellanox.com>
Tue, 11 Jun 2019 07:19:45 +0000 (10:19 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Jun 2019 18:08:15 +0000 (11:08 -0700)
commitd06c83ca68f89d01d77ef4aae679f377ec27478d
treee3fca6e9d9ea733002e6d5e6d337a5bf1aeb7238
parentb7cc51d821745bc41f7a1b1d5b6e1f15b97d8f6b
mlxsw: spectrum_buffers: Reduce pool size on Spectrum-2

Due to an issue on Spectrum-2, in front-panel ports split four ways, 2 out
of 32 port buffers cannot be used. To work around this, the next FW release
will mark them as unused, and will report correspondingly lower total
shared buffer size. mlxsw will pick up the new value through a query to
cap_total_buffer_size resource. However the initial size for shared buffer
pool 0 is hard-coded and therefore needs to be updated.

Thus reduce the pool size by 2.7 MiB (which corresponds to 2/32 of the
total size of 42 MiB), and round down to the whole number of cells.

Fixes: 44923f17478d ("mlxsw: spectrum_buffers: Add Spectrum-2 shared buffer configuration")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Pirko <jiri@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