mlxsw: spectrum_buffers: Split business logic from mlxsw_sp_port_sb_pms_init()
authorIdo Schimmel <idosch@mellanox.com>
Mon, 22 Apr 2019 12:08:54 +0000 (12:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 23 Apr 2019 05:09:33 +0000 (22:09 -0700)
commit24a7cc1ef6d926a50dd60a90e012d54493496fc3
tree4b1781a607449f34fbc2362b6c98d81738dd54f6
parent50b5b90514a8306c4a8e33f967f15bac5c9ac1f5
mlxsw: spectrum_buffers: Split business logic from mlxsw_sp_port_sb_pms_init()

The function is used to set the per-port shared buffer quotas.
Currently, these quotas are only set for front panel ports, but a
subsequent patch will configure these quotas for the CPU port as well.

The configuration required for the CPU port is a bit different than that
of the front panel ports, so split the business logic into a separate
function which will be called with different parameters for the CPU
port.

No functional changes intended.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Petr Machata <petrm@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c