aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNagaprabhanjan Bellari <nagp.lists@gmail.com>2016-03-18 19:10:21 +0530
committerGerrit Code Review <gerrit@fd.io>2016-03-19 12:46:08 +0000
commita0005dc34718d4c4a904aacadcba745ae3e0fb0e (patch)
tree1509d0bc46d94a525998b3deaae2acdb21836dc2
parentca46d8c501079414238d998a126cecbabaae138c (diff)
Add llc_init in osi_init to ensure init order dependency
Change-Id: I5cb2a319384e49a072d75f3ea05e6fb92e381c23 Signed-off-by: Nagaprabhanjan Bellari <nagp.lists@gmail.com>
-rw-r--r--vnet/vnet/osi/osi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vnet/vnet/osi/osi.c b/vnet/vnet/osi/osi.c
index 7313dab1..1825af1f 100644
--- a/vnet/vnet/osi/osi.c
+++ b/vnet/vnet/osi/osi.c
@@ -167,8 +167,15 @@ static void add_protocol (osi_main_t * pm,
static clib_error_t * osi_init (vlib_main_t * vm)
{
+ clib_error_t * error = 0;
osi_main_t * pm = &osi_main;
+ /* init order dependency: llc_init -> osi_init */
+ if ((error = vlib_call_init_function(vm, llc_init)))
+ {
+ return error;
+ }
+
memset (pm, 0, sizeof (pm[0]));
pm->vlib_main = vm;