OVS router depends on tnl_conf_seq and all tunnel related components should be initialized before registering dpif implementations.
Signed-off-by: Pravin B Shelar <pshe...@nicira.com> --- lib/dpif.c | 12 +++++++++--- lib/netdev.c | 4 ---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/dpif.c b/lib/dpif.c index 33e32ef..d6de5a1 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -39,6 +39,7 @@ #include "packets.h" #include "poll-loop.h" #include "route-table.h" +#include "seq.h" #include "shash.h" #include "sset.h" #include "timeval.h" @@ -104,6 +105,9 @@ static void log_execute_message(struct dpif *, const struct dpif_execute *, static void log_flow_get_message(const struct dpif *, const struct dpif_flow_get *, int error); +/* Incremented whenever tnl route, arp, etc changes. */ +struct seq *tnl_conf_seq; + static void dp_initialize(void) { @@ -112,14 +116,16 @@ dp_initialize(void) if (ovsthread_once_start(&once)) { int i; - for (i = 0; i < ARRAY_SIZE(base_dpif_classes); i++) { - dp_register_provider(base_dpif_classes[i]); - } + tnl_conf_seq = seq_create(); dpctl_unixctl_register(); tnl_port_map_init(); tnl_arp_cache_init(); route_table_register(); + for (i = 0; i < ARRAY_SIZE(base_dpif_classes); i++) { + dp_register_provider(base_dpif_classes[i]); + } + ovsthread_once_done(&once); } } diff --git a/lib/netdev.c b/lib/netdev.c index e4e3b18..a6ab141 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -77,9 +77,6 @@ static struct ovs_mutex netdev_class_mutex OVS_ACQ_BEFORE(netdev_mutex); static struct hmap netdev_classes OVS_GUARDED_BY(netdev_class_mutex) = HMAP_INITIALIZER(&netdev_classes); -/* Incremented whenever tnl route, arp, etc changes. */ -struct seq *tnl_conf_seq; - struct netdev_registered_class { /* In 'netdev_classes', by class->type. */ struct hmap_node hmap_node OVS_GUARDED_BY(netdev_class_mutex); @@ -155,7 +152,6 @@ netdev_initialize(void) #endif netdev_dpdk_register(); - tnl_conf_seq = seq_create(); ovsthread_once_done(&once); } } -- 1.7.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev