mlxsw: spectrum_cnt: Expose subpool sizes over devlink resources
authorJiri Pirko <jiri@mellanox.com>
Wed, 18 Mar 2020 13:48:53 +0000 (15:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Mar 2020 23:46:19 +0000 (16:46 -0700)
commitd53cdbb889a33c803847da8d1592a45b4c1badb5
treeb572bec28b5fef401b0092de765c8d2113a7aa36
parentb2d3e33c77cfcbb7ab3e7ab799200da357d408e1
mlxsw: spectrum_cnt: Expose subpool sizes over devlink resources

Implement devlink resources support for counter pools. Move the subpool
sizes calculations into the new resources register function.

Signed-off-by: Jiri Pirko <jiri@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.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_cnt.h