[PATCH net-next 0/5] Improve locking in the VCAP API

From: Steen Hegelund
Date: Tue Jan 17 2023 - 03:56:05 EST


This improves the VCAP cache and the VCAP rule list protection against
access from different sources.

The VCAP Admin lock protects the list of rules for the VCAP instance as
well as the cache used for encoding and decoding rules.

This series provides dedicated functions for accessing rule statistics,
decoding rule content, verifying if a rule exists and getting a rule with
the lock held, as well as ensuring the use of the lock when the list of
rules or the cache is accessed.

Steen Hegelund (5):
net: microchip: sparx5: Add support for rule count by cookie
net: microchip: sparx5: Add support to check for existing VCAP rule id
net: microchip: sparx5: Add VCAP admin locking in debugFS
net: microchip: sparx5: Improve VCAP admin locking in the VCAP API
net: microchip: sparx5: Add lock initialization to the KUNIT tests

.../microchip/sparx5/sparx5_tc_flower.c | 34 +--
.../net/ethernet/microchip/vcap/vcap_api.c | 234 ++++++++++++------
.../ethernet/microchip/vcap/vcap_api_client.h | 2 +
.../microchip/vcap/vcap_api_debugfs.c | 14 +-
.../microchip/vcap/vcap_api_debugfs_kunit.c | 1 +
.../ethernet/microchip/vcap/vcap_api_kunit.c | 1 +
.../microchip/vcap/vcap_api_private.h | 3 +
7 files changed, 175 insertions(+), 114 deletions(-)

--
2.39.0