projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement "native VLAN" feature.
[openvswitch]
/
ofproto
/
connmgr.c
diff --git
a/ofproto/connmgr.c
b/ofproto/connmgr.c
index 865fa29547f78ba10b8ec3cda042b93c48061c03..2d0b8c5d5a56ff963951389bfb90a32aee6dced1 100644
(file)
--- a/
ofproto/connmgr.c
+++ b/
ofproto/connmgr.c
@@
-240,7
+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) {
- in_band_run(mgr->in_band);
+ if (!in_band_run(mgr->in_band)) {
+ in_band_destroy(mgr->in_band);
+ mgr->in_band = NULL;
+ }
}
LIST_FOR_EACH_SAFE (ofconn, next_ofconn, node, &mgr->all_conns) {
}
LIST_FOR_EACH_SAFE (ofconn, next_ofconn, node, &mgr->all_conns) {
@@
-604,13
+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);
} else {
in_band_set_queue(mgr->in_band, mgr->in_band_queue);
} 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. */
@@
-846,13
+849,6
@@
ofconn_has_pending_opgroups(const struct ofconn *ofconn)
return !list_is_empty(&ofconn->opgroups);
}
return !list_is_empty(&ofconn->opgroups);
}
-/* Returns the number of pending opgroups on 'ofconn'. */
-size_t
-ofconn_n_pending_opgroups(const struct ofconn *ofconn)
-{
- return list_size(&ofconn->opgroups);
-}
-
/* Adds 'ofconn_node' to 'ofconn''s list of pending opgroups.
*
* If 'ofconn' is destroyed or its connection drops, then 'ofconn' will remove
/* Adds 'ofconn_node' to 'ofconn''s list of pending opgroups.
*
* If 'ofconn' is destroyed or its connection drops, then 'ofconn' will remove