diff options
author | Dave Barach <dave@barachs.net> | 2017-10-18 18:48:11 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-10-19 04:35:54 +0000 |
commit | 7bee773e71b81a1e13a656030b0f7edae99c5e92 (patch) | |
tree | 86f615367c1b3bf29ecd2957c7dbea2d9e6ed0a6 /src/vnet/interface.c | |
parent | 9c4b5b28b1c1df0c100b377a2f5bfc07bd9a0b2e (diff) |
VPP-1024: rewrite buffer trajectory tracer
Use a proper u16 * vector to capture node indices, since vpp w/
plugins now exceeds 255 graph nodes
Change-Id: Ic48cad676fa3a6116413ddf08c083dd9660783f1
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/interface.c')
-rw-r--r-- | src/vnet/interface.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/vnet/interface.c b/src/vnet/interface.c index 159ce8c6494..eb5d3d0fced 100644 --- a/src/vnet/interface.c +++ b/src/vnet/interface.c @@ -1170,6 +1170,7 @@ vnet_interface_init (vlib_main_t * vm) vnet_interface_main_t *im = &vnm->interface_main; vlib_buffer_t *b = 0; vnet_buffer_opaque_t *o = 0; + clib_error_t *error; /* * Keep people from shooting themselves in the foot. @@ -1250,15 +1251,17 @@ vnet_interface_init (vlib_main_t * vm) } } - { - clib_error_t *error; + if ((error = vlib_call_init_function (vm, vnet_interface_cli_init))) + return error; - if ((error = vlib_call_init_function (vm, vnet_interface_cli_init))) - return error; + vnm->interface_tag_by_sw_if_index = hash_create (0, sizeof (uword)); +#if VLIB_BUFFER_TRACE_TRAJECTORY > 0 + if ((error = vlib_call_init_function (vm, trajectory_trace_init))) return error; - } - vnm->interface_tag_by_sw_if_index = hash_create (0, sizeof (uword)); +#endif + + return 0; } VLIB_INIT_FUNCTION (vnet_interface_init); |