mlxsw: spectrum_buffers: Keep pool descriptors in mlxsw_sp_sb_vals
authorPetr Machata <petrm@mellanox.com>
Wed, 20 Feb 2019 19:32:16 +0000 (19:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 Feb 2019 23:57:45 +0000 (15:57 -0800)
commit5d65f5f45eaff091a2409e67225983dad4a33423
tree64823a14d56aeee15af141e99df78bf7fa68de08
parent93d201f7757e0ec079bc72344fe3577b7333a585
mlxsw: spectrum_buffers: Keep pool descriptors in mlxsw_sp_sb_vals

Keep the table of pool descriptors and its length in struct
mlxsw_sp_sb_vals so that it can be specialized per chip type. Redirect
all users from the global definitions to the mlxsw_sp_sb fields.

Give mlxsw_sp_pool_count() an extra mlxsw_sp parameter so that it can
access the descriptor table.

Drop the now unnecessary MLXSW_SP_SB_POOL_DESS_LEN.

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