Fix packet trace for IP4/IP6 lookup/forwarding nodes
Change-Id: Ibf3d2e69dbac28fbef77d8ba20d7f5a60eea0198 Signed-off-by: John Lo <loj@cisco.com>
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user