summaryrefslogtreecommitdiffstats
path: root/src/plugins/ioam/lib-trace
diff options
context:
space:
mode:
authorAkshayaNadahalli <anadahal@cisco.com>2016-12-23 17:46:08 +0530
committerDamjan Marion <dmarion.lists@gmail.com>2017-01-04 17:52:59 +0000
commita90ba9d3d0daf583f225617e57252f172e99df21 (patch)
treea957442cc1ca31d7b7ad57df8d5c7d72d9dc71d3 /src/plugins/ioam/lib-trace
parent8db1c76e9ab7b0c5cd334673db3c98b8fe82a1c4 (diff)
Merging all ioam plugin libraries to single library
Double commit from 1702 branch to master. Change-Id: I33a646ba45848c7400df4271e4933e28e62c9ad7 Signed-off-by: AkshayaNadahalli <anadahal@cisco.com> (cherry picked from commit e4e9fbbb7c8fa4385ae31072d60ad8621fe798a4) Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
Diffstat (limited to 'src/plugins/ioam/lib-trace')
-rw-r--r--src/plugins/ioam/lib-trace/trace_api.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/plugins/ioam/lib-trace/trace_api.c b/src/plugins/ioam/lib-trace/trace_api.c
index 7e0d708e155..2ada5b7e5af 100644
--- a/src/plugins/ioam/lib-trace/trace_api.c
+++ b/src/plugins/ioam/lib-trace/trace_api.c
@@ -165,25 +165,6 @@ static void vl_api_trace_profile_show_config_t_handler
}
}
-/*
- * This routine exists to convince the vlib plugin framework that
- * we haven't accidentally copied a random .dll into the plugin directory.
- *
- * Also collects global variable pointers passed from the vpp engine
- */
-
-clib_error_t *
-vlib_plugin_register (vlib_main_t * vm, vnet_plugin_handoff_t * h,
- int from_early_init)
-{
- trace_main_t *sm = &trace_main;
- clib_error_t *error = 0;
-
- sm->vlib_main = vm;
- sm->vnet_main = h->vnet_main;
- return error;
-}
-
/* Set up the API message handling tables */
static clib_error_t *
trace_plugin_api_hookup (vlib_main_t * vm)
@@ -225,6 +206,10 @@ trace_init (vlib_main_t * vm)
bzero (sm, sizeof (trace_main));
(void) trace_util_init ();
+
+ sm->vlib_main = vm;
+ sm->vnet_main = vnet_get_main ();
+
name = format (0, "ioam_trace_%08x%c", api_version, 0);
/* Ask for a correctly-sized block of API message decode slots */
-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#!/usr/bin/env python

from framework import VppTestCase


class TestBuffers(VppTestCase):
    """ Buffer C Unit Tests """

    @classmethod
    def setUpClass(cls):
        super(TestBuffers, cls).setUpClass()

    @classmethod
    def tearDownClass(cls):
        super(TestBuffers, cls).tearDownClass()

    def setUp(self):
        super(TestBuffers, self).setUp()

    def tearDown(self):
        super(TestBuffers, self).tearDown()

    def test_linearize(self):
        """ Chained Buffer Linearization """
        error = self.vapi.cli("test chained-buffer-linearization")

        if error:
            self.logger.critical(error)
            self.assertNotIn('failed', error)