summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2016-09-27 17:44:02 -0400
committerDave Barach <openvpp@barachs.net>2016-09-28 16:13:24 +0000
commitac8146caf1f474f2c440f2316bbcc2d41245ff35 (patch)
treec16eaf7bf79948337a6996502770e34fd2ed92d0
parente162bc3884680b0b477b4b958eed246fcb938654 (diff)
Fix packet trace for IP4/IP6 lookup/forwarding nodes
Change-Id: Ibf3d2e69dbac28fbef77d8ba20d7f5a60eea0198 Signed-off-by: John Lo <loj@cisco.com>
-rw-r--r--vnet/vnet/ip/ip4_forward.c13
-rw-r--r--vnet/vnet/ip/ip6_forward.c6
2 files changed, 8 insertions, 11 deletions
diff --git a/vnet/vnet/ip/ip4_forward.c b/vnet/vnet/ip/ip4_forward.c
index 8914abecc72..8105d74a8b6 100644
--- a/vnet/vnet/ip/ip4_forward.c
+++ b/vnet/vnet/ip/ip4_forward.c
@@ -1071,8 +1071,8 @@ static u8 * format_ip4_forward_next_trace (u8 * s, va_list * args)
ip4_forward_next_trace_t * t = va_arg (*args, ip4_forward_next_trace_t *);
uword indent = format_get_indent (s);
s = format (s, "%U%U",
- format_white_space, indent,
- format_ip4_header, t->packet_data);
+ format_white_space, indent,
+ format_ip4_header, t->packet_data, sizeof (t->packet_data));
return s;
}
@@ -1081,16 +1081,13 @@ static u8 * format_ip4_lookup_trace (u8 * s, va_list * args)
CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
ip4_forward_next_trace_t * t = va_arg (*args, ip4_forward_next_trace_t *);
- vnet_main_t * vnm = vnet_get_main();
uword indent = format_get_indent (s);
- s = format (s, "fib %d adj-idx %d : %U flow hash: 0x%08x",
- t->fib_index, t->adj_index, format_ip_adjacency,
- vnm, t->adj_index, FORMAT_IP_ADJACENCY_NONE,
- t->flow_hash);
+ s = format (s, "fib %d dpo-idx %d flow hash: 0x%08x",
+ t->fib_index, t->adj_index, t->flow_hash);
s = format (s, "\n%U%U",
format_white_space, indent,
- format_ip4_header, t->packet_data);
+ format_ip4_header, t->packet_data, sizeof (t->packet_data));
return s;
}
diff --git a/vnet/vnet/ip/ip6_forward.c b/vnet/vnet/ip/ip6_forward.c
index f7514dc3cbf..56892d4132f 100644
--- a/vnet/vnet/ip/ip6_forward.c
+++ b/vnet/vnet/ip/ip6_forward.c
@@ -848,7 +848,7 @@ static u8 * format_ip6_forward_next_trace (u8 * s, va_list * args)
s = format(s, "%U%U",
format_white_space, indent,
- format_ip6_header, t->packet_data);
+ format_ip6_header, t->packet_data, sizeof (t->packet_data));
return s;
}
@@ -859,11 +859,11 @@ static u8 * format_ip6_lookup_trace (u8 * s, va_list * args)
ip6_forward_next_trace_t * t = va_arg (*args, ip6_forward_next_trace_t *);
uword indent = format_get_indent (s);
- s = format (s, "fib %d dpo-idx %d : flow hash: 0x%08x",
+ s = format (s, "fib %d dpo-idx %d flow hash: 0x%08x",
t->fib_index, t->adj_index, t->flow_hash);
s = format(s, "\n%U%U",
format_white_space, indent,
- format_ip6_header, t->packet_data);
+ format_ip6_header, t->packet_data, sizeof (t->packet_data));
return s;
}