From 30082b9a4180dce68da04f67fb5bbb34fa2ba842 Mon Sep 17 00:00:00 2001 From: Mauro Sardara Date: Fri, 20 Jan 2023 09:48:58 +0000 Subject: feat(vpp): improve tracing Signed-off-by: Mauro Sardara Change-Id: Ic20b5cc7f34b35c86b6c100f9a7c868b119bd129 --- hicn-plugin/src/data_fwd.h | 1 + hicn-plugin/src/data_fwd_node.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'hicn-plugin') diff --git a/hicn-plugin/src/data_fwd.h b/hicn-plugin/src/data_fwd.h index 129ca5b73..4acfdea4d 100644 --- a/hicn-plugin/src/data_fwd.h +++ b/hicn-plugin/src/data_fwd.h @@ -50,6 +50,7 @@ typedef struct u32 sw_if_index; u8 pkt_type; u8 packet_data[64]; + u32 face; } hicn_data_fwd_trace_t; typedef enum diff --git a/hicn-plugin/src/data_fwd_node.c b/hicn-plugin/src/data_fwd_node.c index 981dc2c5e..dc1510fae 100644 --- a/hicn-plugin/src/data_fwd_node.c +++ b/hicn-plugin/src/data_fwd_node.c @@ -162,6 +162,7 @@ hicn_satisfy_faces (vlib_main_t *vm, u32 bi0, hicn_pcs_entry_t *pitp, { hicn_data_fwd_trace_t *t = vlib_add_trace (vm, node, h0, sizeof (*t)); + t->face = face0; t->pkt_type = HICN_PACKET_TYPE_DATA; t->sw_if_index = vnet_buffer (h0)->sw_if_index[VLIB_RX]; t->next_index = next0; @@ -173,6 +174,7 @@ hicn_satisfy_faces (vlib_main_t *vm, u32 bi0, hicn_pcs_entry_t *pitp, { hicn_data_fwd_trace_t *t = vlib_add_trace (vm, node, h1, sizeof (*t)); + t->face = face1; t->pkt_type = HICN_PACKET_TYPE_DATA; t->sw_if_index = vnet_buffer (h1)->sw_if_index[VLIB_RX]; t->next_index = next1; @@ -212,6 +214,7 @@ hicn_satisfy_faces (vlib_main_t *vm, u32 bi0, hicn_pcs_entry_t *pitp, { hicn_data_fwd_trace_t *t = vlib_add_trace (vm, node, h0, sizeof (*t)); + t->face = face0; t->pkt_type = HICN_PACKET_TYPE_DATA; t->sw_if_index = vnet_buffer (h0)->sw_if_index[VLIB_RX]; t->next_index = next0; @@ -284,8 +287,8 @@ hicn_data_fwd_format_trace (u8 *s, va_list *args) hicn_data_fwd_trace_t *t = va_arg (*args, hicn_data_fwd_trace_t *); u32 indent = format_get_indent (s); - s = format (s, "DATAFWD: pkt: %d, sw_if_index %d, next index %d\n", - (int) t->pkt_type, t->sw_if_index, t->next_index); + s = format (s, "DATAFWD: pkt: %d, sw_if_index %d, next index %d, face %d\n", + (int) t->pkt_type, t->sw_if_index, t->next_index, t->face); s = format (s, "%U%U", format_white_space, indent, format_ip6_header, t->packet_data, sizeof (t->packet_data)); -- cgit 1.2.3-korg