aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/reass/ip4_full_reass.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip/reass/ip4_full_reass.c')
-rw-r--r--src/vnet/ip/reass/ip4_full_reass.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/vnet/ip/reass/ip4_full_reass.c b/src/vnet/ip/reass/ip4_full_reass.c
index 87a677208fb..303f23337ee 100644
--- a/src/vnet/ip/reass/ip4_full_reass.c
+++ b/src/vnet/ip/reass/ip4_full_reass.c
@@ -235,6 +235,8 @@ typedef struct
u32 fragment_first;
u32 fragment_last;
u32 total_data_len;
+ bool is_after_handoff;
+ ip4_header_t ip4_header;
} ip4_full_reass_trace_t;
extern vlib_node_registration_t ip4_full_reass_node;
@@ -274,7 +276,16 @@ format_ip4_full_reass_trace (u8 * s, va_list * args)
u32 indent = 0;
if (~0 != t->reass_id)
{
- s = format (s, "reass id: %u, op id: %u, ", t->reass_id, t->op_id);
+ if (t->is_after_handoff)
+ {
+ s =
+ format (s, "%U\n", format_ip4_header, &t->ip4_header,
+ sizeof (t->ip4_header));
+ indent = 2;
+ }
+ s =
+ format (s, "%Ureass id: %u, op id: %u, ", format_white_space, indent,
+ t->reass_id, t->op_id);
indent = format_get_indent (s);
s =
format (s,
@@ -322,7 +333,18 @@ ip4_full_reass_add_trace (vlib_main_t * vm, vlib_node_runtime_t * node,
{
vlib_buffer_t *b = vlib_get_buffer (vm, bi);
vnet_buffer_opaque_t *vnb = vnet_buffer (b);
+ bool is_after_handoff = false;
+ if (vlib_buffer_get_trace_thread (b) != vm->thread_index)
+ {
+ is_after_handoff = true;
+ }
ip4_full_reass_trace_t *t = vlib_add_trace (vm, node, b, sizeof (t[0]));
+ t->is_after_handoff = is_after_handoff;
+ if (t->is_after_handoff)
+ {
+ clib_memcpy (&t->ip4_header, vlib_buffer_get_current (b),
+ clib_min (sizeof (t->ip4_header), b->current_length));
+ }
if (reass)
{
t->reass_id = reass->id;