diff options
author | 2016-12-23 17:46:08 +0530 | |
---|---|---|
committer | 2016-12-24 14:11:36 +0000 | |
commit | e4e9fbbb7c8fa4385ae31072d60ad8621fe798a4 (patch) | |
tree | 5e94ac41ad1ea327da09907bfc7aeff7dabd7373 /plugins/ioam-plugin | |
parent | fe7cdfa629ae5b79bb5ce3c43911a370153d872e (diff) |
Merging all ioam plugin libraries to single library
Change-Id: I33a646ba45848c7400df4271e4933e28e62c9ad7
Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
Diffstat (limited to 'plugins/ioam-plugin')
-rw-r--r-- | plugins/ioam-plugin/Makefile.am | 189 | ||||
-rw-r--r-- | plugins/ioam-plugin/ioam/encap/ip6_ioam_e2e.c | 22 | ||||
-rw-r--r-- | plugins/ioam-plugin/ioam/encap/ip6_ioam_trace.c | 13 | ||||
-rw-r--r-- | plugins/ioam-plugin/ioam/export-common/ioam_export.h | 3 | ||||
-rw-r--r-- | plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c | 2 | ||||
-rw-r--r-- | plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_node.c | 4 | ||||
-rw-r--r-- | plugins/ioam-plugin/ioam/export/ioam_export.c | 23 | ||||
-rw-r--r-- | plugins/ioam-plugin/ioam/lib-pot/pot_api.c | 24 | ||||
-rw-r--r-- | plugins/ioam-plugin/ioam/lib-trace/trace_api.c | 23 | ||||
-rw-r--r-- | plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_api.c | 27 |
10 files changed, 142 insertions, 188 deletions
diff --git a/plugins/ioam-plugin/Makefile.am b/plugins/ioam-plugin/Makefile.am index 9a87767518e..ac2421d9305 100644 --- a/plugins/ioam-plugin/Makefile.am +++ b/plugins/ioam-plugin/Makefile.am @@ -17,20 +17,8 @@ AM_CFLAGS = -Wall AM_LDFLAGS = -module -shared -avoid-version ######################################## -# iOAM Proof of Transit +# iOAM APIs ######################################## - -ioam_pot_plugin_la_SOURCES = \ - ioam/lib-pot/pot_util.c \ - ioam/encap/ip6_ioam_pot.c \ - ioam/lib-pot/pot_util.h \ - ioam/lib-pot/math64.h \ - ioam/lib-pot/pot_api.c - -BUILT_SOURCES = \ - ioam/lib-pot/pot.api.h \ - ioam/lib-pot/pot.api.json - SUFFIXES = .api.h .api %.api.h: %.api @@ -39,129 +27,135 @@ SUFFIXES = .api.h .api | vppapigen --input - --output $@ --show-name $@ %.api.json: %.api - @echo " JSON APIGEN " $@ ; \ + @echo " JSON APIGEN " $@ ; \ mkdir -p `dirname $@` ; \ - $(CC) $(CPPFLAGS) -E -P -C -x c $^ \ + $(CC) $(CPPFLAGS) -E -P -C -x c $^ \ | vppapigen --input - --json $@ apidir = $(prefix)/ioam/ -api_DATA = \ - ioam/lib-pot/pot.api.json \ +api_DATA = \ + ioam/lib-pot/pot.api.json \ ioam/lib-trace/trace.api.json \ ioam/export/ioam_export.api.json -noinst_HEADERS = \ - ioam/lib-pot/pot_all_api_h.h \ - ioam/lib-pot/pot_msg_enum.h \ - ioam/lib-pot/pot.api.h \ - ioam/lib-pot/pot_util.h \ - ioam/lib-pot/math64.h +######################################## +# iOAM Proof of Transit +######################################## + +IOAM_POT_SRC = \ + ioam/lib-pot/pot_util.c \ + ioam/encap/ip6_ioam_pot.c \ + ioam/lib-pot/pot_util.h \ + ioam/lib-pot/math64.h \ + ioam/lib-pot/pot_api.c + +IOAM_POT_BUILT_SRC = \ + ioam/lib-pot/pot.api.h \ + ioam/lib-pot/pot.api.json + +IOAM_POT_NOINST_HDR = \ + ioam/lib-pot/pot_all_api_h.h \ + ioam/lib-pot/pot_msg_enum.h \ + ioam/lib-pot/pot.api.h \ + ioam/lib-pot/pot_util.h \ + ioam/lib-pot/math64.h -ioam_pot_test_plugin_la_SOURCES = \ +ioam_pot_test_plugin_la_SOURCES = \ ioam/lib-pot/pot_test.c \ ioam/lib-pot/pot_plugin.api.h -vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins -vpppluginsdir = ${libdir}/vpp_plugins - vppapitestplugins_LTLIBRARIES = ioam_pot_test_plugin.la -vppplugins_LTLIBRARIES = ioam_pot_plugin.la ######################################## # iOAM trace export for IPv6 ######################################## -ioam_export_plugin_la_SOURCES = \ -ioam/export/ioam_export.c \ -ioam/export/node.c \ -ioam/export/ioam_export.api.h \ -ioam/export/ioam_export_thread.c +IOAM_EXPORT_SRC = \ + ioam/export/ioam_export.c \ + ioam/export/node.c \ + ioam/export/ioam_export.api.h \ + ioam/export/ioam_export_thread.c -BUILT_SOURCES += \ +IOAM_EXPORT_BUILT_SRC = \ ioam/export/ioam_export.api.h \ ioam/export/ioam_export.api.json -noinst_HEADERS += \ - ioam/export/ioam_export_all_api_h.h \ - ioam/export/ioam_export_msg_enum.h \ - ioam/export/ioam_export.api.h +IOAM_EXPORT_NOINST_HDR = \ + ioam/export/ioam_export_all_api_h.h \ + ioam/export/ioam_export_msg_enum.h \ + ioam/export/ioam_export.api.h -ioam_export_test_plugin_la_SOURCES = \ - ioam/export/ioam_export_test.c \ - ioam/export/ioam_export_plugin.api.h +ioam_export_test_plugin_la_SOURCES = \ + ioam/export/ioam_export_test.c \ + ioam/export/ioam_export_plugin.api.h vppapitestplugins_LTLIBRARIES += ioam_export_test_plugin.la -vppplugins_LTLIBRARIES += ioam_export_plugin.la ######################################## # iOAM Trace ######################################## -libioam_trace_plugin_la_SOURCES = \ +IOAM_TRACE_SRC = \ ioam/lib-trace/trace_util.c \ ioam/encap/ip6_ioam_trace.c \ ioam/lib-trace/trace_util.h \ ioam/lib-trace/trace_api.c -BUILT_SOURCES += \ +IOAM_TRACE_BUILT_SRC = \ ioam/lib-trace/trace.api.h \ ioam/lib-trace/trace.api.json -noinst_HEADERS += \ +IOAM_TRACE_NOINST_HDR = \ ioam/export/ioam_export_all_api_h.h \ - ioam/lib-trace/trace_all_api_h.h \ - ioam/lib-trace/trace_msg_enum.h \ - ioam/lib-trace/trace.api.h \ + ioam/lib-trace/trace_all_api_h.h \ + ioam/lib-trace/trace_msg_enum.h \ + ioam/lib-trace/trace.api.h \ ioam/lib-trace/trace_util.h ioam_trace_test_plugin_la_SOURCES = \ - ioam/lib-trace/trace_test.c \ + ioam/lib-trace/trace_test.c \ ioam/lib-trace/trace_plugin.api.h vppapitestplugins_LTLIBRARIES += ioam_trace_test_plugin.la -vppplugins_LTLIBRARIES += libioam_trace_plugin.la ######################################## # VxLAN-GPE ######################################## -libioam_vxlan_gpe_plugin_la_SOURCES = \ - ioam/lib-vxlan-gpe/ioam_encap.c \ - ioam/lib-vxlan-gpe/ioam_decap.c \ - ioam/lib-vxlan-gpe/ioam_transit.c \ - ioam/lib-vxlan-gpe/ioam_pop.c \ - ioam/lib-vxlan-gpe/vxlan_gpe_api.c \ - ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c \ - ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c \ - ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c \ - ioam/export-vxlan-gpe/vxlan_gpe_node.c \ - ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h\ +IOAM_VXLAN_GPE_SRC = \ + ioam/lib-vxlan-gpe/ioam_encap.c \ + ioam/lib-vxlan-gpe/ioam_decap.c \ + ioam/lib-vxlan-gpe/ioam_transit.c \ + ioam/lib-vxlan-gpe/ioam_pop.c \ + ioam/lib-vxlan-gpe/vxlan_gpe_api.c \ + ioam/lib-vxlan-gpe/vxlan_gpe_ioam_trace.c \ + ioam/lib-vxlan-gpe/vxlan_gpe_ioam.c \ + ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c \ + ioam/export-vxlan-gpe/vxlan_gpe_node.c \ + ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h \ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_thread.c -BUILT_SOURCES += \ - ioam/lib-vxlan-gpe/vxlan_gpe.api.h \ - ioam/lib-vxlan-gpe/vxlan_gpe.api.json \ +IOAM_VXLAN_GPE_BUILT_SRC = \ + ioam/lib-vxlan-gpe/vxlan_gpe.api.h \ + ioam/lib-vxlan-gpe/vxlan_gpe.api.json \ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h \ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.json -noinst_HEADERS += \ - ioam/export/ioam_export_all_api_h.h \ - ioam/lib-vxlan-gpe/vxlan_gpe_all_api_h.h \ - ioam/lib-vxlan-gpe/vxlan_gpe_msg_enum.h \ - ioam/lib-vxlan-gpe/vxlan_gpe.api.h \ - ioam/lib-vxlan-gpe/vxlan_gpe_ioam_util.h \ - ioam/lib-vxlan-gpe/vxlan_gpe_ioam_packet.h \ - ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h \ - ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_all_api_h.h \ - ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_msg_enum.h \ +IOAM_VXLAN_GPE_NOINST_HDR = \ + ioam/export/ioam_export_all_api_h.h \ + ioam/lib-vxlan-gpe/vxlan_gpe_all_api_h.h \ + ioam/lib-vxlan-gpe/vxlan_gpe_msg_enum.h \ + ioam/lib-vxlan-gpe/vxlan_gpe.api.h \ + ioam/lib-vxlan-gpe/vxlan_gpe_ioam_util.h \ + ioam/lib-vxlan-gpe/vxlan_gpe_ioam_packet.h \ + ioam/lib-vxlan-gpe/vxlan_gpe_ioam.h \ + ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_all_api_h.h \ + ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_msg_enum.h \ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.api.h -ioam_vxlan_gpe_test_plugin_la_SOURCES = \ +ioam_vxlan_gpe_test_plugin_la_SOURCES = \ ioam/lib-vxlan-gpe/vxlan_gpe_test.c \ ioam/lib-vxlan-gpe/vxlan_gpe_plugin.api.h -libioam_vxlan_gpe_plugin_la_LIBADD = libioam_trace_plugin.la - vppapitestplugins_LTLIBRARIES += ioam_vxlan_gpe_test_plugin.la -vppplugins_LTLIBRARIES += libioam_vxlan_gpe_plugin.la vxlan_gpe_ioam_export_test_plugin_la_SOURCES = \ ioam/export-vxlan-gpe/vxlan_gpe_ioam_export_test.c \ @@ -170,26 +164,53 @@ vxlan_gpe_ioam_export_test_plugin_la_SOURCES = \ vppapitestplugins_LTLIBRARIES += vxlan_gpe_ioam_export_test_plugin.la ######################################## -# iOAM E2E plugin +# iOAM E2E ######################################## -ioam_e2e_plugin_la_SOURCES = \ +IOAM_E2E_SRC = \ ioam/encap/ip6_ioam_e2e.c \ ioam/encap/ip6_ioam_seqno.c \ ioam/encap/ip6_ioam_seqno_analyse.c -noinst_HEADERS += \ - ioam/encap/ip6_ioam_e2e.h \ +IOAM_E2E_BUILT_SRC = \ + ioam/encap/ip6_ioam_e2e.h \ ioam/encap/ip6_ioam_seqno.h -vppplugins_LTLIBRARIES += ioam_e2e_plugin.la +######################################## +# iOAM plugins +######################################## + +vppapitestpluginsdir = ${libdir}/vpp_api_test_plugins +vpppluginsdir = ${libdir}/vpp_plugins + +ioam_plugin_la_SOURCES = \ + $(IOAM_POT_SRC) \ + $(IOAM_EXPORT_SRC) \ + $(IOAM_TRACE_SRC) \ + $(IOAM_VXLAN_GPE_SRC) \ + $(IOAM_E2E_SRC) + +BUILT_SOURCES = \ + $(IOAM_POT_BUILT_SRC) \ + $(IOAM_EXPORT_BUILT_SRC) \ + $(IOAM_TRACE_BUILT_SRC) \ + $(IOAM_VXLAN_GPE_BUILT_SRC) \ + $(IOAM_E2E_BUILT_SRC) + +noinst_HEADERS = \ + $(IOAM_POT_NOINST_HDR) \ + $(IOAM_EXPORT_NOINST_HDR) \ + $(IOAM_TRACE_NOINST_HDR) \ + $(IOAM_VXLAN_GPE_NOINST_HDR) \ + $(IOAM_E2E_NOINST_HDR) + +vppplugins_LTLIBRARIES = ioam_plugin.la # Remove *.la files install-data-hook: @(cd $(vpppluginsdir) && $(RM) $(vppplugins_LTLIBRARIES)) @(cd $(vppapitestpluginsdir) && $(RM) $(vppapitestplugins_LTLIBRARIES)) - # # Java code generation # diff --git a/plugins/ioam-plugin/ioam/encap/ip6_ioam_e2e.c b/plugins/ioam-plugin/ioam/encap/ip6_ioam_e2e.c index 0839cdceca7..2831a351d4f 100644 --- a/plugins/ioam-plugin/ioam/encap/ip6_ioam_e2e.c +++ b/plugins/ioam-plugin/ioam/encap/ip6_ioam_e2e.c @@ -25,8 +25,6 @@ #include <vppinfra/elog.h> #include <vnet/ip/ip6_hop_by_hop.h> -#include <vnet/plugin/plugin.h> - #include "ip6_ioam_e2e.h" ioam_e2e_main_t ioam_e2e_main; @@ -167,23 +165,6 @@ VLIB_CLI_COMMAND (ioam_show_e2e_cmd, static) = { }; /* - * 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) -{ - clib_error_t * error = 0; - - ioam_e2e_main.vlib_main = vm; - ioam_e2e_main.vnet_main = h->vnet_main; - return error; -} - -/* * Init handler E2E headet handling. * Init hanlder registers encap, decap, trace and Rewrite handlers. */ @@ -222,6 +203,9 @@ ioam_e2e_init (vlib_main_t * vm) "HBH_OPTION_TYPE_IOAM_EDGE_TO_EDGE Flow handler failed")); } + ioam_e2e_main.vlib_main = vm; + ioam_e2e_main.vnet_main = vnet_get_main(); + return (0); } diff --git a/plugins/ioam-plugin/ioam/encap/ip6_ioam_trace.c b/plugins/ioam-plugin/ioam/encap/ip6_ioam_trace.c index e63db6e4ec5..3a6758cd859 100644 --- a/plugins/ioam-plugin/ioam/encap/ip6_ioam_trace.c +++ b/plugins/ioam-plugin/ioam/encap/ip6_ioam_trace.c @@ -24,6 +24,7 @@ #include <vppinfra/hash.h> #include <vppinfra/error.h> #include <vppinfra/elog.h> +#include <vnet/plugin/plugin.h> #include <ioam/lib-trace/trace_util.h> @@ -348,6 +349,18 @@ VLIB_CLI_COMMAND (ip6_show_ioam_trace_cmd, static) = { }; /* *INDENT-ON* */ +/* + * 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) +{ + return 0; +} static clib_error_t * ip6_hop_by_hop_ioam_trace_init (vlib_main_t * vm) diff --git a/plugins/ioam-plugin/ioam/export-common/ioam_export.h b/plugins/ioam-plugin/ioam/export-common/ioam_export.h index a9ec8d00677..e6ab0344958 100644 --- a/plugins/ioam-plugin/ioam/export-common/ioam_export.h +++ b/plugins/ioam-plugin/ioam/export-common/ioam_export.h @@ -76,7 +76,8 @@ typedef struct ioam_export_main_t ioam_export_main; ioam_export_main_t vxlan_gpe_ioam_export_main; -vlib_node_registration_t export_node; +extern vlib_node_registration_t export_node; +extern vlib_node_registration_t vxlan_export_node; #define DEFAULT_EXPORT_SIZE (3 * CLIB_CACHE_LINE_BYTES) /* diff --git a/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c b/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c index bab8d977062..0924d68f6ff 100644 --- a/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c +++ b/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_ioam_export.c @@ -92,7 +92,7 @@ vxlan_gpe_ioam_export_enable_disable (ioam_export_main_t * em, ip4_address_t * src_address) { vlib_main_t *vm = em->vlib_main; - u32 node_index = export_node.index; + u32 node_index = vxlan_export_node.index; vlib_node_t *vxlan_gpe_decap_ioam_node = NULL; if (is_disable == 0) diff --git a/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_node.c b/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_node.c index 722c2b061c0..f75b7081c09 100644 --- a/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_node.c +++ b/plugins/ioam-plugin/ioam/export-vxlan-gpe/vxlan_gpe_node.c @@ -40,7 +40,7 @@ format_export_trace (u8 * s, va_list * args) return s; } -vlib_node_registration_t export_node; +vlib_node_registration_t vxlan_export_node; #define foreach_export_error \ _(RECORDED, "Packets recorded for export") @@ -137,7 +137,7 @@ vxlan_gpe_export_node_fn (vlib_main_t * vm, * Node for VXLAN-GPE export */ /* *INDENT-OFF* */ -VLIB_REGISTER_NODE (export_node) = +VLIB_REGISTER_NODE (vxlan_export_node) = { .function = vxlan_gpe_export_node_fn, .name = "vxlan-gpe-ioam-export", diff --git a/plugins/ioam-plugin/ioam/export/ioam_export.c b/plugins/ioam-plugin/ioam/export/ioam_export.c index b122e445b28..06634baaf4b 100644 --- a/plugins/ioam-plugin/ioam/export/ioam_export.c +++ b/plugins/ioam-plugin/ioam/export/ioam_export.c @@ -81,26 +81,6 @@ do { \ #define foreach_ioam_export_plugin_api_msg \ _(IOAM_EXPORT_IP6_ENABLE_DISABLE, ioam_export_ip6_enable_disable) -/* - * 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) -{ - ioam_export_main_t *em = &ioam_export_main; - clib_error_t *error = 0; - - em->vlib_main = vm; - em->vnet_main = h->vnet_main; - - return error; -} - /* Action function shared between message handler and debug CLI */ int @@ -250,6 +230,9 @@ ioam_export_init (vlib_main_t * vm) u32 node_index = export_node.index; vlib_node_t *ip6_hbyh_node = NULL; + em->vlib_main = vm; + em->vnet_main = vnet_get_main (); + name = format (0, "ioam_export_%08x%c", api_version, 0); /* Ask for a correctly-sized block of API message decode slots */ diff --git a/plugins/ioam-plugin/ioam/lib-pot/pot_api.c b/plugins/ioam-plugin/ioam/lib-pot/pot_api.c index d3af7b4036a..04c2aaa59a3 100644 --- a/plugins/ioam-plugin/ioam/lib-pot/pot_api.c +++ b/plugins/ioam-plugin/ioam/lib-pot/pot_api.c @@ -213,26 +213,6 @@ static void vl_api_pot_profile_del_t_handler REPLY_MACRO(VL_API_POT_PROFILE_DEL_REPLY); } - -/* - * 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) -{ - pot_main_t * sm = &pot_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 * pot_plugin_api_hookup (vlib_main_t *vm) @@ -273,6 +253,10 @@ static clib_error_t * pot_init (vlib_main_t * vm) bzero(sm, sizeof(pot_main)); (void)pot_util_init(); + + sm->vlib_main = vm; + sm->vnet_main = vnet_get_main(); + name = format (0, "ioam_pot_%08x%c", api_version, 0); /* Ask for a correctly-sized block of API message decode slots */ diff --git a/plugins/ioam-plugin/ioam/lib-trace/trace_api.c b/plugins/ioam-plugin/ioam/lib-trace/trace_api.c index 7e0d708e155..2ada5b7e5af 100644 --- a/plugins/ioam-plugin/ioam/lib-trace/trace_api.c +++ b/plugins/ioam-plugin/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 */ diff --git a/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_api.c b/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_api.c index 68752365f82..247bcf590f3 100644 --- a/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_api.c +++ b/plugins/ioam-plugin/ioam/lib-vxlan-gpe/vxlan_gpe_api.c @@ -284,28 +284,6 @@ static void vl_api_vxlan_gpe_ioam_transit_disable_t_handler VXLAN_GPE_REPLY_MACRO (VL_API_VXLAN_GPE_IOAM_TRANSIT_DISABLE_REPLY); } - -/* - * 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) -{ - vxlan_gpe_ioam_main_t *sm = &vxlan_gpe_ioam_main; - clib_error_t *error = 0; - - sm->vlib_main = vm; - sm->vnet_main = h->vnet_main; - sm->unix_time_0 = (u32) time (0); /* Store starting time */ - sm->vlib_time_0 = vlib_time_now (vm); - return error; -} - /* Set up the API message handling tables */ static clib_error_t * vxlan_gpe_plugin_api_hookup (vlib_main_t * vm) @@ -337,6 +315,11 @@ vxlan_gpe_init (vlib_main_t * vm) vlib_node_t *vxlan_gpe_decap_node = NULL; uword next_node = 0; + sm->vlib_main = vm; + sm->vnet_main = vnet_get_main (); + sm->unix_time_0 = (u32) time (0); /* Store starting time */ + sm->vlib_time_0 = vlib_time_now (vm); + name = format (0, "ioam_vxlan_gpe_%08x%c", api_version, 0); /* Ask for a correctly-sized block of API message decode slots */ |