aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/lisp-cp/control.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-05-30 02:01:55 -0700
committerDave Barach <openvpp@barachs.net>2019-05-30 11:47:23 +0000
commitd37da9004f168c248ba8f4fdc1acd5e0344ae7f6 (patch)
tree26de08521efeff5d2bbcbe2a787121617df60bcc /src/vnet/lisp-cp/control.c
parent78d91cf9a514cb25f6ea9c901bb7d6c398f5cdc7 (diff)
lisp-cp: start lisp retry service on demand
Change-Id: I07681d94301e19389dda0caacd5a93b21d9aff1f Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/lisp-cp/control.c')
-rw-r--r--src/vnet/lisp-cp/control.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/vnet/lisp-cp/control.c b/src/vnet/lisp-cp/control.c
index f8e9c1d5b44..c54ec577fb4 100644
--- a/src/vnet/lisp-cp/control.c
+++ b/src/vnet/lisp-cp/control.c
@@ -2297,6 +2297,9 @@ vnet_lisp_enable_disable (u8 is_enable)
}
}
+ if (is_enable)
+ vnet_lisp_create_retry_process (lcm);
+
/* update global flag */
lcm->is_enabled = is_enable;
@@ -4903,14 +4906,17 @@ vnet_lisp_stats_enable_disable_state (void)
return lcm->flags & LISP_FLAG_STATS_ENABLED;
}
-/* *INDENT-OFF* */
-VLIB_REGISTER_NODE (lisp_retry_service_node,static) = {
- .function = send_map_resolver_service,
- .type = VLIB_NODE_TYPE_PROCESS,
- .name = "lisp-retry-service",
- .process_log2_n_stack_bytes = 16,
-};
-/* *INDENT-ON* */
+void
+vnet_lisp_create_retry_process (lisp_cp_main_t * lcm)
+{
+ if (lcm->retry_service_index)
+ return;
+
+ lcm->retry_service_index = vlib_process_create (vlib_get_main (),
+ "lisp-retry-service",
+ send_map_resolver_service,
+ 16 /* stack_bytes */ );
+}
u32
vnet_lisp_set_transport_protocol (u8 protocol)