nfp: flower: avoid rmmod nfp crash issues
[platform/kernel/linux-starfive.git] / drivers / net / ethernet / netronome / nfp / flower / main.h
index 4037254..2b7c947 100644 (file)
@@ -297,6 +297,7 @@ struct nfp_fl_internal_ports {
  * @predt_list:                List to keep track of decap pretun flows
  * @neigh_table:       Table to keep track of neighbor entries
  * @predt_lock:                Lock to serialise predt/neigh table updates
+ * @nfp_fl_lock:       Lock to protect the flow offload operation
  */
 struct nfp_flower_priv {
        struct nfp_app *app;
@@ -339,6 +340,7 @@ struct nfp_flower_priv {
        struct list_head predt_list;
        struct rhashtable neigh_table;
        spinlock_t predt_lock; /* Lock to serialise predt/neigh table updates */
+       struct mutex nfp_fl_lock; /* Protect the flow operation */
 };
 
 /**