struct ofpp_garbage *garbage, *next;
LIST_FOR_EACH_SAFE (garbage, next, list_node, &br->ofpp_garbage) {
+ /* It's a bit dangerous to call bridge_run_fast() here as ofproto's
+ * internal datastructures may not be consistent. Eventually, when
+ * port additions and deletions are cheaper, these calls should be
+ * removed. */
+ bridge_run_fast();
ofproto_port_del(br->ofproto, garbage->ofp_port);
list_remove(&garbage->list_node);
free(garbage);
if (time_msec() >= deadline) {
return false;
}
+ bridge_run_fast();
}
}
* forked us to exit successfully. */
daemonize_complete();
reconfiguring = false;
+
+ VLOG_INFO("%s (Open vSwitch) %s", program_name, VERSION);
}
return done;
memcpy(br->ea, ea, ETH_ADDR_LEN);
dpid = bridge_pick_datapath_id(br, ea, hw_addr_iface);
- ofproto_set_datapath_id(br->ofproto, dpid);
+ if (dpid != ofproto_get_datapath_id(br->ofproto)) {
+ VLOG_INFO("bridge %s: using datapath ID %016"PRIx64, br->name, dpid);
+ ofproto_set_datapath_id(br->ofproto, dpid);
+ }
dpid_string = xasprintf("%016"PRIx64, dpid);
ovsrec_bridge_set_datapath_id(br->cfg, dpid_string);
hmap_remove(&br->if_cfg_todo, &if_cfg->hmap_node);
free(if_cfg);
- /* Do the bits that can fail up front. */
+ /* Do the bits that can fail up front.
+ *
+ * It's a bit dangerous to call bridge_run_fast() here as ofproto's
+ * internal datastructures may not be consistent. Eventually, when port
+ * additions and deletions are cheaper, these calls should be removed. */
+ 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;
refresh_system_stats(const struct ovsrec_open_vswitch *cfg)
{
struct ovsdb_datum datum;
- struct shash stats;
+ struct smap stats;
- shash_init(&stats);
+ smap_init(&stats);
if (enable_system_stats(cfg)) {
get_system_stats(&stats);
}
- ovsdb_datum_from_shash(&datum, &stats);
+ ovsdb_datum_from_smap(&datum, &stats);
ovsdb_idl_txn_write(&cfg->header_, &ovsrec_open_vswitch_col_statistics,
&datum);
}