session: fix node enable sequence
Type: fix
Change the sequence to first allocate session_manager and
then enable the session-nodes.
During “session enable”, sometimes an issue was seen when in some cases
POLLING node calls transport_update_time -> tcp_update_time -> tcp_set_time_now
which access tcp_main.wrk_ctx before tcp_main_enable allocates the wrk_ctx.
0 0x00007ffff73f7778 in tcp_set_time_now (wrk=<optimized out>)
at src/vnet/tcp/tcp.h:953
1 tcp_update_time (now=11.059735140000001, thread_index=<optimized out>)
at src/vnet/tcp/tcp.c:1192
2 0x00007ffff75a75de in transport_update_time (time_now=11.059735140000001, thread_index=thread_index@entry=1 '\001')
at src/vnet/session/transport.c:740
3 0x00007ffff75a0f4c in session_queue_node_fn (vm=0x7fff74913480, node=0x7fff75e7d5c0, frame=<optimized out>)
at src/vnet/session/session_node.c:873
Change-Id: Id2288dd05ba179af2ff22c58bac1331fc21a1c7d
Signed-off-by: Vladimir Kropylev <vladimir.kropylev@enea.com>
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index cbc8d80..e7542ae 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1485,8 +1485,8 @@
if (session_main.is_enabled)
return 0;
- session_node_enable_disable (is_en);
error = session_manager_main_enable (vm);
+ session_node_enable_disable (is_en);
}
else
{