projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nicira-ext: Fix NXM example.
[openvswitch]
/
ofproto
/
connmgr.c
diff --git
a/ofproto/connmgr.c
b/ofproto/connmgr.c
index 44e1b28467908a7b62e12904ed8752a9e992360d..38052ac5ee52ce13f60fc5ecaf5812e2476c2448 100644
(file)
--- a/
ofproto/connmgr.c
+++ b/
ofproto/connmgr.c
@@
-137,7
+137,6
@@
struct connmgr {
/* In-band control. */
struct in_band *in_band;
/* In-band control. */
struct in_band *in_band;
- long long int next_in_band_update;
struct sockaddr_in *extra_in_band_remotes;
size_t n_extra_remotes;
int in_band_queue;
struct sockaddr_in *extra_in_band_remotes;
size_t n_extra_remotes;
int in_band_queue;
@@
-172,7
+171,6
@@
connmgr_create(struct ofproto *ofproto,
mgr->fail_mode = OFPROTO_FAIL_SECURE;
mgr->in_band = NULL;
mgr->fail_mode = OFPROTO_FAIL_SECURE;
mgr->in_band = NULL;
- mgr->next_in_band_update = LLONG_MAX;
mgr->extra_in_band_remotes = NULL;
mgr->n_extra_remotes = 0;
mgr->in_band_queue = -1;
mgr->extra_in_band_remotes = NULL;
mgr->n_extra_remotes = 0;
mgr->in_band_queue = -1;
@@
-242,10
+240,10
@@
connmgr_run(struct connmgr *mgr,
size_t i;
if (handle_openflow && mgr->in_band) {
size_t i;
if (handle_openflow && mgr->in_band) {
- if (time_msec() >= mgr->next_in_band_update) {
- update_in_band_remotes(mgr);
+ if (!in_band_run(mgr->in_band)) {
+ in_band_destroy(mgr->in_band);
+ mgr->in_band = NULL;
}
}
- in_band_run(mgr->in_band);
}
LIST_FOR_EACH_SAFE (ofconn, next_ofconn, node, &mgr->all_conns) {
}
LIST_FOR_EACH_SAFE (ofconn, next_ofconn, node, &mgr->all_conns) {
@@
-309,7
+307,6
@@
connmgr_wait(struct connmgr *mgr, bool handling_openflow)
ofconn_wait(ofconn, handling_openflow);
}
if (handling_openflow && mgr->in_band) {
ofconn_wait(ofconn, handling_openflow);
}
if (handling_openflow && mgr->in_band) {
- poll_timer_wait_until(mgr->next_in_band_update);
in_band_wait(mgr->in_band);
}
if (handling_openflow && mgr->fail_open) {
in_band_wait(mgr->in_band);
}
if (handling_openflow && mgr->fail_open) {
@@
-610,14
+607,13
@@
update_in_band_remotes(struct connmgr *mgr)
if (!mgr->in_band) {
in_band_create(mgr->ofproto, mgr->local_port_name, &mgr->in_band);
}
if (!mgr->in_band) {
in_band_create(mgr->ofproto, mgr->local_port_name, &mgr->in_band);
}
- if (mgr->in_band) {
- in_band_set_remotes(mgr->in_band, addrs, n_addrs);
- }
in_band_set_queue(mgr->in_band, mgr->in_band_queue);
in_band_set_queue(mgr->in_band, mgr->in_band_queue);
- mgr->next_in_band_update = time_msec() + 1000;
} else {
} else {
- in_band_destroy(mgr->in_band);
- mgr->in_band = NULL;
+ /* in_band_run() needs a chance to delete any existing in-band flows.
+ * We will destroy mgr->in_band after it's done with that. */
+ }
+ if (mgr->in_band) {
+ in_band_set_remotes(mgr->in_band, addrs, n_addrs);
}
/* Clean up. */
}
/* Clean up. */