mlxsw: spectrum_buffers: Allocate prs & pms dynamically
authorPetr Machata <[email protected]>
Wed, 20 Feb 2019 19:32:14 +0000 (19:32 +0000)
committerDavid S. Miller <[email protected]>
Thu, 21 Feb 2019 23:57:45 +0000 (15:57 -0800)
commit93d201f7757e0ec079bc72344fe3577b7333a585
tree24994ed92e11416395512489cb8e95c670d29654
parentc39f3e0e4f15714f29cf3c089cdb6e179997a415
mlxsw: spectrum_buffers: Allocate prs & pms dynamically

Spectrum-2 will be configured with a different set of pools than
Spectrum-1. The size of prs and pms buffers will therefore depend on the
chip type of the device.

Therefore, instead of reserving an array directly in a structure
definition, allocate the buffer in mlxsw_sp_sb_port{,s}_init().

Signed-off-by: Petr Machata <[email protected]>
Signed-off-by: Ido Schimmel <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c