summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-02-20 15:34:00 +0100
committerFlorin Coras <florin.coras@gmail.com>2019-02-20 16:30:06 +0000
commit65cbcfe83a2fcd8683598df744f6dab0633ab778 (patch)
treecdf0a4ec6a4b5b80f8beefd860954b2af1293615
parent2768cdc0986dfaccc2da67a57ba08e557f811dcf (diff)
pg: fix tracing when device-input feature arc is used
Change-Id: I82240b43d3a5f3f33ac9ab2de106b3ec0ea31780 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--src/vnet/pg/input.c10
1 files changed, 4 insertions, 6 deletions
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;