#define IFACE_STATS_INTERVAL (5 * 1000) /* In milliseconds. */
static long long int iface_stats_timer = LLONG_MIN;
+/* Set to true to allow experimental use of OpenFlow 1.4.
+ * This is false initially because OpenFlow 1.4 is not yet safe to use: it can
+ * abort due to unimplemented features. */
+static bool allow_of14;
+
/* In some datapaths, creating and destroying OpenFlow ports can be extremely
* expensive. This can cause bridge_reconfigure() to take a long time during
* which no other work can be done. To deal with this problem, we limit port
ovsdb_idl_destroy(idl);
}
+/* Enables use of OpenFlow 1.4. This is off by default because OpenFlow 1.4 is
+ * not yet safe to use: it can abort due to unimplemented features. */
+void
+bridge_enable_of14(void)
+{
+ allow_of14 = true;
+}
+
/* Looks at the list of managers in 'ovs_cfg' and extracts their remote IP
* addresses and ports into '*managersp' and '*n_managersp'. The caller is
* responsible for freeing '*managersp' (with free()).
ofproto_set_flow_limit(smap_get_int(&ovs_cfg->other_config, "flow-limit",
OFPROTO_FLOW_LIMIT_DEFAULT));
+ ofproto_set_max_idle(smap_get_int(&ovs_cfg->other_config, "max-idle",
+ OFPROTO_MAX_IDLE_DEFAULT));
ofproto_set_threads(
smap_get_int(&ovs_cfg->other_config, "n-handler-threads", 0),
static uint32_t
bridge_get_allowed_versions(struct bridge *br)
{
+ uint32_t allowed_versions;
+
if (!br->cfg->n_protocols)
return 0;
- return ofputil_versions_from_strings(br->cfg->protocols,
- br->cfg->n_protocols);
+ allowed_versions = ofputil_versions_from_strings(br->cfg->protocols,
+ br->cfg->n_protocols);
+ if (!allow_of14) {
+ allowed_versions &= ~(1u << OFP14_VERSION);
+ }
+ return allowed_versions;
}
/* Set NetFlow configuration on 'br'. */
}
}
- if (bitmap_scan(port_num_bitmap, 0, STP_MAX_PORTS) != STP_MAX_PORTS
+ if (bitmap_scan(port_num_bitmap, 1, 0, STP_MAX_PORTS) != STP_MAX_PORTS
&& port_num_counter) {
VLOG_ERR("bridge %s: must manually configure all STP port "
"IDs or none, disabling", br->name);
sset_destroy(&splinter_ifaces);
- if (bitmap_scan(splinter_vlans, 0, 4096) >= 4096) {
+ if (bitmap_scan(splinter_vlans, 1, 0, 4096) >= 4096) {
free(splinter_vlans);
return NULL;
}