OSDN Git Service

net: microchip: sparx5: Add VCAP admin locking in debugFS
authorSteen Hegelund <steen.hegelund@microchip.com>
Tue, 17 Jan 2023 08:55:42 +0000 (09:55 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jan 2023 14:31:43 +0000 (14:31 +0000)
commit9579e2c271b4f2e6d24f61ff17abda2e9ce8cc85
tree0bf45d3ce3f29743021000778df0fa333f1e84e2
parent975d86acaec78306a88b4575a2c6357b97c2c4db
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>
drivers/net/ethernet/microchip/vcap/vcap_api.c
drivers/net/ethernet/microchip/vcap/vcap_api_debugfs.c
drivers/net/ethernet/microchip/vcap/vcap_api_private.h