]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Refactor port buffer configuration
authorIdo Schimmel <idosch@mellanox.com>
Fri, 24 Mar 2017 07:02:50 +0000 (08:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Mar 2017 20:53:29 +0000 (13:53 -0700)
commit14b77c42cb0478e6022e2c89abe9a56d53aa1571
tree76e47f1b784e4592be8e4befd71bc95f6786a8f0
parent05597d249a5eba86b1d3769dc1ed517f11577440
mlxsw: spectrum: Refactor port buffer configuration

The sizes and thresholds of the priority group (PG) buffers are
configured in cells, which represent a specific amount of bytes.

The cell size can vary in different devices, so it's better to query it
from the firmware than hard coding it.

Refactor the code dealing with this value into different functions, so
that it will be easier to make the conversion in the next patch.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-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