]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_cnt: Move config validation along with resource register
authorJiri Pirko <jiri@mellanox.com>
Wed, 18 Mar 2020 13:48:54 +0000 (15:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Mar 2020 23:46:19 +0000 (16:46 -0700)
commit27ef15e29fa21c144e3ca25c0e5f6dca2ff2d508
tree6c07aa1c92871f34d067039c21a0b8af1d3d1e19
parent7a3f0ab56f455512896366b56a62baab6447be2f
mlxsw: spectrum_cnt: Move config validation along with resource register

Move the validation of subpools configuration, to avoid possible over
commitment to resource registration. Add WARN_ON to indicate bug
in the code.

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_cnt.c