mlxsw: spectrum: Adjust headroom buffers for 8x ports
authorIdo Schimmel <idosch@mellanox.com>
Tue, 16 Jun 2020 07:14:58 +0000 (10:14 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jun 2020 20:46:27 +0000 (13:46 -0700)
commit60833d54d56c21e7538296eb2e00e104768fd047
treeacc6224de302b76f12869bc7244388ec15824820
parentb15bb8817f991497d97ae55d8c0e349a9d1e1478
mlxsw: spectrum: Adjust headroom buffers for 8x ports

The port's headroom buffers are used to store packets while they
traverse the device's pipeline and also to store packets that are egress
mirrored.

On Spectrum-3, ports with eight lanes use two headroom buffers between
which the configured headroom size is split.

In order to prevent packet loss, multiply the calculated headroom size
by two for 8x ports.

Fixes: da382875c616 ("mlxsw: spectrum: Extend to support Spectrum-3 ASIC")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c