summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat
diff options
context:
space:
mode:
authorFilip Varga <fivarga@cisco.com>2019-07-11 12:08:43 -0400
committerDave Barach <openvpp@barachs.net>2019-07-12 12:27:32 +0000
commitdeb582734773958a8fab888c98c2a5501d9bc819 (patch)
tree9552ddd9b0c216d82179101bcbbb9d51f3394eb5 /src/plugins/nat
parent495d7ffbc82823edccabab960fc81a909f80075d (diff)
nat: added handoff trace index for easier trace match
Type: feature Change-Id: Id818f86164acabcb732e9a65d0e284d68e747a7b Signed-off-by: Filip Varga <fivarga@cisco.com>
Diffstat (limited to 'src/plugins/nat')
-rw-r--r--src/plugins/nat/nat44_handoff.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/nat/nat44_handoff.c b/src/plugins/nat/nat44_handoff.c
index 2a8404d141f..e4cb483a458 100644
--- a/src/plugins/nat/nat44_handoff.c
+++ b/src/plugins/nat/nat44_handoff.c
@@ -27,6 +27,7 @@
typedef struct
{
u32 next_worker_index;
+ u32 trace_index;
u8 in2out;
} nat44_handoff_trace_t;
@@ -60,8 +61,8 @@ format_nat44_handoff_trace (u8 * s, va_list * args)
tag = t->in2out ? "IN2OUT" : "OUT2IN";
s =
- format (s, "NAT44_%s_WORKER_HANDOFF: next-worker %d", tag,
- t->next_worker_index);
+ format (s, "NAT44_%s_WORKER_HANDOFF: next-worker %d trace index %d", tag,
+ t->next_worker_index, t->trace_index);
return s;
}
@@ -125,6 +126,7 @@ nat44_worker_handoff_fn_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
nat44_handoff_trace_t *t =
vlib_add_trace (vm, node, b[0], sizeof (*t));
t->next_worker_index = ti[0];
+ t->trace_index = vlib_buffer_get_trace_index (b[0]);
t->in2out = is_in2out;
}