]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc3fb4c39e38a65d0d6ae6925272e34c3d4db2ba4
tree96d9e08226f05193261966785ba84a6224fb7b2c
parent29c2719502d8e47e806baa8fd8e34977c49bde60
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