summaryrefslogtreecommitdiffstats
path: root/src/vnet/mpls
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-03-16 11:32:09 +0100
committerDave Barach <openvpp@barachs.net>2017-03-16 13:06:27 +0000
commite9f929b52ddb741ec1e4cb2d92c6be1e798933a0 (patch)
tree1843d4798292dbd17d27ad3fab3c833388eaaf62 /src/vnet/mpls
parent3cc4971882235a539bc6177e8e4b4d92129b3a12 (diff)
vlib: make runtime_data thread-local
Change-Id: I4aa3e7e42fb81211de1aed07dc7befee87a1e18b Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/mpls')
-rw-r--r--src/vnet/mpls/node.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vnet/mpls/node.c b/src/vnet/mpls/node.c
index 1810091252e..03bfaf56ce9 100644
--- a/src/vnet/mpls/node.c
+++ b/src/vnet/mpls/node.c
@@ -301,3 +301,16 @@ static clib_error_t * mpls_input_init (vlib_main_t * vm)
}
VLIB_INIT_FUNCTION (mpls_input_init);
+
+static clib_error_t * mpls_input_worker_init (vlib_main_t * vm)
+{
+ mpls_input_runtime_t * rt;
+ rt = vlib_node_get_runtime_data (vm, mpls_input_node.index);
+ rt->last_label = (u32) ~0;
+ rt->last_inner_fib_index = 0;
+ rt->last_outer_fib_index = 0;
+ rt->mpls_main = &mpls_main;
+ return 0;
+}
+
+VLIB_WORKER_INIT_FUNCTION (mpls_input_worker_init);