]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mlxsw: spectrum: Adjust headroom buffers for 8x ports
authorIdo Schimmel <idosch@mellanox.com>
Tue, 16 Jun 2020 07:14:58 +0000 (10:14 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:49:16 +0000 (17:49 +0200)
commit357db9e8ff4778c99d1a44efa1afd584d447224f
tree6d222ae26abe287b47a3a52a351a2fac4f8510b5
parentb92aa0bbfda24d89bdcddf6f5df6fe1de5531dd9
mlxsw: spectrum: Adjust headroom buffers for 8x ports

[ Upstream commit 60833d54d56c21e7538296eb2e00e104768fd047 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
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