]> 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)
commit49cf58ff43914582048b4123c5e2d4e8412d0bb8
tree6c07aa1c92871f34d067039c21a0b8af1d3d1e19
parent445e0db72addaa6b056f523f33378a5d8835e4b7
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