summaryrefslogtreecommitdiffstats
path: root/src/plugins/ioam/analyse/ioam_summary_export.c
diff options
context:
space:
mode:
authorAkshayaNadahalli <anadahal@cisco.com>2017-01-23 22:05:35 +0530
committerAkshayaNadahalli <anadahal@cisco.com>2017-03-07 14:08:22 +0000
commit1b563527c143903b6e7e79b5978af5310372f605 (patch)
tree7b673272cb930e03b77dd376f581d903c219a566 /src/plugins/ioam/analyse/ioam_summary_export.c
parent066f034b903bda6e938bec1b12f01edef65ee9c4 (diff)
In-band OAM active probe (VPP-471)
Change-Id: Icf0ddf76ba1c8b588c79387284cd0349ebc6e45f Signed-off-by: AkshayaNadahalli <anadahal@cisco.com>
Diffstat (limited to 'src/plugins/ioam/analyse/ioam_summary_export.c')
-rw-r--r--src/plugins/ioam/analyse/ioam_summary_export.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/ioam/analyse/ioam_summary_export.c b/src/plugins/ioam/analyse/ioam_summary_export.c
index afda3099c9a..17fcf7a5b7e 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;