[ovs-dev] [PATCH 2/3] bridge: Run fast when adding and deleting ports.
Ethan Jackson
ethan at nicira.com
Fri Jun 22 01:51:34 UTC 2012
Adding and deleting ports can be extremely expensive so it makes
sense to get important work done before and after doing it.
Signed-off-by: Ethan Jackson <ethan at nicira.com>
---
vswitchd/bridge.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 5a2b251..149696a 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -474,6 +474,7 @@ bridge_reconfigure_ofp(void)
struct ofpp_garbage *garbage, *next;
LIST_FOR_EACH_SAFE (garbage, next, list_node, &br->ofpp_garbage) {
+ bridge_run_fast();
ofproto_port_del(br->ofproto, garbage->ofp_port);
list_remove(&garbage->list_node);
free(garbage);
@@ -482,6 +483,7 @@ bridge_reconfigure_ofp(void)
if (time_msec() >= deadline) {
return false;
}
+ bridge_run_fast();
}
}
@@ -1330,8 +1332,10 @@ iface_create(struct bridge *br, struct if_cfg *if_cfg, int ofp_port)
free(if_cfg);
/* Do the bits that can fail up front. */
+ bridge_run_fast();
assert(!iface_lookup(br, iface_cfg->name));
error = iface_do_create(br, iface_cfg, port_cfg, &ofp_port, &netdev);
+ bridge_run_fast();
if (error) {
iface_clear_db_record(iface_cfg);
return false;
--
1.7.10.2
More information about the dev
mailing list