From 6d403a013276f095e542c9b6281db96354fa6f07 Mon Sep 17 00:00:00 2001 From: Vengada Govindan Date: Wed, 12 Oct 2016 05:54:09 -0700 Subject: VPP-470: Introduce VxLAN-GPE as transport for iOAM. See Jira ticket for more details - New plugins created to (a) Add VxLAN-GPE as transport (b) Provide export infra for VxLAN-GPE. Change-Id: Ife50c7434f53d17a4783062310f73d063d53494c Signed-off-by: Vengada Govindan --- plugins/ioam-plugin/ioam/lib-trace/trace_util.c | 35 +++++-------------------- 1 file changed, 7 insertions(+), 28 deletions(-) (limited to 'plugins/ioam-plugin/ioam/lib-trace/trace_util.c') diff --git a/plugins/ioam-plugin/ioam/lib-trace/trace_util.c b/plugins/ioam-plugin/ioam/lib-trace/trace_util.c index adc02b20f56..5c7f1eefd9c 100644 --- a/plugins/ioam-plugin/ioam/lib-trace/trace_util.c +++ b/plugins/ioam-plugin/ioam/lib-trace/trace_util.c @@ -21,22 +21,13 @@ trace_main_t trace_main; -extern ip6_hop_by_hop_ioam_main_t ip6_hop_by_hop_ioam_main; - static int trace_profile_cleanup (trace_profile * profile) { - int rv; - ip6_hop_by_hop_ioam_main_t *hm = &ip6_hop_by_hop_ioam_main; memset (profile, 0, sizeof (trace_profile)); profile->trace_tsp = TSP_MICROSECONDS; /* Micro seconds */ - hm->options_size[HBH_OPTION_TYPE_IOAM_TRACE_DATA_LIST] = 0; - if (0 != - (rv = - ip6_ioam_set_rewrite (&hm->rewrite, hm->has_trace_option, - hm->has_pot_option, hm->has_seqno_option))) - return (-1); + ip6_trace_profile_cleanup (); /* lib-trace_TODO: Remove this once IOAM-IPv6 transport is a plugin */ return 0; } @@ -65,10 +56,11 @@ int trace_profile_create (trace_profile * profile, u8 trace_type, u8 num_elts, u32 trace_tsp, u32 node_id, u32 app_data) { - u32 trace_size = 0; - int rv; - ip6_hop_by_hop_ioam_main_t *hm = &ip6_hop_by_hop_ioam_main; + if (!trace_type || !num_elts || !(node_id)) + { + return (-1); + } if (profile && !profile->valid) { //rv = trace_profile_cleanup (profile); @@ -79,21 +71,8 @@ trace_profile_create (trace_profile * profile, u8 trace_type, u8 num_elts, profile->app_data = app_data; profile->valid = 1; - if (ioam_trace_get_sizeof_handler (&trace_size) < 0) - return (-1); - - hm->options_size[HBH_OPTION_TYPE_IOAM_TRACE_DATA_LIST] = trace_size; - - if (hm->has_trace_option) - { - if (0 != - (rv = - ip6_ioam_set_rewrite (&hm->rewrite, hm->has_trace_option, - hm->has_pot_option, - hm->has_seqno_option))) - return (-1); - - } + /* lib-trace_TODO: Remove this once IOAM-IPv6 transport is a plugin */ + ip6_trace_profile_setup (); return (0); } -- cgit 1.2.3-korg