]> git.proxmox.com Git - mirror_ovs.git/commitdiff
vswitchd: Move config_ofproto_types call before bridge_add_port
authorShashank Ram <rams@vmware.com>
Wed, 15 Feb 2017 18:02:40 +0000 (10:02 -0800)
committerDaniele Di Proietto <diproiettod@vmware.com>
Wed, 15 Feb 2017 22:49:20 +0000 (14:49 -0800)
Currently, the call to config_ofproto_types() happens at the end
of bridge_reconfigure(), after missing ofprotos and ports are created.
However, it might be usefull to make this call before adding missing
ports through the dpif interface. With the current use case
(dpif-netdev), this will save us a reconfiguration cycle.

The call to config_ofproto_types() was introduced as a
part of passing the Openvswitch other_config smap to dpif.
However, if we want to do this before the ports are added,
it needs to be done after ofproto_create() is called so that
dpif_backer is added to all_dpif_backers list. Once the
dpif_backer is added, the call to config_ofproto_types()
will ensure that the set_config handler in dpif-netdev/netlink.c
is called.

Signed-off-by: Shashank Ram <rams@vmware.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
vswitchd/bridge.c

index 21c3c7915eaf469ea90da523b5134d85319233b4..2e10013509540621bf3ddd4afdbf25e629cd28c4 100644 (file)
@@ -654,6 +654,9 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg)
             }
         }
     }
+
+    config_ofproto_types(&ovs_cfg->other_config);
+
     HMAP_FOR_EACH (br, node, &all_bridges) {
         bridge_add_ports(br, &br->wanted_ports);
         shash_destroy(&br->wanted_ports);
@@ -706,8 +709,6 @@ bridge_reconfigure(const struct ovsrec_open_vswitch *ovs_cfg)
     }
     free(managers);
 
-    config_ofproto_types(&ovs_cfg->other_config);
-
     /* The ofproto-dpif provider does some final reconfiguration in its
      * ->type_run() function.  We have to call it before notifying the database
      * client that reconfiguration is complete, otherwise there is a very