aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/hdlc
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/hdlc')
-rw-r--r--src/vnet/hdlc/node.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/vnet/hdlc/node.c b/src/vnet/hdlc/node.c
index 4fe0296aca1..57e04c85bae 100644
--- a/src/vnet/hdlc/node.c
+++ b/src/vnet/hdlc/node.c
@@ -285,18 +285,9 @@ VLIB_REGISTER_NODE (hdlc_input_node) = {
.unformat_buffer = unformat_hdlc_header,
};
-static clib_error_t * hdlc_input_init (vlib_main_t * vm)
+static clib_error_t * hdlc_input_runtime_init (vlib_main_t * vm)
{
hdlc_input_runtime_t * rt;
-
- {
- clib_error_t * error = vlib_call_init_function (vm, hdlc_init);
- if (error)
- clib_error_report (error);
- }
-
- hdlc_setup_node (vm, hdlc_input_node.index);
-
rt = vlib_node_get_runtime_data (vm, hdlc_input_node.index);
rt->next_by_protocol = sparse_vec_new
@@ -313,7 +304,23 @@ static clib_error_t * hdlc_input_init (vlib_main_t * vm)
return 0;
}
+static clib_error_t * hdlc_input_init (vlib_main_t * vm)
+{
+
+ {
+ clib_error_t * error = vlib_call_init_function (vm, hdlc_init);
+ if (error)
+ clib_error_report (error);
+ }
+
+ hdlc_setup_node (vm, hdlc_input_node.index);
+ hdlc_input_runtime_init (vm);
+
+ return 0;
+}
+
VLIB_INIT_FUNCTION (hdlc_input_init);
+VLIB_WORKER_INIT_FUNCTION (hdlc_input_runtime_init);
void
hdlc_register_input_protocol (vlib_main_t * vm,