diff options
author | Vengada Govindan <venggovi@cisco.com> | 2016-10-12 05:54:09 -0700 |
---|---|---|
committer | Vengada Govindan <venggovi@cisco.com> | 2016-12-09 06:15:02 +0000 |
commit | 6d403a013276f095e542c9b6281db96354fa6f07 (patch) | |
tree | 3954b21a8fe2bb789d42f6f6234344d39c4e1e4d /plugins/ioam-plugin/ioam/lib-trace/trace_util.c | |
parent | c9b20bc7a5399fd1e7bf2d33e7c4f1f08ef1c1e4 (diff) |
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 <venggovi@cisco.com>
Diffstat (limited to 'plugins/ioam-plugin/ioam/lib-trace/trace_util.c')
-rw-r--r-- | plugins/ioam-plugin/ioam/lib-trace/trace_util.c | 35 |
1 files changed, 7 insertions, 28 deletions
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); } |