The tunnel module can get called by the handler threads right after they are started, so we need to call ofproto_tunnel_init() before opening the backer.
Late initialization caused a spurious ovs-vswitchd handler thread crash on start-up due to the tunnel module fat_rwlock not being initialized yet. Signed-off-by: Jarno Rajahalme <jrajaha...@nicira.com> --- ofproto/ofproto-dpif.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index b909fd9..44272f4 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -1272,6 +1272,9 @@ construct(struct ofproto *ofproto_) struct shash_node *node, *next; int error; + /* Tunnel module can get used right after the udpif threads are running. */ + ofproto_tunnel_init(); + error = open_dpif_backer(ofproto->up.type, &ofproto->backer); if (error) { return error; @@ -1289,7 +1292,6 @@ construct(struct ofproto *ofproto_) ofproto->mbridge = mbridge_create(); ofproto->has_bonded_bundles = false; ofproto->lacp_enabled = false; - ofproto_tunnel_init(); ovs_mutex_init_adaptive(&ofproto->stats_mutex); ovs_mutex_init(&ofproto->vsp_mutex); -- 1.7.10.4 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev