mirror of
https://github.com/openvswitch/ovs
synced 2025-08-29 21:38:13 +00:00
ofproto: Add more thread safety annotations.
These would have found the problem fixed in commit c7be3f559349 (connmgr: Fix attempt to take mutex recursively when exiting fail-open.). Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
parent
deb64473f6
commit
feb8a80bb9
@ -454,7 +454,7 @@ static void add_controller(struct connmgr *, const char *target, uint8_t dscp,
|
||||
OVS_REQUIRES(ofproto_mutex);
|
||||
static struct ofconn *find_controller_by_target(struct connmgr *,
|
||||
const char *target);
|
||||
static void update_fail_open(struct connmgr *);
|
||||
static void update_fail_open(struct connmgr *) OVS_EXCLUDED(ofproto_mutex);
|
||||
static int set_pvconns(struct pvconn ***pvconnsp, size_t *n_pvconnsp,
|
||||
const struct sset *);
|
||||
|
||||
@ -771,6 +771,7 @@ update_in_band_remotes(struct connmgr *mgr)
|
||||
|
||||
static void
|
||||
update_fail_open(struct connmgr *mgr)
|
||||
OVS_EXCLUDED(ofproto_mutex)
|
||||
{
|
||||
if (connmgr_has_controllers(mgr)
|
||||
&& mgr->fail_mode == OFPROTO_FAIL_STANDALONE) {
|
||||
|
@ -182,6 +182,7 @@ fail_open_run(struct fail_open *fo)
|
||||
* controller, exits fail open mode. */
|
||||
void
|
||||
fail_open_maybe_recover(struct fail_open *fo)
|
||||
OVS_EXCLUDED(ofproto_mutex)
|
||||
{
|
||||
if (fail_open_is_active(fo)
|
||||
&& connmgr_is_any_controller_admitted(fo->connmgr)) {
|
||||
@ -191,6 +192,7 @@ fail_open_maybe_recover(struct fail_open *fo)
|
||||
|
||||
static void
|
||||
fail_open_recover(struct fail_open *fo)
|
||||
OVS_EXCLUDED(ofproto_mutex)
|
||||
{
|
||||
struct match match;
|
||||
|
||||
@ -250,6 +252,7 @@ fail_open_create(struct ofproto *ofproto, struct connmgr *mgr)
|
||||
/* Destroys 'fo'. */
|
||||
void
|
||||
fail_open_destroy(struct fail_open *fo)
|
||||
OVS_EXCLUDED(ofproto_mutex)
|
||||
{
|
||||
if (fo) {
|
||||
if (fail_open_is_active(fo)) {
|
||||
|
@ -40,11 +40,11 @@ is_fail_open_rule(const struct rule *rule)
|
||||
}
|
||||
|
||||
struct fail_open *fail_open_create(struct ofproto *, struct connmgr *);
|
||||
void fail_open_destroy(struct fail_open *);
|
||||
void fail_open_destroy(struct fail_open *) OVS_EXCLUDED(ofproto_mutex);
|
||||
void fail_open_wait(struct fail_open *);
|
||||
bool fail_open_is_active(const struct fail_open *);
|
||||
void fail_open_run(struct fail_open *);
|
||||
void fail_open_maybe_recover(struct fail_open *);
|
||||
void fail_open_flushed(struct fail_open *);
|
||||
void fail_open_maybe_recover(struct fail_open *) OVS_EXCLUDED(ofproto_mutex);
|
||||
void fail_open_flushed(struct fail_open *) OVS_EXCLUDED(ofproto_mutex);
|
||||
|
||||
#endif /* fail-open.h */
|
||||
|
Loading…
x
Reference in New Issue
Block a user