When the mlxsw driver parses a port range template rule, it acquires the
actual port range registers. The parsing is only done to determine the
element usage, so the registers can be deallocated right away, but this is
never done, and the registers are leaked. Plug this leak and add a selftest
that would have caught it.
Petr Machata (2):
mlxsw: spectrum_flower: Fix port range register leak in tmplt_create()
selftests: mlxsw: Test port range occupancy on template create
.../net/ethernet/mellanox/mlxsw/spectrum.h | 2 ++
.../ethernet/mellanox/mlxsw/spectrum_acl.c | 10 +++++--
.../ethernet/mellanox/mlxsw/spectrum_flower.c | 9 +++++--
.../drivers/net/mlxsw/port_range_occ.sh | 26 +++++++++++++++++++
4 files changed, 43 insertions(+), 4 deletions(-)
--
2.55.0