From 65cbcfe83a2fcd8683598df744f6dab0633ab778 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Wed, 20 Feb 2019 15:34:00 +0100 Subject: pg: fix tracing when device-input feature arc is used Change-Id: I82240b43d3a5f3f33ac9ab2de106b3ec0ea31780 Signed-off-by: Damjan Marion --- src/vnet/pg/input.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/vnet/pg/input.c b/src/vnet/pg/input.c index 019c872ed5d..befa2786abe 100644 --- a/src/vnet/pg/input.c +++ b/src/vnet/pg/input.c @@ -1450,16 +1450,14 @@ format_pg_input_trace (u8 * s, va_list * va) static void pg_input_trace (pg_main_t * pg, - vlib_node_runtime_t * node, - pg_stream_t * s, u32 * buffers, u32 n_buffers) + vlib_node_runtime_t * node, u32 stream_index, u32 next_index, + u32 * buffers, u32 n_buffers) { vlib_main_t *vm = vlib_get_main (); - u32 *b, n_left, stream_index, next_index; + u32 *b, n_left; n_left = n_buffers; b = buffers; - stream_index = s - pg->streams; - next_index = s->next_index; while (n_left >= 2) { @@ -1621,7 +1619,7 @@ pg_generate_packets (vlib_node_runtime_t * node, if (n_trace > 0) { u32 n = clib_min (n_trace, n_this_frame); - pg_input_trace (pg, node, s, to_next, n); + pg_input_trace (pg, node, s - pg->streams, next_index, to_next, n); vlib_set_trace_count (vm, node, n_trace - n); } n_packets_to_generate -= n_this_frame; -- cgit 1.2.3-korg