diff options
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/lisp-cp/control.c | 22 | ||||
-rw-r--r-- | src/vnet/lisp-cp/control.h | 4 |
2 files changed, 18 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) diff --git a/src/vnet/lisp-cp/control.h b/src/vnet/lisp-cp/control.h index d8318b5530c..d3d320abb3e 100644 --- a/src/vnet/lisp-cp/control.h +++ b/src/vnet/lisp-cp/control.h @@ -281,6 +281,9 @@ typedef struct /** either UDP based or binary API. Default is UDP */ lisp_transport_protocol_t transport_protocol; + /** Retry service node index */ + u32 retry_service_index; + /* commodity */ ip4_main_t *im4; ip6_main_t *im6; @@ -378,6 +381,7 @@ int vnet_lisp_add_del_map_server (ip_address_t * addr, u8 is_add); clib_error_t *vnet_lisp_enable_disable (u8 is_enabled); u8 vnet_lisp_enable_disable_status (void); +void vnet_lisp_create_retry_process (lisp_cp_main_t * lcm); int vnet_lisp_pitr_set_locator_set (u8 * locator_set_name, u8 is_add); int vnet_lisp_use_petr (ip_address_t * ip, u8 is_add); |