bridge: Initialize dscp for mgmt connections.
[cascardo/ovs.git] / vswitchd / bridge.c
index 1145e98..30fce66 100644 (file)
@@ -185,11 +185,6 @@ static struct ovsdb_idl_txn *status_txn;
 static int stats_timer_interval;
 static long long int 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
@@ -452,14 +447,6 @@ bridge_exit(void)
     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()).
@@ -983,17 +970,11 @@ bridge_configure_datapath_id(struct bridge *br)
 static uint32_t
 bridge_get_allowed_versions(struct bridge *br)
 {
-    uint32_t allowed_versions;
-
     if (!br->cfg->n_protocols)
         return 0;
 
-    allowed_versions = ofputil_versions_from_strings(br->cfg->protocols,
-                                                     br->cfg->n_protocols);
-    if (!allow_of14) {
-        allowed_versions &= ~(1u << OFP14_VERSION);
-    }
-    return allowed_versions;
+    return ofputil_versions_from_strings(br->cfg->protocols,
+                                         br->cfg->n_protocols);
 }
 
 /* Set NetFlow configuration on 'br'. */
@@ -2383,8 +2364,13 @@ bridge_run(void)
 
     /* Statistics update interval should always be greater than or equal to
      * 5000 ms. */
-    stats_interval = MAX(smap_get_int(&cfg->other_config,
-                                      "stats-update-interval", 5000), 5000);
+    if (cfg) {
+        stats_interval = MAX(smap_get_int(&cfg->other_config,
+                                          "stats-update-interval",
+                                          5000), 5000);
+    } else {
+        stats_interval = 5000;
+    }
     if (stats_timer_interval != stats_interval) {
         stats_timer_interval = stats_interval;
         stats_timer = LLONG_MIN;
@@ -2849,6 +2835,7 @@ bridge_ofproto_controller_for_mgmt(const struct bridge *br,
     oc->rate_limit = 0;
     oc->burst_limit = 0;
     oc->enable_async_msgs = true;
+    oc->dscp = 0;
 }
 
 /* Converts ovsrec_controller 'c' into an ofproto_controller in 'oc'.  */