mlxsw: spectrum_buffers: Update port headroom configuration
authorPetr Machata <petrm@mellanox.com>
Wed, 20 Feb 2019 19:32:27 +0000 (19:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Feb 2019 23:57:46 +0000 (15:57 -0800)
commitedf777f55aee61d1021fc496f16ef121380cfa67
tree96d9e08226f05193261966785ba84a6224fb7b2c
parentfe099bf682abbec77d0be73f62423ad794d88a04
mlxsw: spectrum_buffers: Update port headroom configuration

The recommendation for headroom size for 100Gbps port and 100m cable is
101.6KB, reduced accordingly for split ports. The closest higher number
evenly divisible by cell size for both Spectrum-1 and Spectrum-2, and
such that the number of cells can be further divided by maximum split
factor of 4, is 102528 bytes, or 25632 bytes per lane.

Update mlxsw_sp_port_pb_init() to compute the headroom taking into
account this recommended per-lane value and number of lanes actually
dedicated to a given port.

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