-static struct hmap all_bonds = HMAP_INITIALIZER(&all_bonds);
-
-static void bond_entry_reset(struct bond *);
-static struct bond_slave *bond_slave_lookup(struct bond *, const void *slave_);
-static void bond_enable_slave(struct bond_slave *, bool enable,
- struct tag_set *);
-static void bond_link_status_update(struct bond_slave *, struct tag_set *);
-static void bond_choose_active_slave(struct bond *, struct tag_set *);
+static struct ovs_rwlock rwlock = OVS_RWLOCK_INITIALIZER;
+static struct hmap all_bonds__ = HMAP_INITIALIZER(&all_bonds__);
+static struct hmap *const all_bonds OVS_GUARDED_BY(rwlock) = &all_bonds__;
+
+static void bond_entry_reset(struct bond *) OVS_REQ_WRLOCK(rwlock);
+static struct bond_slave *bond_slave_lookup(struct bond *, const void *slave_)
+ OVS_REQ_RDLOCK(rwlock);
+static void bond_enable_slave(struct bond_slave *, bool enable)
+ OVS_REQ_WRLOCK(rwlock);
+static void bond_link_status_update(struct bond_slave *)
+ OVS_REQ_WRLOCK(rwlock);
+static void bond_choose_active_slave(struct bond *)
+ OVS_REQ_WRLOCK(rwlock);;