From 1b563527c143903b6e7e79b5978af5310372f605 Mon Sep 17 00:00:00 2001 From: AkshayaNadahalli Date: Mon, 23 Jan 2017 22:05:35 +0530 Subject: In-band OAM active probe (VPP-471) Change-Id: Icf0ddf76ba1c8b588c79387284cd0349ebc6e45f Signed-off-by: AkshayaNadahalli --- src/plugins/ioam/analyse/ioam_summary_export.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/plugins/ioam/analyse/ioam_summary_export.c') diff --git a/src/plugins/ioam/analyse/ioam_summary_export.c b/src/plugins/ioam/analyse/ioam_summary_export.c index afda3099..17fcf7a5 100644 --- a/src/plugins/ioam/analyse/ioam_summary_export.c +++ b/src/plugins/ioam/analyse/ioam_summary_export.c @@ -114,7 +114,10 @@ ioam_template_rewrite (flow_report_main_t * frm, flow_report_t * fr, /* Add ioamPathMap manually */ f->e_id_length = ipfix_e_id_length (0 /* enterprise */ , - ioamPathMap, (1 * sizeof (ioam_path))); + ioamPathMap, + (sizeof (ioam_path) + + (sizeof (ioam_path_map_t) * + IOAM_TRACE_MAX_NODES))); f++; /* Back to the template packet... */ @@ -229,8 +232,9 @@ ioam_analyse_add_ipfix_record (flow_report_t * fr, path->pkt_counter = trace->pkt_counter - trace_cached->pkt_counter; path->pkt_counter = clib_host_to_net_u32 (path->pkt_counter); + offset += sizeof (ioam_path); - for (j = 0; j < IOAM_TRACE_MAX_NODES; j++) + for (j = 0; j < trace->num_nodes; j++) { path->path[j].node_id = clib_host_to_net_u32 (trace->path[j].node_id); @@ -238,9 +242,11 @@ ioam_analyse_add_ipfix_record (flow_report_t * fr, clib_host_to_net_u16 (trace->path[j].ingress_if); path->path[j].egress_if = clib_host_to_net_u16 (trace->path[j].egress_if); + path->path[j].state_up = trace->path[j].state_up; } - offset += sizeof (ioam_path); + //offset += (sizeof(ioam_path_map_t) * trace->num_nodes); + offset += (sizeof (ioam_path_map_t) * IOAM_TRACE_MAX_NODES); //FIXME } } @@ -312,6 +318,7 @@ ioam_send_flows (flow_report_main_t * frm, flow_report_t * fr, tp = vlib_buffer_get_current (b0); ip = &tp->ip4; + udp = &tp->udp; h = &tp->ipfix.h; s = &tp->ipfix.s; -- cgit 1.2.3-korg