struct oftable *tables;
int n_tables;
- struct hindex cookies; /* Rules indexed on their cookie values. */
+ /* Rules indexed on their cookie values, in all flow tables. */
+ struct hindex cookies OVS_GUARDED_BY(ofproto_mutex);
/* List of expirable flows, in all flow tables. */
struct list expirable OVS_GUARDED_BY(ofproto_mutex);
struct ofoperation *pending; /* Operation now in progress, if nonnull. */
ovs_be64 flow_cookie; /* Controller-issued identifier. Guarded by
- rwlock. */
- struct hindex_node cookie_node; /* In owning ofproto's 'cookies' index. */
+ mutex. */
+ struct hindex_node cookie_node OVS_GUARDED_BY(ofproto_mutex);
long long int created; /* Creation time. */
long long int modified; /* Time of last modification. */
struct heap_node evg_node; /* In eviction_group's "rules" heap. */
struct eviction_group *eviction_group; /* NULL if not in any group. */
- /* The rwlock is used to protect those elements in struct rule which are
+ /* The mutex is used to protect those elements in struct rule which are
* accessed by multiple threads. The main ofproto code is guaranteed not
- * to change any of the elements "Guarded by rwlock" without holding the
- * writelock.
+ * to change any of the elements "Guarded by mutex" without holding the
+ * lock.
*
* While maintaining a pointer to struct rule, threads are required to hold
* a readlock on the classifier that holds the rule or increment the rule's
*
* A rule will not be evicted unless its classifier's write lock is
* held. */
- struct ovs_rwlock rwlock;
+ struct ovs_mutex mutex;
- /* Guarded by rwlock. */
+ /* Guarded by mutex. */
struct rule_actions *actions;
struct list meter_list_node; /* In owning meter's 'rules' list. */
* =============
*
* A struct rule_actions 'actions' may be accessed without a risk of being
- * freed by code that holds a read-lock or write-lock on 'rule->rwlock' (where
+ * freed by code that holds a read-lock or write-lock on 'rule->mutex' (where
* 'rule' is the rule for which 'rule->actions == actions') or that owns a
* reference to 'actions->ref_count' (or both). */
struct rule_actions {