summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/microchip/vcap/vcap_api_private.h
diff options
context:
space:
mode:
authorSteen Hegelund <steen.hegelund@microchip.com>2023-01-17 09:55:42 +0100
committerDavid S. Miller <davem@davemloft.net>2023-01-18 14:31:43 +0000
commit9579e2c271b4f2e6d24f61ff17abda2e9ce8cc85 (patch)
tree0bf45d3ce3f29743021000778df0fa333f1e84e2 /drivers/net/ethernet/microchip/vcap/vcap_api_private.h
parent975d86acaec78306a88b4575a2c6357b97c2c4db (diff)
net: microchip: sparx5: Add VCAP admin locking in debugFS
This ensures that the admin lock is taken before the debugFS functions starts iterating the VCAP rules. It also adds a separate function to decode a rule, which expects the lock to have been taken before it is called. Signed-off-by: Steen Hegelund <steen.hegelund@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/microchip/vcap/vcap_api_private.h')
-rw-r--r--drivers/net/ethernet/microchip/vcap/vcap_api_private.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api_private.h b/drivers/net/ethernet/microchip/vcap/vcap_api_private.h
index 86542accffe6..df81d9ff502b 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api_private.h
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api_private.h
@@ -118,4 +118,7 @@ int vcap_find_keystream_keysets(struct vcap_control *vctrl, enum vcap_type vt,
/* Get the keysets that matches the rule key type/mask */
int vcap_rule_get_keysets(struct vcap_rule_internal *ri,
struct vcap_keyset_list *matches);
+/* Decode a rule from the VCAP cache and return a copy */
+struct vcap_rule *vcap_decode_rule(struct vcap_rule_internal *elem);
+
#endif /* __VCAP_API_PRIVATE__ */