net: microchip: sparx5: Clear rule counter even if lookup is disabled
authorSteen Hegelund <steen.hegelund@microchip.com>
Tue, 14 Feb 2023 10:40:41 +0000 (11:40 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 16 Feb 2023 07:59:48 +0000 (08:59 +0100)
commitd7953da4f2935039430322a31b9da93f978fcc86
treebc9d603b0af26c2eaa598e36872c9e0770547822
parent65b6625069a42edf2a813dd1c50604c6c6236fe5
net: microchip: sparx5: Clear rule counter even if lookup is disabled

The rule counter must be cleared when creating a new rule, even if the VCAP
lookup is currently disabled.

This ensures that rules located in VCAPs that use external counters (such
as Sparx5 IS2 and ES0) will have their counter reset even if the VCAP
lookup is not enabled at the moment.

Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com>
Fixes: 95fa74148daa ("net: microchip: sparx5: Reset VCAP counter for new rules")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microchip/vcap/vcap_api.c
drivers/net/ethernet/microchip/vcap/vcap_api_kunit.c