summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/microchip/vcap/vcap_api.h
diff options
context:
space:
mode:
authorSteen Hegelund <steen.hegelund@microchip.com>2022-11-17 22:31:13 +0100
committerDavid S. Miller <davem@davemloft.net>2022-11-21 11:33:02 +0000
commit71c9de995260222e739020104d477af4775a6d26 (patch)
treecab746f59a824580984ed4c4e3f231a554edaedc /drivers/net/ethernet/microchip/vcap/vcap_api.h
parent72d84dd609bea135f823e8d1a60380b4aa443ee5 (diff)
net: microchip: sparx5: Add VCAP locking to protect rules
This ensures that the VCAP cache and the lists maintained in the VCAP instance is protected when accessed by different clients. 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.h')
-rw-r--r--drivers/net/ethernet/microchip/vcap/vcap_api.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/microchip/vcap/vcap_api.h b/drivers/net/ethernet/microchip/vcap/vcap_api.h
index e71e7d3d79c2..f4a5ba5ffa87 100644
--- a/drivers/net/ethernet/microchip/vcap/vcap_api.h
+++ b/drivers/net/ethernet/microchip/vcap/vcap_api.h
@@ -167,6 +167,7 @@ struct vcap_admin {
struct list_head list; /* for insertion in vcap_control */
struct list_head rules; /* list of rules */
struct list_head enabled; /* list of enabled ports */
+ struct mutex lock; /* control access to rules */
enum vcap_type vtype; /* type of vcap */
int vinst; /* instance number within the same type */
int first_cid; /* first chain id in this vcap */